diff --git a/kgCommon/src/main/kotlin/ru/klavogonki/common/Car.kt b/kgCommon/src/main/kotlin/ru/klavogonki/common/Car.kt index b32c6653d..375872fc7 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 3a2405540..e837300a4 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 bfc443999..52a8ba673 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 2c7ac50f5..ed3b6de19 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 645be6eb7..9e9377a9f 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 ed10cf519..e7bac67c2 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 fdcbd7abb..7ca3c4fb9 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 36cddcd28..c6c41e1cb 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 22d46c44c..2a3b51a8c 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 21f9bdd82..b4099429d 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 14a463bc6..5a70e8884 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 2e98964eb..f824da1d6 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 b09c7236b..38e304dd3 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 30b260199..9a5ea6527 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")