Package com.e1c.langtool.stat
Interface StatisticsManager
- All Known Implementing Classes:
CompositeStatisticsManager,EmptyStatisticsManager
public interface StatisticsManager
The manager allows to edit statistics by the project.
-
Method Summary
Modifier and TypeMethodDescriptionvoidexportStatistics(Path path, String type) Exports statistics to an external file in the specified format.@NonNull org.eclipse.core.resources.IProjectGets the project to edit statistics.voidRemove all statistics in this manager for all sources and all languagesvoidremoveStatistic(@NonNull TranslateLanguage language) Remove statistics for given language.default voidremoveStatistic(@NonNull TranslationSource source) Remove statistics for givenTranslationSourcefor allTranslationLanguages.default voidremoveStatistic(@NonNull TranslationSource source, @NonNull TranslateLanguage language) Remove statistics for givenTranslationSourceandTranslationLanguage.voidremoveStatistic(@NonNull org.eclipse.core.runtime.IPath path, @NonNull TranslateLanguage language) Remove statistics for given path ofTranslationSourceandTranslationLanguage.voidremoveStatistic(org.eclipse.core.runtime.IPath path) Remove statistics for given path ofTranslationSourcefor allTranslationLanguages.voidRecompute full statistics.default voidupdateFullStatistic(@NonNull TranslationSource source, @NonNull Statistics statistics) Update full statistics.voidupdateFullStatistic(@NonNull org.eclipse.core.runtime.IPath path, @NonNull Statistics statistics) Update full statistics.default voidupdateLanguageStatistic(@NonNull TranslationSource source, @NonNull TranslateLanguage language, @NonNull Statistics statistics) Update statistics.voidupdateLanguageStatistic(@NonNull org.eclipse.core.runtime.IPath path, @NonNull TranslateLanguage language, @NonNull Statistics statistics) Update statistics.voidupdateProjectLanguageStatistic(@NonNull TranslateLanguage language, @NonNull Statistics statistics) Update project language statistics.voidupdateProjectStatistic(@NonNull Statistics statistics) Update project statistics.
-
Method Details
-
getProject
@NonNull org.eclipse.core.resources.IProject getProject()Gets the project to edit statistics.- Returns:
- the project, cannot return
null.
-
updateProjectStatistic
Update project statistics.- Parameters:
statistics- the statistics, cannot benull.
-
updateProjectLanguageStatistic
void updateProjectLanguageStatistic(@NonNull TranslateLanguage language, @NonNull Statistics statistics) Update project language statistics.- Parameters:
language- the language, cannot benull.statistics- the statistics, cannot benull.
-
updateFullStatistic
Update full statistics.- Parameters:
source- the translation source object, cannot benull.statistics- the statistics, cannot benull.
-
updateFullStatistic
void updateFullStatistic(@NonNull org.eclipse.core.runtime.IPath path, @NonNull Statistics statistics) Update full statistics.- Parameters:
path- the translation source path, cannot benull.statistics- the statistics that may contain all data for each languages, or absent data for all languages will be cleaned. Cannot benull.
-
updateLanguageStatistic
default void updateLanguageStatistic(@NonNull TranslationSource source, @NonNull TranslateLanguage language, @NonNull Statistics statistics) Update statistics.- Parameters:
source- the translation source object, cannot benull.language- the language, cannot benull.statistics- the statistics, cannot benull.
-
updateLanguageStatistic
void updateLanguageStatistic(@NonNull org.eclipse.core.runtime.IPath path, @NonNull TranslateLanguage language, @NonNull Statistics statistics) Update statistics.- Parameters:
source- the translation source path, cannot benull.language- the language, cannot benull.
-
removeStatistic
void removeStatistic()Remove all statistics in this manager for all sources and all languages -
removeStatistic
Remove statistics for given language.- Parameters:
language- the language, cannot benull.
-
removeStatistic
Remove statistics for givenTranslationSourcefor allTranslationLanguages.- Parameters:
source- the source, cannot benull.
-
removeStatistic
void removeStatistic(org.eclipse.core.runtime.IPath path) Remove statistics for given path ofTranslationSourcefor allTranslationLanguages.- Parameters:
path- the path, cannot benull.
-
removeStatistic
default void removeStatistic(@NonNull TranslationSource source, @NonNull TranslateLanguage language) Remove statistics for givenTranslationSourceandTranslationLanguage.- Parameters:
source- the source, cannot benull.language- the language, cannot benull.
-
removeStatistic
void removeStatistic(@NonNull org.eclipse.core.runtime.IPath path, @NonNull TranslateLanguage language) Remove statistics for given path ofTranslationSourceandTranslationLanguage.- Parameters:
path- the path, cannot benull.language- the language, cannot benull.
-
startRecomputeFullStatistic
void startRecomputeFullStatistic()Recompute full statistics. -
exportStatistics
Exports statistics to an external file in the specified format.- Parameters:
path- the path to the file where the statistics will be exported, cannot benull.type- the statistics type, cannot benull- Throws:
IOException- Signals that an I/O exception has occurred.
-