diff --git a/kgCommon/src/main/kotlin/ru/klavogonki/common/Car.kt b/kgCommon/src/main/kotlin/ru/klavogonki/common/Car.kt index b32c6653..375872fc 100644 --- a/kgCommon/src/main/kotlin/ru/klavogonki/common/Car.kt +++ b/kgCommon/src/main/kotlin/ru/klavogonki/common/Car.kt @@ -3,7 +3,7 @@ package ru.klavogonki.common /** * List of cars with ids and Russian names. */ -@SuppressWarnings("MagicNumber") +@Suppress("MagicNumber") enum class Car( @JvmField val id: Int, @JvmField val displayName: String, diff --git a/kgparserSrv/src/main/java/ru/klavogonki/kgparser/NonStandardDictionary.java b/kgCommon/src/main/kotlin/ru/klavogonki/common/NonStandardDictionary.kt similarity index 84% rename from kgparserSrv/src/main/java/ru/klavogonki/kgparser/NonStandardDictionary.java rename to kgCommon/src/main/kotlin/ru/klavogonki/common/NonStandardDictionary.kt index 3a240554..e837300a 100644 --- a/kgparserSrv/src/main/java/ru/klavogonki/kgparser/NonStandardDictionary.java +++ b/kgCommon/src/main/kotlin/ru/klavogonki/common/NonStandardDictionary.kt @@ -1,12 +1,14 @@ -package ru.klavogonki.kgparser; - -import ru.klavogonki.common.DictionaryUtils; +package ru.klavogonki.common /** * Популярные нестандартные словари. */ -public enum NonStandardDictionary { - +@Suppress("MagicNumber", "Unused") +enum class NonStandardDictionary( + @JvmField val code: String, + @JvmField val displayName: String, + @JvmField val displayNamePrepositional: String +) { // most popular non-standard dictionaries NORMAL_IN_ENGLISH(5539, "Обычный in English", "Обычном in English"), ONE_HUNDRED_RUSSIAN(25856, "Соточка", "Соточке"), @@ -50,7 +52,7 @@ public enum NonStandardDictionary { HRUST_EXERCISE_21(32013, "Упражнение №21", "Упражнении №21"), HRUST_EXERCISE_22(32014, "Упражнение №22", "Упражнении №22"), HRUST_EXERCISE_23(32015, "Упражнение №23", "Упражнении №23"), -// HRUST_EXERCISE_24(32016, "Упражнение №24", "Упражнении №24"), + // HRUST_EXERCISE_24(32016, "Упражнение №24", "Упражнении №24"), HRUST_EXERCISE_24(32016, "Упражнение заключительное", "Упражнении заключительном"), // Мультилингва @@ -60,18 +62,13 @@ public enum NonStandardDictionary { // номера словарей по возрастанию: normal 5539 8950 25130 29236 29464 29468 29510 29513 29521 29537 29616 29667 30395 30641 35239 40559 106181 106487 106554 106688 114083 114825 115209 115378 115424 115943 116073 116553 116554 116745 117862 122698 122702 122761 122888 122891 123163 130272 136302 136354 136403 136795 136908 137357 138500 141412 141415 141423 141609 141610 141960 ; - - NonStandardDictionary(final int code, final String displayName, final String displayNamePrepositional) { - this(DictionaryUtils.NON_STANDARD_DICTIONARY_ID_PREFIX + code, displayName, displayNamePrepositional); - } - - NonStandardDictionary(final String code, final String displayName, final String displayNamePrepositional) { - this.code = code; - this.displayName = displayName; - this.displayNamePrepositional = displayNamePrepositional; - } - - public final String code; - public final String displayName; - public final String displayNamePrepositional; -} + constructor( + code: Int, + displayName: String, + displayNamePrepositional: String + ) : this( + DictionaryUtils.getDictionaryCode(code), + displayName, + displayNamePrepositional + ) +} \ No newline at end of file diff --git a/kgCommon/src/main/kotlin/ru/klavogonki/common/StandardDictionary.kt b/kgCommon/src/main/kotlin/ru/klavogonki/common/StandardDictionary.kt index bfc44399..52a8ba67 100644 --- a/kgCommon/src/main/kotlin/ru/klavogonki/common/StandardDictionary.kt +++ b/kgCommon/src/main/kotlin/ru/klavogonki/common/StandardDictionary.kt @@ -3,7 +3,7 @@ package ru.klavogonki.common /** * Энум с названиями стандартных словарей (режимов), как они используются в AJAX-API. */ -@SuppressWarnings("MagicNumber", "LongParameterList") +@Suppress("MagicNumber", "LongParameterList") enum class StandardDictionary( /** diff --git a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/DigitsOneHundredTopExporter.java b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/DigitsOneHundredTopExporter.java index 2c7ac50f..ed3b6de1 100644 --- a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/DigitsOneHundredTopExporter.java +++ b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/DigitsOneHundredTopExporter.java @@ -4,7 +4,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; -import ru.klavogonki.kgparser.NonStandardDictionary; +import ru.klavogonki.common.NonStandardDictionary; import ru.klavogonki.statistics.export.vocabulary.standard.NonStandardVocabularyTopExporterDefaultImpl; import ru.klavogonki.statistics.springboot.Profiles; diff --git a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/FrequencyVocabularyTopExporter.java b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/FrequencyVocabularyTopExporter.java index 645be6eb..9e9377a9 100644 --- a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/FrequencyVocabularyTopExporter.java +++ b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/FrequencyVocabularyTopExporter.java @@ -4,7 +4,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; -import ru.klavogonki.kgparser.NonStandardDictionary; +import ru.klavogonki.common.NonStandardDictionary; import ru.klavogonki.statistics.export.vocabulary.standard.NonStandardVocabularyTopExporterDefaultImpl; import ru.klavogonki.statistics.springboot.Profiles; diff --git a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/MiniMarathonTopExporter.java b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/MiniMarathonTopExporter.java index ed10cf51..e7bac67c 100644 --- a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/MiniMarathonTopExporter.java +++ b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/MiniMarathonTopExporter.java @@ -4,7 +4,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; -import ru.klavogonki.kgparser.NonStandardDictionary; +import ru.klavogonki.common.NonStandardDictionary; import ru.klavogonki.statistics.export.vocabulary.standard.NonStandardVocabularyTopExporterDefaultImpl; import ru.klavogonki.statistics.springboot.Profiles; diff --git a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/NonStandardVocabularyTopExporter.java b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/NonStandardVocabularyTopExporter.java index fdcbd7ab..7ca3c4fb 100644 --- a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/NonStandardVocabularyTopExporter.java +++ b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/NonStandardVocabularyTopExporter.java @@ -1,6 +1,6 @@ package ru.klavogonki.statistics.export.vocabulary.non_standard; -import ru.klavogonki.kgparser.NonStandardDictionary; +import ru.klavogonki.common.NonStandardDictionary; import ru.klavogonki.statistics.export.vocabulary.VocabularyTopExporter; import ru.klavogonki.statistics.export.vocabulary.VocabularyTopUtils; diff --git a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/NormalInEnglishTopExporter.java b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/NormalInEnglishTopExporter.java index 36cddcd2..c6c41e1c 100644 --- a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/NormalInEnglishTopExporter.java +++ b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/NormalInEnglishTopExporter.java @@ -4,7 +4,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; -import ru.klavogonki.kgparser.NonStandardDictionary; +import ru.klavogonki.common.NonStandardDictionary; import ru.klavogonki.statistics.export.vocabulary.standard.NonStandardVocabularyTopExporterDefaultImpl; import ru.klavogonki.statistics.springboot.Profiles; diff --git a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/OneHundredRussianTopExporter.java b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/OneHundredRussianTopExporter.java index 22d46c44..2a3b51a8 100644 --- a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/OneHundredRussianTopExporter.java +++ b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/OneHundredRussianTopExporter.java @@ -4,7 +4,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; -import ru.klavogonki.kgparser.NonStandardDictionary; +import ru.klavogonki.common.NonStandardDictionary; import ru.klavogonki.statistics.export.vocabulary.standard.NonStandardVocabularyTopExporterDefaultImpl; import ru.klavogonki.statistics.springboot.Profiles; diff --git a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/PinkiesPlusTopExporter.java b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/PinkiesPlusTopExporter.java index 21f9bdd8..b4099429 100644 --- a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/PinkiesPlusTopExporter.java +++ b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/PinkiesPlusTopExporter.java @@ -4,7 +4,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; -import ru.klavogonki.kgparser.NonStandardDictionary; +import ru.klavogonki.common.NonStandardDictionary; import ru.klavogonki.statistics.export.vocabulary.standard.NonStandardVocabularyTopExporterDefaultImpl; import ru.klavogonki.statistics.springboot.Profiles; diff --git a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/RingFingersTopExporter.java b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/RingFingersTopExporter.java index 14a463bc..5a70e888 100644 --- a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/RingFingersTopExporter.java +++ b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/RingFingersTopExporter.java @@ -4,7 +4,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; -import ru.klavogonki.kgparser.NonStandardDictionary; +import ru.klavogonki.common.NonStandardDictionary; import ru.klavogonki.statistics.export.vocabulary.standard.NonStandardVocabularyTopExporterDefaultImpl; import ru.klavogonki.statistics.springboot.Profiles; diff --git a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/ShortTextsTopExporter.java b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/ShortTextsTopExporter.java index 2e98964e..f824da1d 100644 --- a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/ShortTextsTopExporter.java +++ b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/ShortTextsTopExporter.java @@ -4,7 +4,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; -import ru.klavogonki.kgparser.NonStandardDictionary; +import ru.klavogonki.common.NonStandardDictionary; import ru.klavogonki.statistics.export.vocabulary.standard.NonStandardVocabularyTopExporterDefaultImpl; import ru.klavogonki.statistics.springboot.Profiles; diff --git a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/TrainingIndexFingersTopExporter.java b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/TrainingIndexFingersTopExporter.java index b09c7236..38e304dd 100644 --- a/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/TrainingIndexFingersTopExporter.java +++ b/kgstatsSrv/src/main/java/ru/klavogonki/statistics/export/vocabulary/non_standard/TrainingIndexFingersTopExporter.java @@ -4,7 +4,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; -import ru.klavogonki.kgparser.NonStandardDictionary; +import ru.klavogonki.common.NonStandardDictionary; import ru.klavogonki.statistics.export.vocabulary.standard.NonStandardVocabularyTopExporterDefaultImpl; import ru.klavogonki.statistics.springboot.Profiles; diff --git a/kgstatsSrv/src/main/kotlin/ru/klavogonki/statistics/export/vocabulary/VocabularyTopUtils.kt b/kgstatsSrv/src/main/kotlin/ru/klavogonki/statistics/export/vocabulary/VocabularyTopUtils.kt index 30b26019..9a5ea652 100644 --- a/kgstatsSrv/src/main/kotlin/ru/klavogonki/statistics/export/vocabulary/VocabularyTopUtils.kt +++ b/kgstatsSrv/src/main/kotlin/ru/klavogonki/statistics/export/vocabulary/VocabularyTopUtils.kt @@ -1,8 +1,8 @@ package ru.klavogonki.statistics.export.vocabulary import org.apache.logging.log4j.kotlin.Logging +import ru.klavogonki.common.NonStandardDictionary import ru.klavogonki.common.StandardDictionary -import ru.klavogonki.kgparser.NonStandardDictionary import ru.klavogonki.statistics.excel.ExcelExporter @Suppress("TooManyFunctions")