From 450d6b05377310bff440463bc7d89b09bb5a26db Mon Sep 17 00:00:00 2001 From: alx652 Date: Fri, 1 Mar 2024 17:09:23 -0500 Subject: [PATCH 01/23] prepare substance-core.conf for validators change --- .../src/main/resources/substances-core.conf | 267 +++++++++++------- 1 file changed, 168 insertions(+), 99 deletions(-) diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index 83c61e2ef..9588d830a 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -94,206 +94,283 @@ gsrs.standardizers.substances = { } } -gsrs.validators.substances = [ - # public Class validatorClass; - # public Class substanceClass; - # public Substance.SubstanceDefinitionType type; - +gsrs.validators.substances.IgnoreValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.IgnoreValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "configClass" = "SubstanceValidatorConfig" - }, + "order": 100 + } +gsrs.validators.substances.NullCheckValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NullCheckValidator", "newObjClass" = "ix.ginas.models.v1.Substance", - - }, + "order": 200 + } +gsrs.validators.substances.AutoGenerateUuidIfNeeded = { "validatorClass" = "ix.ginas.utils.validation.validators.AutoGenerateUuidIfNeeded", "newObjClass" = "ix.ginas.models.v1.Substance", - }, + "order": 300 + } +gsrs.validators.substances.StructuralModificationsValidator = { #validates that any structural modifications are effectively non-null "validatorClass" = "ix.ginas.utils.validation.validators.StructuralModificationsValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 400 }, +gsrs.validators.substances.SubstanceStatusValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.SubstanceStatusValidator", "newObjClass" = "ix.ginas.models.v1.Substance", - }, - { + "order": 500 + } +gsrs.validators.substances.RemovePublicIndReferences = { "validatorClass" = "ix.ginas.utils.validation.validators.RemovePublicIndReferences", "newObjClass" = "ix.ginas.models.v1.Substance", - }, + "order": 600 + } +gsrs.validators.substances.NamesValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NamesValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 700, "type" = "PRIMARY" "configClass" = "SubstanceValidatorConfig", "parameters"= { "caseSearchType": "Explicit" } - }, - + } +gsrs.validators.substances.PrimaryRelationshipsValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.PrimaryRelationshipsValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 800, "type" = "PRIMARY" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.NotesValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NotesValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 900, "type" = "PRIMARY" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.PrimaryDefinitionValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.PrimaryDefinitionValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1000, "type" = "PRIMARY" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.AlternateDefinitionValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.AlternateDefinitionValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1100, "type" = "ALTERNATIVE" "configClass" = "SubstanceValidatorConfig" - }, + } + +gsrs.validators.substances.ChemicalValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.ChemicalValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1200, "substanceClass" = "chemical", - #September 2020: additional parameter 'allow0AtomStructures' when true -> user can register blank structures; false -> no blank structures + # September 2020: additional parameter 'allow0AtomStructures' when true -> user can register blank structures; false -> no blank structures "parameters"= {"allow0AtomStructures":false, "allowV3000Molfiles": false } - "configClass" = "SubstanceValidatorConfig" - }, + "configClass" = "SubstanceValidatorConfig" + } + +gsrs.validators.substances.MixtureValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.MixtureValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1300, "substanceClass" = "mixture" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.NucleicAcidValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NucleicAcidValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1400, "substanceClass" = "nucleicAcid", "configClass" = "SubstanceValidatorConfig" - }, + } + +gsrs.validators.substances.PolymerValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.PolymerValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1500, "substanceClass" = "polymer" "configClass" = "SubstanceValidatorConfig" - }, + } + +gsrs.validators.substances.ProteinValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.ProteinValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1600, "substanceClass" = "protein" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.StructurallyDiverseValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.StructurallyDiverseValidator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1700, "substanceClass" = "structurallyDiverse" "configClass" = "SubstanceValidatorConfig" - }, + } +gsrs.validators.substances.SSSG1Validator = { "validatorClass" = "ix.ginas.utils.validation.validators.SSSG1Validator", "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1800 "substanceClass" = "specifiedSubstanceG1", "configClass" = "SubstanceValidatorConfig" }, +gsrs.validators.substances.UnknownSubstanceClassValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.UnknownSubstanceClassValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - }, + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1900 + } +gsrs.validators.substances.NewSubstanceNonBatchLoadValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NewSubstanceNonBatchLoadValidator", "newObjClass" = "ix.ginas.models.v1.Substance", - - }, + "order": 2000 + } +gsrs.validators.substances.UpdateSubstanceNonBatchLoaderValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.UpdateSubstanceNonBatchLoaderValidator", "newObjClass" = "ix.ginas.models.v1.Substance", - - }, + "order": 2100 + } +gsrs.validators.substances.PublicDomainRefValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.PublicDomainRefValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - }, - { - "validatorClass" = "ix.ginas.utils.validation.validators.DefinitionalHashValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - }, - - # Added 9 November 2020 MAM - #make sure than a public substance has at least one public definitional reference - { - "validatorClass" = "ix.ginas.utils.validation.validators.DefinitionalReferenceValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - }, - # Validator for Relationship modifications (restrict to admins) - { - "validatorClass" = "ix.ginas.utils.validation.validators.RelationshipModificationValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - }, - #Make sure each property has a name - { - "validatorClass" = "ix.ginas.utils.validation.validators.PropertyValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - }, - - #check the mol files of chemical substances and throw errors if there are SUP s-groups. - #to remove this check comment out or delete this statement. - { - "validatorClass" = "ix.ginas.utils.validation.validators.SuperatomValidator", - "newObjClass" = "ix.ginas.models.v1.Substance", - "substanceClass" = "chemical", - "configClass" = "SubstanceValidatorConfig" - } - -# #Standardize Names; Listed here for reference. Copy and paste into your application.conf and uncomment. -# { -# "validatorClass" = "ix.ginas.utils.validation.validators.StandardNameValidator", -# "newObjClass" = "ix.ginas.models.v1.Substance", -# "configClass" = "SubstanceValidatorConfig", -# "parameters"= { -# "behaviorOnInvalidStdName": "warn" -# } -# } + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2200 + } +gsrs.validators.substances.DefinitionalHashValidator = + { + "validatorClass" = "ix.ginas.utils.validation.validators.DefinitionalHashValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2300, + "disabled": false + } +gsrs.validators.substances.DefinitionalReferenceValidator = + { + "validatorClass" = "ix.ginas.utils.validation.validators.DefinitionalReferenceValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2400 + } +gsrs.validators.substances.RelationshipModificationValidator = + # Validator for Relationship modifications (restrict to admins) + { + "validatorClass" = "ix.ginas.utils.validation.validators.RelationshipModificationValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2500, + "disabled": false + } +gsrs.validators.substances.PropertyValidator = + # Make sure each property has a name + { + "validatorClass" = "ix.ginas.utils.validation.validators.PropertyValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2600, + "disabled": false + } +gsrs.validators.substances.SuperatomValidator = + # Check the mol files of chemical substances and throw errors if there are SUP s-groups. + # To remove this check comment out or delete this statement. + { + "validatorClass" = "ix.ginas.utils.validation.validators.SuperatomValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2700, + "substanceClass" = "chemical", + "configClass" = "SubstanceValidatorConfig" + } -] +# cross check with substances service +gsrs.validators.substances.StandardNameValidator = + #Standardize Names; Listed here for reference. Copy and paste into your application.conf and uncomment. + { + "validatorClass" = "ix.ginas.utils.validation.validators.StandardNameValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2800, + "configClass" = "SubstanceValidatorConfig", + "parameters"= { + "behaviorOnInvalidStdName": "warn" + } + } + +# Group 2 ############################################## # THIS IS IMPORTANT, ADDITION OF VALIDATORS! ############################################## -#gsrs.substance.validators -gsrs.validators.substances += { - "validatorClass" = "ix.ginas.utils.validation.validators.CodeFormatValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" +#gsrs.substance.validators +gsrs.validators.substances.CodeFormatValidator = + { + "validatorClass" = "ix.ginas.utils.validation.validators.CodeFormatValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2900 } -#TODO katzelda Feb 2021: remove for now -#Check that individual moieties of a multi-moiety chemical are registered separately -gsrs.validators.substances += { + +gsrs.validators.substances.SaltValidator = + # TODO katzelda Feb 2021: remove for now + # Check that individual moieties of a multi-moiety chemical are registered separately + { "validatorClass" = "ix.ginas.utils.validation.validators.SaltValidator", - "newObjClass" = "ix.ginas.models.v1.ChemicalSubstance" + "newObjClass" = "ix.ginas.models.v1.ChemicalSubstance", + "order": 3000 } -#check for uniqueness of several classes of substance based on definitional hashes -gsrs.validators.substances += { + +gsrs.validators.substances.SubstanceUniquenessValidator = + # Check for uniqueness of several classes of substance based on definitional hashes + { "validatorClass" = "ix.ginas.utils.validation.validators.SubstanceUniquenessValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 3100 } - -# add check for CAS RNs -gsrs.validators.substances += { +gsrs.validators.substances.CASCodeValidator = + { + # add check for CAS RNs "validatorClass" = "ix.ginas.utils.validation.validators.CASCodeValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - } + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 3200 + } + +gsrs.validators.substances.ChemicalUniquenessValidator = + { + "validatorClass" = "ix.ginas.utils.validation.validators.ChemicalUniquenessValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 3300, + "configClass" = "SubstanceValidatorConfig", + "parameters"= {} + } +# commented out do we want it but disabled? +# gsrs.validators.substances.CodeUniquenessValidator = +# { +# "validatorClass" = "ix.ginas.utils.validation.validators.CodeUniquenessValidator", +# "newObjClass" = "ix.ginas.models.v1.Substance", +# "order": 3400, +# "configClass" = "SubstanceValidatorConfig", +# "parameters"= {"singletonCodeSystems" =["CAS"]} +# } spring.application.name=substance @@ -684,14 +761,6 @@ gsrs.standardizers.substances = { } } -#gsrs.validators.substances += -#{ -# "validatorClass" = "ix.ginas.utils.validation.validators.CodeUniquenessValidator", -# "newObjClass" = "ix.ginas.models.v1.Substance", -# "configClass" = "SubstanceValidatorConfig", -# "parameters"= {"singletonCodeSystems" =["CAS"]} -#} - # ix.gsrs.sdfActions={structure_and_moieties:'gsrs.module.substance.importers.StructureExtractorActionFactory', # code_import:'gsrs.module.substance.importers.CodeExtractorActionFactory', # common_name:'gsrs.module.substance.importers.NameExtractorActionFactory'} From 4f773af88f967dfb7e3795cfe845c3eeb8b36990 Mon Sep 17 00:00:00 2001 From: alx652 Date: Fri, 1 Mar 2024 17:40:46 -0500 Subject: [PATCH 02/23] more conf edits --- .../src/main/resources/substances-core.conf | 31 +++++-------------- 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index 9588d830a..1bc26610d 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -313,8 +313,6 @@ gsrs.validators.substances.StandardNameValidator = } } -# Group 2 - ############################################## # THIS IS IMPORTANT, ADDITION OF VALIDATORS! ############################################## @@ -372,6 +370,13 @@ gsrs.validators.substances.ChemicalUniquenessValidator = # "parameters"= {"singletonCodeSystems" =["CAS"]} # } +gsrs.validators.substances.CodesValidator = + { + "validatorClass" = "ix.ginas.utils.validation.validators.CodesValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 3500, + "configClass" = "SubstanceValidatorConfig" + } spring.application.name=substance @@ -687,29 +692,7 @@ gsrs.validators.substances += { } #removed from suggestedPublic but not yet added to alwaysPrivate: CTP and DMF -gsrs.validators.substances += -{ - "validatorClass" = "ix.ginas.utils.validation.validators.CodesValidator", - "newObjClass" = "ix.ginas.models.v1.Substance", - "configClass" = "SubstanceValidatorConfig" - -} - -gsrs.validators.substances += - { - "validatorClass" = "ix.ginas.utils.validation.validators.ChemicalUniquenessValidator", - "newObjClass" = "ix.ginas.models.v1.Substance", - "configClass" = "SubstanceValidatorConfig", - "parameters"= {} -} -#gsrs.validators.substances += -#{ -# "validatorClass" = "ix.ginas.utils.validation.validators.CodeUniquenessValidator", -# "newObjClass" = "ix.ginas.models.v1.Substance", -# "configClass" = "SubstanceValidatorConfig", -# "parameters"= {"singletonCodeSystems" =["CAS"]} -#} gsrs.scheduled-tasks.list+= { "scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", From 03deb4451c78caef3e8a0d1c2b3c584fb91e75b9 Mon Sep 17 00:00:00 2001 From: alx652 Date: Fri, 1 Mar 2024 18:06:21 -0500 Subject: [PATCH 03/23] edits validators --- .../src/main/resources/substances-core.conf | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index 1bc26610d..7d9a2f83e 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -174,7 +174,6 @@ gsrs.validators.substances.AlternateDefinitionValidator = "type" = "ALTERNATIVE" "configClass" = "SubstanceValidatorConfig" } - gsrs.validators.substances.ChemicalValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.ChemicalValidator", @@ -185,7 +184,6 @@ gsrs.validators.substances.ChemicalValidator = "parameters"= {"allow0AtomStructures":false, "allowV3000Molfiles": false } "configClass" = "SubstanceValidatorConfig" } - gsrs.validators.substances.MixtureValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.MixtureValidator", @@ -202,7 +200,6 @@ gsrs.validators.substances.NucleicAcidValidator = "substanceClass" = "nucleicAcid", "configClass" = "SubstanceValidatorConfig" } - gsrs.validators.substances.PolymerValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.PolymerValidator", @@ -211,7 +208,6 @@ gsrs.validators.substances.PolymerValidator = "substanceClass" = "polymer" "configClass" = "SubstanceValidatorConfig" } - gsrs.validators.substances.ProteinValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.ProteinValidator", @@ -268,7 +264,7 @@ gsrs.validators.substances.DefinitionalHashValidator = "disabled": false } gsrs.validators.substances.DefinitionalReferenceValidator = - { + { "validatorClass" = "ix.ginas.utils.validation.validators.DefinitionalReferenceValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 2400 @@ -317,16 +313,12 @@ gsrs.validators.substances.StandardNameValidator = # THIS IS IMPORTANT, ADDITION OF VALIDATORS! ############################################## - -#gsrs.substance.validators gsrs.validators.substances.CodeFormatValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.CodeFormatValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 2900 } - - gsrs.validators.substances.SaltValidator = # TODO katzelda Feb 2021: remove for now # Check that individual moieties of a multi-moiety chemical are registered separately @@ -335,7 +327,6 @@ gsrs.validators.substances.SaltValidator = "newObjClass" = "ix.ginas.models.v1.ChemicalSubstance", "order": 3000 } - gsrs.validators.substances.SubstanceUniquenessValidator = # Check for uniqueness of several classes of substance based on definitional hashes { @@ -350,7 +341,13 @@ gsrs.validators.substances.CASCodeValidator = "newObjClass" = "ix.ginas.models.v1.Substance", "order": 3200 } - +gsrs.validators.substances.CodesValidator = + { + "validatorClass" = "ix.ginas.utils.validation.validators.CodesValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 3500, + "configClass" = "SubstanceValidatorConfig" + } gsrs.validators.substances.ChemicalUniquenessValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.ChemicalUniquenessValidator", @@ -370,14 +367,6 @@ gsrs.validators.substances.ChemicalUniquenessValidator = # "parameters"= {"singletonCodeSystems" =["CAS"]} # } -gsrs.validators.substances.CodesValidator = - { - "validatorClass" = "ix.ginas.utils.validation.validators.CodesValidator", - "newObjClass" = "ix.ginas.models.v1.Substance", - "order": 3500, - "configClass" = "SubstanceValidatorConfig" - } - spring.application.name=substance #logging.level.org.springframework.web=DEBUG From 0c9f4d87d561f82edb44fa859e65dc7354ef4772 Mon Sep 17 00:00:00 2001 From: alx652 Date: Fri, 1 Mar 2024 19:35:54 -0500 Subject: [PATCH 04/23] edits --- .../src/main/resources/substances-core.conf | 50 ++++++++++--------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index 7d9a2f83e..4aecc38ee 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -341,18 +341,36 @@ gsrs.validators.substances.CASCodeValidator = "newObjClass" = "ix.ginas.models.v1.Substance", "order": 3200 } +gsrs.validators.substances.SetReferenceAccess = + #removed from suggestedPublic but not yet added to alwaysPrivate: CTP and DMF + { + "validatorClass" = "ix.ginas.utils.validation.validators.SetReferenceAccess", + "newObjClass" = "ix.ginas.models.v1.Substance", + "configClass" = "SubstanceValidatorConfig", + "order": 3300, + "suggestedPublic": [ + "ACD", "ALANWOOD", "ALGAEBASE", "AMERICAN BOTANICAL COUNCIL", "ANNONBASE", + "ATC INN", "ATCC", "AUSTRALIAN PLANT NAME INDEX", "BAN", "BIOPHARMA", "BIOS", "BIOSYSTEMATIC DATABASE of WORLD DIPTERA", + "BLATTODEA SPECIES", "BOOK", "BRASSICACEAE", "BRITISH PHARMACOPOEIA", "CAS", "CATALOGUE OF LIFE CHINA", "CENTER FOR DISEASE CONTROL", "CFR", + "CHEBI", "CHEMBANK", "CHEMID", "CHEMSPIDER", "CHENOBASE", "CHINESE HERBAL MEDICINE", "CLINICAL PHARMACOLOGY", "CLINICAL_TRIALS.GOV", "CLINICALTRIALS", "CODEX Alimentarius", "COMBINED CHEMICAL DICTIONARY", "CONIFER DATABASE", "CTD_TOXICOGENOMICS", "CVM GREEN BOOK", "DAILYMED", "DOSE", "DOTHIDEOMYCETES", "DROSERACEAE DATABASE", "DRUG PRODUCT LABEL", "DRUGS@FDA", "EAFUS", "EC FLAVOURING SUBSTANCES", "ECHA (EC/EINECS)", "EMA LIST", "EMA REVIEW", "EP", "EPA", "EU CLINICAL TRIALS", "EUROPEAN PHARMACOPEIA", "EVMPD", "FACTS AND COMPARISIONS", "FADA BIVALVIA", "FDA APPROVED DRUG LABEL", "FDA GUIDANCE", "FEDERAL REGISTER", "FISHBASE", "FOOD LOVERS COMPANION", "GERANIUM TAXONOMIC INFORMATION SYSTEM", "GLOBAL BIODIVERSITY INFORMATION FACILITY", "GLOBAL COMPOSITAE CHECKLIST", "GLOMEROMYCOTA", "GREEN BOOK", "GRIN", "HANDBOOK OF FLAVOR INGREDIENTS", "HANDBOOK OF FLAVORS & FRAGRANCES", "HANDBOOK OF INORGANIC CHEMICALS", "HANDBOOK OF PHARMACEUTICAL ADDITIVES", "HANDBOOK OF PHARMACEUTICAL EXCIPIENTS", "HAWLEY CONDENSED CHEMICAL DICTIONARY", "HEALTH CANADA", "HERBAL MEDICINES", "HERBS OF COMMERCE", "HOMEOPATHIC PHARMACOPOEIA US", "HPE-KIBBE", "ICSAS", "ICTV", "ILDIS", "INCB", "INTELEOS", "INTERNATIONAL ORGANIZATION FOR PLANT INFORMATION", "INTERNATIONAL PLANT NAMES INDEX", "INVESTIGATOR BROCHURE", "ISO", "IT IS", "IUPHAR", "JA", "JAN", "JAPAN CHEMICAL SUBSTANCE DICTIONARY", "JAPANESE PHARMACOPOEIA", "JECFA", "JECFA: JOINT FAO/WHO COMMITTEE FOOD ADD", "KEGG", "KEW GARDENS (WCPS)", "KEW GARDENS FUNGI", "KNOVEL CONTENT", "LANDES MUSEUM BIOLOGIEZENTRUM", "LANGUAL", "LECYTHIDACEAE PAGES", "LEPINDEX", "LEUNG NATURAL INGREDIENTS", "LEUNGS ENCYLOPEDIA OF COMMON NATURAL INGREDIENTS 3RD ED.", "LEXI-COMP", "LIAS", "MANUFACTURER PRODUCT ", "MARTINDALE", "MATERIA MEDICA FOR CHINESE MEDICINE", "MDDR", "MEETING ABSTRACT", "MELASTOMATACEAE.NET", "MERCK INDEX", "MICROMEDEX", "MIRBASE", "MSDS", "MYCOBANK", "NCATS List", "NCBI", "NCI DRUG DICTIONARY", "NCI THESAURUS", "NCI_NDFRT", "NDA PUBLIC REVIEW", "NDF-RT", "NEW ZEALAND ORGANISMS REGISTER", "NIAID CHEMDB", "NIST WEBBOOK", "NLM", "NOMEN.EUMYCETOZOA.COM", "OMOP", "ORANGE BOOK", "ORPHAN DRUG", "ORTHOPTERA SPECIES FILE", "PARHOST", "PATENT", "PATTYS TOXICOLOGY", "PERSONAL CARE PRODUCTS COUNCIL", "PHARMACOPOEIA OF THE PEOPLE'S REPUBLIC OF CHINA", "PHARMAPROJECTS", "PLANT LIST", "PLANTS FOR A FUTURE", "PLOTKIN VACCINES", "PRODUCT PACKAGE INSERT", "RJB GERANIUM", "SAX DANGEROUS PROPERTIES", "SCALENET", "SIGMA-ALDRICH", "SITTIG HANDBOOK OF PESTICIDES", "SLOAN-KETT", "SOLANACEAE SOURCE", "SPECIALTY CHEMICALS", "SPIDCAT", "STN (SCIFINDER)", "SWEDISH SUBSTANCE LIST", "SWISS MEDIC", "SYSTEMA DIPTERORUM", "TIGR REPTILES", "TOBACCO KNOWLEDGE BASE", "TOX21", "TROPICOS", "UCSF-FDA TRANSPORTAL", "UNIPROT", "URMO", "USP", "USP DIETARY SUPPLEMENTS COMPENDIUM", "USP FOOD CHEMICALS CODEX", "USP HERBAL MEDICINES COMPENDIUM", "USP PHARMACOPOEIAL FORUM", "USP-MC", "USPNF", "VATC", + "WEBSITE", "WHO DRUG DICTIONARY", "WHO INTERNATIONAL PHARMACOPOEIA", + "WIKI", "WORLD BIODIVERSITY DATABASE", "WORLD PLANTS", "WORLD UMBELLIFER DATABASE", "WEB PAGE"], + "alwaysPrivate" : ["ANDA", "BLA", "EU-NCA (CBG-MEB)", "IND", "INTEGRITY SERVICES", "NDA"], + "referenceCitationPatterns" : [".*[^A-Z]IND[^A-Z]*[0-9][0-9][0-9]*.*"] + } + gsrs.validators.substances.CodesValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.CodesValidator", "newObjClass" = "ix.ginas.models.v1.Substance", - "order": 3500, + "order": 3400, "configClass" = "SubstanceValidatorConfig" } gsrs.validators.substances.ChemicalUniquenessValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.ChemicalUniquenessValidator", "newObjClass" = "ix.ginas.models.v1.Substance", - "order": 3300, + "order": 3500, "configClass" = "SubstanceValidatorConfig", "parameters"= {} } @@ -362,11 +380,17 @@ gsrs.validators.substances.ChemicalUniquenessValidator = # { # "validatorClass" = "ix.ginas.utils.validation.validators.CodeUniquenessValidator", # "newObjClass" = "ix.ginas.models.v1.Substance", -# "order": 3400, +# "order": 3600, # "configClass" = "SubstanceValidatorConfig", # "parameters"= {"singletonCodeSystems" =["CAS"]} # } + + + + + + spring.application.name=substance #logging.level.org.springframework.web=DEBUG @@ -663,26 +687,6 @@ gsrs.indexers.list=[ gsrs.search.substances.restrictDefaultToIdentifiers=true -gsrs.validators.substances += { - "validatorClass" = "ix.ginas.utils.validation.validators.SetReferenceAccess", - "newObjClass" = "ix.ginas.models.v1.Substance", - "configClass" = "SubstanceValidatorConfig", - - "suggestedPublic": ["ACD", "ALANWOOD", "ALGAEBASE", "AMERICAN BOTANICAL COUNCIL", "ANNONBASE", -"ATC INN", "ATCC", "AUSTRALIAN PLANT NAME INDEX", "BAN", "BIOPHARMA", "BIOS", "BIOSYSTEMATIC DATABASE of WORLD DIPTERA", -"BLATTODEA SPECIES", "BOOK", "BRASSICACEAE", "BRITISH PHARMACOPOEIA", "CAS", "CATALOGUE OF LIFE CHINA", "CENTER FOR DISEASE CONTROL", "CFR", -"CHEBI", "CHEMBANK", "CHEMID", "CHEMSPIDER", "CHENOBASE", "CHINESE HERBAL MEDICINE", "CLINICAL PHARMACOLOGY", "CLINICAL_TRIALS.GOV", "CLINICALTRIALS", "CODEX Alimentarius", "COMBINED CHEMICAL DICTIONARY", "CONIFER DATABASE", "CTD_TOXICOGENOMICS", "CVM GREEN BOOK", "DAILYMED", "DOSE", "DOTHIDEOMYCETES", "DROSERACEAE DATABASE", "DRUG PRODUCT LABEL", "DRUGS@FDA", "EAFUS", "EC FLAVOURING SUBSTANCES", "ECHA (EC/EINECS)", "EMA LIST", "EMA REVIEW", "EP", "EPA", "EU CLINICAL TRIALS", "EUROPEAN PHARMACOPEIA", "EVMPD", "FACTS AND COMPARISIONS", "FADA BIVALVIA", "FDA APPROVED DRUG LABEL", "FDA GUIDANCE", "FEDERAL REGISTER", "FISHBASE", "FOOD LOVERS COMPANION", "GERANIUM TAXONOMIC INFORMATION SYSTEM", "GLOBAL BIODIVERSITY INFORMATION FACILITY", "GLOBAL COMPOSITAE CHECKLIST", "GLOMEROMYCOTA", "GREEN BOOK", "GRIN", "HANDBOOK OF FLAVOR INGREDIENTS", "HANDBOOK OF FLAVORS & FRAGRANCES", "HANDBOOK OF INORGANIC CHEMICALS", "HANDBOOK OF PHARMACEUTICAL ADDITIVES", "HANDBOOK OF PHARMACEUTICAL EXCIPIENTS", "HAWLEY CONDENSED CHEMICAL DICTIONARY", "HEALTH CANADA", "HERBAL MEDICINES", "HERBS OF COMMERCE", "HOMEOPATHIC PHARMACOPOEIA US", "HPE-KIBBE", "ICSAS", "ICTV", "ILDIS", "INCB", "INTELEOS", "INTERNATIONAL ORGANIZATION FOR PLANT INFORMATION", "INTERNATIONAL PLANT NAMES INDEX", "INVESTIGATOR BROCHURE", "ISO", "IT IS", "IUPHAR", "JA", "JAN", "JAPAN CHEMICAL SUBSTANCE DICTIONARY", "JAPANESE PHARMACOPOEIA", "JECFA", "JECFA: JOINT FAO/WHO COMMITTEE FOOD ADD", "KEGG", "KEW GARDENS (WCPS)", "KEW GARDENS FUNGI", "KNOVEL CONTENT", "LANDES MUSEUM BIOLOGIEZENTRUM", "LANGUAL", "LECYTHIDACEAE PAGES", "LEPINDEX", "LEUNG NATURAL INGREDIENTS", "LEUNGS ENCYLOPEDIA OF COMMON NATURAL INGREDIENTS 3RD ED.", "LEXI-COMP", "LIAS", "MANUFACTURER PRODUCT ", "MARTINDALE", "MATERIA MEDICA FOR CHINESE MEDICINE", "MDDR", "MEETING ABSTRACT", "MELASTOMATACEAE.NET", "MERCK INDEX", "MICROMEDEX", "MIRBASE", "MSDS", "MYCOBANK", "NCATS List", "NCBI", "NCI DRUG DICTIONARY", "NCI THESAURUS", "NCI_NDFRT", "NDA PUBLIC REVIEW", "NDF-RT", "NEW ZEALAND ORGANISMS REGISTER", "NIAID CHEMDB", "NIST WEBBOOK", "NLM", "NOMEN.EUMYCETOZOA.COM", "OMOP", "ORANGE BOOK", "ORPHAN DRUG", "ORTHOPTERA SPECIES FILE", "PARHOST", "PATENT", "PATTYS TOXICOLOGY", "PERSONAL CARE PRODUCTS COUNCIL", "PHARMACOPOEIA OF THE PEOPLE'S REPUBLIC OF CHINA", "PHARMAPROJECTS", "PLANT LIST", "PLANTS FOR A FUTURE", "PLOTKIN VACCINES", "PRODUCT PACKAGE INSERT", "RJB GERANIUM", "SAX DANGEROUS PROPERTIES", "SCALENET", "SIGMA-ALDRICH", "SITTIG HANDBOOK OF PESTICIDES", "SLOAN-KETT", "SOLANACEAE SOURCE", "SPECIALTY CHEMICALS", "SPIDCAT", "STN (SCIFINDER)", "SWEDISH SUBSTANCE LIST", "SWISS MEDIC", "SYSTEMA DIPTERORUM", "TIGR REPTILES", "TOBACCO KNOWLEDGE BASE", "TOX21", "TROPICOS", "UCSF-FDA TRANSPORTAL", "UNIPROT", "URMO", "USP", "USP DIETARY SUPPLEMENTS COMPENDIUM", "USP FOOD CHEMICALS CODEX", "USP HERBAL MEDICINES COMPENDIUM", "USP PHARMACOPOEIAL FORUM", "USP-MC", "USPNF", "VATC", -"WEBSITE", "WHO DRUG DICTIONARY", "WHO INTERNATIONAL PHARMACOPOEIA", -"WIKI", "WORLD BIODIVERSITY DATABASE", "WORLD PLANTS", "WORLD UMBELLIFER DATABASE", "WEB PAGE"], - - "alwaysPrivate" : ["ANDA", "BLA", "EU-NCA (CBG-MEB)", "IND", "INTEGRITY SERVICES", "NDA"], - "referenceCitationPatterns" : [".*[^A-Z]IND[^A-Z]*[0-9][0-9][0-9]*.*"] - - } -#removed from suggestedPublic but not yet added to alwaysPrivate: CTP and DMF - - - gsrs.scheduled-tasks.list+= { "scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", "parameters" : { From 40e12c12e3be7fd87d46c775b843e94424147f29 Mon Sep 17 00:00:00 2001 From: alx652 Date: Tue, 5 Mar 2024 10:59:28 -0500 Subject: [PATCH 05/23] indexer configs from list to map --- .../src/main/resources/substances-core.conf | 186 ++++++++++++------ 1 file changed, 124 insertions(+), 62 deletions(-) diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index 4aecc38ee..dbb04de98 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -484,37 +484,48 @@ gsrs.resolvers.implementations =[ } ] -gsrs.entityProcessors=[ -{ -"entityClassName" = "ix.ginas.models.v1.Substance", -"processor" = "gsrs.module.substance.processors.SubstanceProcessor" -}, -#{ -#"entityClassName" = "ix.ginas.models.v1.Substance", -#"processor" = "gsrs.module.substance.processors.ChemicalStructurePropertiesProcessor" -#}, -{ -"entityClassName" = "ix.ginas.models.v1.Substance", -"processor" = "gsrs.module.substance.processors.PublicTagFlagger" -}, -{ -"entityClassName" = "ix.ginas.models.v1.Reference", -"processor" = "gsrs.module.substance.processors.ReferenceProcessor" -}, -{ -"entityClassName" = "ix.ginas.models.v1.Substance", -"processor" = "gsrs.module.substance.processors.RelationshipProcessor" -}, - -#{ -# "entityClassName" = "ix.ginas.models.v1.Substance", -# "processor" = "gsrs.module.substance.processors.ApprovalIdProcessor" -#}, -{ - "entityClassName" = "ix.ginas.models.v1.Substance", - "processor" = "gsrs.module.substance.processors.GroupProcessor" -} -] +gsrs.entityProcessors.SubstanceProcessor = + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.SubstanceProcessor", + "order" = 1000 + } +# gsrs.entityProcessors.ChemicalStructurePropertiesProcessor = +# { +# "entityClassName" = "ix.ginas.models.v1.Substance", +# "processor" = "gsrs.module.substance.processors.ChemicalStructurePropertiesProcessor", +# "order" = 2000 +# } +gsrs.entityProcessors.PublicTagFlagger = + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.PublicTagFlagger" + "order" = 3000 + } +gsrs.entityProcessors.ReferenceProcessor = + { + "entityClassName" = "ix.ginas.models.v1.Reference", + "processor" = "gsrs.module.substance.processors.ReferenceProcessor", + "order" = 4000 + } +gsrs.entityProcessors.RelationshipProcessor = + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.RelationshipProcessor", + "order" = 5000 + } +# gsrs.entityProcessors.ApprovalIdProcessor = +# { +# "entityClassName" = "ix.ginas.models.v1.Substance", +# "processor" = "gsrs.module.substance.processors.ApprovalIdProcessor", +# "order" = 6000 +# }, +gsrs.entityProcessors.GroupProcessor = + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.GroupProcessor", + "order" = 7000 + } gsrs.scheduled-tasks.list=[ @@ -596,64 +607,115 @@ ix.ginas.structure.search.includeModifications=true ix.ginas.structure.search.includeMixtures=true - - - -# What does this do? +# What does this do? AW I don't think this is included in the code logic gsrs.indexers.includeDefaultIndexers = false -gsrs.indexers.list=[ + +# start at 3000 +gsrs.indexers.list.DeprecatedIndexValueMaker = { -"indexer" = "gsrs.module.substance.indexers.DeprecatedIndexValueMaker", -"class" = "ix.ginas.models.v1.Substance", -}, + "indexer" = "gsrs.module.substance.indexers.DeprecatedIndexValueMaker", + "class" = "ix.ginas.models.v1.Substance", + "order" = 3000 +} + +# gsrs.indexers.list.ChemicalSubstanceStructureHashIndexValueMaker = # This should be unnecessary right now. May be used later -#{ -# "indexer" = "gsrs.module.substance.indexers.ChemicalSubstanceStructureHashIndexValueMaker", -#}, +# { +# "indexer" = "gsrs.module.substance.indexers.ChemicalSubstanceStructureHashIndexValueMaker", +# "order" = 3100 +# }, +gsrs.indexers.list.InchiKeyIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.InchiKeyIndexValueMaker", -}, +"order" = 3200 +} +gsrs.indexers.list.SubstanceFacetStatusIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.SubstanceFacetStatusIndexValueMaker", -}, +"order" = 3300 +} +gsrs.indexers.list.SubstanceDefinitionalHashIndexer = { "indexer" = "gsrs.module.substance.indexers.SubstanceDefinitionalHashIndexer", -}, +"order" = 3400 +} +gsrs.indexers.list.RecordAccessIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.RecordAccessIndexValueMaker", -}, +"order" = 3500 +} +gsrs.indexers.list.MolecularWeightPropertyIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.MolecularWeightPropertyIndexValueMaker", -}, +"order" = 3600 +} +gsrs.indexers.list.MoietyTypeIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.MoietyTypeIndexValueMaker", -}, +"order" = 3700 +} +gsrs.indexers.list.MixtureStructureHashIndexValueMaker = { -"indexer" = "gsrs.module.substance.indexers.MixtureStructureHashIndexValueMaker" -}, +"indexer" = "gsrs.module.substance.indexers.MixtureStructureHashIndexValueMaker", +"order" = 3800 +} +gsrs.indexers.list.ATCIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.ATCIndexValueMaker", -}, +"order" = 3900 +} +gsrs.indexers.list.BracketTermIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.BracketTermIndexValueMaker", -}, +"order" = 4000 +} +gsrs.indexers.list.SDGIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.SDGIndexValueMaker", -}, +"order" = 4100 +} +gsrs.indexers.list.SubstanceBasicsIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.SubstanceBasicsIndexValueMaker", -}, +"order" = 4200 +} +gsrs.indexers.list.UserSavedListIndexValueMaker = { "indexer" = "gsrs.module.substance.indexers.UserSavedListIndexValueMaker", -}, - {"indexer" = "gsrs.imports.indexers.MetadataSourceIndexValueMaker"}, - {"indexer" = "gsrs.imports.indexers.RawDataImportMetadataIndexValueMaker"}, - {"indexer" = "gsrs.imports.indexers.MetadataMatchCountIndexValueMaker"}, - {"indexer" = "gsrs.imports.indexers.MetadataStatusIndexValueMaker"}, - {"indexer" = "gsrs.imports.indexers.MetadataValidationIndexValueMaker"}, - {"indexer" = "gsrs.imports.indexers.ImportMetadataBasicsIndexValueMaker"} -] +"order" = 4300 +} +gsrs.indexers.list.MetadataSourceIndexValueMaker = +{ +"indexer" = "gsrs.imports.indexers.MetadataSourceIndexValueMaker", +"order" = 4400 +} +gsrs.indexers.list.RawDataImportMetadataIndexValueMaker = +{ +"indexer" = "gsrs.imports.indexers.RawDataImportMetadataIndexValueMaker", +"order" = 4500 +} +gsrs.indexers.list.MetadataMatchCountIndexValueMaker = +{ +"indexer" = "gsrs.imports.indexers.MetadataMatchCountIndexValueMaker" +"order" = 4600 +} +gsrs.indexers.list.MetadataStatusIndexValueMaker = +{ +"indexer" = "gsrs.imports.indexers.MetadataStatusIndexValueMaker" +"order" = 4700 +} +gsrs.indexers.list.MetadataValidationIndexValueMaker = +{ +"indexer" = "gsrs.imports.indexers.MetadataValidationIndexValueMaker", +"order" = 4800 +} +gsrs.indexers.list.ImportMetadataBasicsIndexValueMaker = +{ +"indexer" = "gsrs.imports.indexers.ImportMetadataBasicsIndexValueMaker", +"order" = 4700 +} + # Example report. Change the SQL and path to suit your needs #gsrs.scheduled-tasks.list+= From 131c8fb9bdfaa361ca08cbc39eb6c1897f53c24b Mon Sep 17 00:00:00 2001 From: alx652 Date: Tue, 5 Mar 2024 17:53:28 -0500 Subject: [PATCH 06/23] config list to map - tasks config --- .../src/main/resources/substances-core.conf | 57 +++++++++++++------ 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index dbb04de98..a7acc31e1 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -528,76 +528,95 @@ gsrs.entityProcessors.GroupProcessor = } -gsrs.scheduled-tasks.list=[ +gsrs.scheduled-tasks.list.ReindexTaskInitializer = { "scheduledTaskClass" : "gsrs.module.substance.tasks.ReindexTaskInitializer", + "order" = 1000, "parameters" : { "autorun": false } - }, + } + +gsrs.scheduled-tasks.list.StructureRecalcTaskInitializer = { "scheduledTaskClass" : "gsrs.module.substance.tasks.StructureRecalcTaskInitializer", + "order" = 1100, "parameters" : { "autorun": false } - }, + } +gsrs.scheduled-tasks.list.RebackupTaskInitializer = { "scheduledTaskClass" : "gsrs.module.substance.tasks.RebackupTaskInitializer", + "order" = 1200, "parameters" : { "autorun": false, "description" : "Re-backup all Substance entities", "repositoryClass" : "gsrs.module.substance.repository.SubstanceRepository" } - }, + } +gsrs.scheduled-tasks.list.ChronicStackDumper = { "scheduledTaskClass" : "gsrs.module.substance.tasks.ChronicStackDumper", + "order" = 1300, "parameters" : { "autorun": false, "dateFormat" : "yyyy.MMMM.dd hh:mm:ss a", #any valid Java 8 DateTimeFormatter "cron":"0 0/3 * * * ?", #every 3 mins "outputPath" : "logs/all-running-stacktraces.log" } - }, + } +gsrs.scheduled-tasks.list.DataRecorder = { - "scheduledTaskClass" : "gsrs.module.substance.tasks.DataRecorder" + "scheduledTaskClass" : "gsrs.module.substance.tasks.DataRecorder", + "order" = 1400, "parameters" : { "autorun": false, "dateFormat" : "yyyy.MMMM.dd hh:mm:ss a", #any valid Java 8 DateTimeFormatter "cron":"0/10 * * * * ?", #every 10 seconds "outputPath" : "logs/datarecorder.log" } - }, + } + +gsrs.scheduled-tasks.list.ImportMetadataReindexTask = { "scheduledTaskClass" : "gsrs.dataexchange.tasks.ImportMetadataReindexTask", + "order" = 1500, "parameters": { "autorun": false } - }, + } +gsrs.scheduled-tasks.list.SubstanceRefTaskInitializer = { #fixes "scheduledTaskClass" : "gsrs.module.substance.tasks.SubstanceRefTaskInitializer", + "order" = 1600, "parameters" : { "autorun": false, "refUuidCodeSystem" :"UUID Code", "reportFilePath" :"logs/substance_reference_report.txt", "refApprovalIdCodeSystem" : "FDA UNII" } - }, + } +gsrs.scheduled-tasks.list.CalculateMatchablesScheduledTask = { "scheduledTaskClass" : "gsrs.dataexchange.tasks.CalculateMatchablesScheduledTask", + "order" = 1700, "parameters" : { "autorun": false, "threadCount": 5 # Use max 5 threads, if null or <1 this will use all threads available } - }, + } +gsrs.scheduled-tasks.list.CalculateStagingAreaMatchablesScheduledTask = { + "order" = 1800, "scheduledTaskClass" : "gsrs.tasks.CalculateStagingAreaMatchablesScheduledTask", "parameters" : { "autorun": false, "threadCount": 5 # Use max 5 threads, if null or <1 this will use all threads available } } -] + # turn on polymer, mixture and modifcation searches for structure searches @@ -718,9 +737,10 @@ gsrs.indexers.list.ImportMetadataBasicsIndexValueMaker = # Example report. Change the SQL and path to suit your needs -#gsrs.scheduled-tasks.list+= +# gsrs.scheduled-tasks.list.SQLReportScheduledTaskInitializer = # { # "scheduledTaskClass" : "gsrs.module.substance.tasks.SQLReportScheduledTaskInitializer", +# "order" = 1900, # "parameters" : { # "autorun": true, # "sql": "select s.uuid, dtype, s.current_version, s.created, c.code, c.code_system from ix_ginas_substance s, ix_ginas_code c where s.uuid = c.owner_uuid and c.type= 'PRIMARY'", @@ -734,9 +754,10 @@ gsrs.indexers.list.ImportMetadataBasicsIndexValueMaker = # } # Example SPL report. Change the SPL settings to suit your needs -#gsrs.scheduled-tasks.list+= +# gsrs.scheduled-tasks.list.SplExportInitializer = # { # "scheduledTaskClass" : "gsrs.module.substance.tasks.SplExportInitializer", +# "order" = 2000, # "parameters" : { # "autorun": true, # "username":"admin", @@ -749,8 +770,10 @@ gsrs.indexers.list.ImportMetadataBasicsIndexValueMaker = gsrs.search.substances.restrictDefaultToIdentifiers=true -gsrs.scheduled-tasks.list+= { +gsrs.scheduled-tasks.list.NameStandardizerTaskInitializer_RISN = +{ "scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", + "order" = 2100 "parameters" : { "nameStandardizerClassName": "gsrs.module.substance.standardizer.FDAFullNameStandardizer", "autorun": false, @@ -761,8 +784,10 @@ gsrs.scheduled-tasks.list+= { } } -gsrs.scheduled-tasks.list+= { -"scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", +gsrs.scheduled-tasks.list.NameStandardizerTaskInitializer_FISN = +{ + "scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", + "order" = 2200, "parameters" : { "nameStandardizerClassName": "gsrs.module.substance.standardizer.FDAFullNameStandardizer", "autorun": false, From 6282bd140aab86ee6671b5b37df6e695f81d33ac Mon Sep 17 00:00:00 2001 From: alx652 Date: Thu, 7 Mar 2024 17:12:53 -0500 Subject: [PATCH 07/23] config list to map exporters part 1 --- .../src/main/resources/substances-core.conf | 75 +++++++++++++++---- 1 file changed, 62 insertions(+), 13 deletions(-) diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index a7acc31e1..cd53b2938 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -419,26 +419,75 @@ ix.gsrs.delimitedreports.inchikeysforambiguousstereo=true #if more than one Exporter supports the same file extension, #the class in the list that supports it fist wins. -ix.ginas.export.factories.substances = [ - #"gsrs.module.substance.ExtraColumnsSpreadsheetExporterFactory", - #"gsrs.module.substance.exporters.SdfExporterFactory", - "gsrs.module.substance.exporters.DefaultSubstanceSpreadsheetExporterFactory", - "gsrs.module.substance.exporters.JsonExporterFactory", - #"ix.ginas.exporters.FDANameExporterFactory", - #"ix.ginas.exporters.FDACodeExporterFactory", -# "ix.ginas.exporters.SPLValidatorXMLExporterFactory", - # "ix.ginas.exporters.SRSLegacyDictionaryExporterFactory" + +# We need to eliminate this way of configuring exports +XXXX_ix.ginas.export.factories.substances_XXXX = [ + # "gsrs.module.substance.ExtraColumnsSpreadsheetExporterFactory", + # "gsrs.module.substance.exporters.SdfExporterFactory", + # "gsrs.module.substance.exporters.DefaultSubstanceSpreadsheetExporterFactory", + # "gsrs.module.substance.exporters.JsonExporterFactory", + # "ix.ginas.exporters.FDANameExporterFactory", + # "ix.ginas.exporters.FDACodeExporterFactory", + # "ix.ginas.exporters.SPLValidatorXMLExporterFactory", + # "ix.ginas.exporters.SRSLegacyDictionaryExporterFactory" ] -ix.ginas.export.exporterfactories.substances = [ +ix.ginas.export.exporterfactories.substances.DefaultSubstanceSpreadsheetExporterFactory = { - "exporterFactoryClass" : "gsrs.module.substance.exporters.SdfExporterFactory", + "exporterFactoryClass" = "gsrs.module.substance.exporters.DefaultSubstanceSpreadsheetExporterFactory", + "order" = 1000, "parameters":{ - "approvalIDName": "UNII" } } -] +ix.ginas.export.exporterfactories.substances.JsonExporterFactory = + { + "exporterFactoryClass" = "gsrs.module.substance.exporters.JsonExporterFactory", + "order" = 1100, + "parameters":{ + } + } +ix.ginas.export.exporterfactories.substances.FDANameExporterFactory = + { + "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDANameExporterFactory", + "order" = 1200, + "disabled" = true, + "parameters":{ + } + } +ix.ginas.export.exporterfactories.substances.FDACodeExporterFactory = + { + "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDACodeExporterFactory", + "order" = 1300, + "disabled" = true, + "parameters":{ + } + } +ix.ginas.export.exporterfactories.substances.SPLValidatorXMLExporterFactory = + { + "exporterFactoryClass" = "fda.gsrs.substance.exporters.SPLValidatorXMLExporterFactory", + "order" = 1400, + "disabled" = true, + "parameters":{ + } + } +ix.ginas.export.exporterfactories.substances.SRSLegacyDictionaryExporterFactory = + { + "exporterFactoryClass" = "fda.gsrs.substance.exporters.SRSLegacyDictionaryExporterFactory", + "order" = 1500, + "disabled" = true, + "parameters":{ + } + } + +ix.ginas.export.exporterfactories.substances.SdfExporterFactory = + { + "exporterFactoryClass" = "gsrs.module.substance.exporters.SdfExporterFactory", + "order" = 1600, + "parameters":{ + "approvalIDName": "UNII" + } + } substance.definitional-elements.implementations =[ { From 6dfc51bd45b1cc36cb067a0220584cbb706e0bc5 Mon Sep 17 00:00:00 2001 From: alx652 Date: Fri, 8 Mar 2024 17:35:00 -0500 Subject: [PATCH 08/23] import adapters config list top hocon --- .../src/main/resources/substances-core.conf | 290 ++++++++++++++++++ 1 file changed, 290 insertions(+) diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index cd53b2938..fa86ee9f2 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -877,6 +877,8 @@ gsrs.standardizers.substances = { # code_import:'gsrs.module.substance.importers.CodeExtractorActionFactory', # common_name:'gsrs.module.substance.importers.NameExtractorActionFactory'} + +#### This was in substances-core.conf but is different than what was in application.conf # gsrs.importAdapterFactories.substances = [] # gsrs.importAdapterFactories.substances += { # "importAdapterFactoryClass" = "gsrs.module.substance.importers.SDFImportAdapterFactory", @@ -918,6 +920,294 @@ gsrs.standardizers.substances = { # } # this is the length to expect the column to be # for names after truncation + + +#### AW: this was copied from application.conf for others' testing purposes +#### Infuture we may want this in substances-core.conf as it can be overridden +### need to reconcile the various ways this stuff is configured in different places. + +gsrs.importAdapterFactories.substances.SDFImportAdapterFactory = + { + "adapterName": "SDF Adapter", + "importAdapterFactoryClass": "gsrs.module.substance.importers.SDFImportAdapterFactory", + "order": 1000, + "stagingAreaServiceClass": "gsrs.stagingarea.service.DefaultStagingAreaService", + "entityServiceClass" :"gsrs.dataexchange.SubstanceStagingAreaEntityService", + "description" : "SD file importer for general users", + "supportedFileExtensions": [ + "sdf", + "sd", + "sdfile" + ], + + "parameters": { + #the things used to instantiate a thing used to do the import + + "fileImportActions": [ + ##list of available actions for user to select from + #each action takes in a file record + a substance record to update substance record with data from file + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.NameExtractorActionFactory", + "fields": [ + { + "fieldName": "Name", + "fieldLabel": "Substance Name", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + }, + { + "fieldName": "nameType", + "fieldLabel": "Name Type", + "defaultValue": "cn", + "cv": "name_type", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "displayName", + "fieldLabel": "Display Name?", + "defaultValue": false, + "fieldType": "java.lang.Boolean", + "expectedToChange": true, + "required": false, + "lookupKey": null + } + ], + "parameters": { + "lang": "en" + }, + "actionName": "common_name", + "label":"Create Name" + }, + { + "actionName": "code_import", + "label":"Create Code", + "actionClass": "gsrs.module.substance.importers.importActionFactories.CodeExtractorActionFactory", + "fields": [ + { + "fieldName": "code", + "fieldLabel": "Code/Identifier", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + }, + { + "fieldName": "codeType", + "fieldLabel": "Primary or Alternative", + "defaultValue": "PRIMARY", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "codeSystem", + "fieldLabel": "Code System", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + } + ], + "parameters": { + } + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.NSRSCustomCodeExtractorActionFactory", + "fields": [ + { + "fieldName": "code", + "fieldLabel": "NSC Number", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + }, + { + "fieldName": "codeType", + "fieldLabel": "Primary or Alternative", + "defaultValue": "PRIMARY", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + } + ], + "parameters": { + "codeSystem": "NSC" + }, + "actionName": "nci_import", + "label":"Create NSC Code" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.StructureExtractorActionFactory", + "fields": [ + { + "fieldName": "molfile", + "fieldLabel": "Structure", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + } + ], + "parameters": { + + }, + "actionName": "structure_and_moieties", + "label":"Create Structure" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.PropertyExtractorActionFactory", + "fields": [ + { + "fieldName": "name", + "fieldLabel": "Name", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + }, + { + "fieldName": "propertyType", + "fieldLabel": "Property Type", + "defaultValue": "chemical", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "valueAverage", + "fieldLabel": "Average Value", + "defaultValue": null, + "fieldType": "java.lang.Double", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "valueNonNumeric", + "fieldLabel": "Non-numeric Value", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "valueUnits", + "fieldLabel": "Units", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + } + ], + "parameters": { + }, + "actionName": "property_import", + "label":"Create Chemical Property" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.ReferenceExtractorActionFactory", + "fields": [ + { + "fieldName": "docType", + "fieldLabel": "Type", + "defaultValue": "OTHER", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + }, + { + "fieldName": "citation", + "fieldLabel": "Reference", + "defaultValue": "{INSERT REFERENCE CITATION HERE}", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + } + ], + "parameters": { + + }, + "actionName": "public_reference", + "label":"Create Reference" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.NotesExtractorActionFactory", + "fields": [ + { + "fieldName": "note", + "fieldLabel": "Note", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + } + ], + "parameters": { + }, + "actionName": "note_import", + "label":"Create Note" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.NoOpActionFactory", + "fields": [ + { + "fieldName": "fieldName", + "fieldLabel": "Field to ignore", + "fieldType": "java.lang.String", + "expectedToChange": true, + "lookupKey": null + } + ], + "parameters": { + }, + "actionName": "no-op", + "label":"Omit this field" + } + ] + } + } + +gsrs.importAdapterFactories.substances.GSRSJSONImportAdapterFactory = + { + "adapterName": "GSRS JSON Adapter", + "importAdapterFactoryClass": "gsrs.module.substance.importers.GSRSJSONImportAdapterFactory", + "order": 1100, + "stagingAreaServiceClass": "gsrs.stagingarea.service.DefaultStagingAreaService", + "entityServiceClass" :"gsrs.dataexchange.SubstanceStagingAreaEntityService", + "description" : "GSRS legacy JSON file importer", + #extensions belong here because they can override the default set within the class + "supportedFileExtensions": [ + "gsrs", + "gz" + ], + "parameters": { + } + } + + + + + gsrs.substance.data.nameColumnLength=254 From 17207d02d9c6672dd874dd475db7cc3efb94e40c Mon Sep 17 00:00:00 2001 From: alx652 Date: Wed, 13 Mar 2024 17:54:06 -0400 Subject: [PATCH 09/23] matchable calcs configs and try to fix some tests --- ...DefaultImportAdapterFactoryConfigTest.java | 10 ++-- .../imports/StagingAreaServiceTest.java | 17 +++--- .../src/main/resources/substances-core.conf | 53 +++++++++++++++++++ 3 files changed, 70 insertions(+), 10 deletions(-) diff --git a/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java b/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java index bd53ce685..30d3d9942 100644 --- a/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java +++ b/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java @@ -34,16 +34,20 @@ public void testSetup() throws IllegalAccessException, NoSuchFieldException, Jso String substanceContext = "substances"; //build up a complete configuration GsrsFactoryConfiguration config = new GsrsFactoryConfiguration(); - Map>> adapterConfig = new HashMap<>(); + Map>> adapterConfig = new HashMap<>(); Map oneAdapter = new HashMap<>(); oneAdapter.put("importAdapterFactoryClass", "gsrs.module.substance.importers.SDFImportAdapterFactory"); + oneAdapter.put("order", 1000); + oneAdapter.put("key", "SDFImportAdapterFactory"); oneAdapter.put("adapterName", "NSRS SDF Adapter"); oneAdapter.put("extensions", Arrays.asList("sdf", "sd")); oneAdapter.put("parameters", buildConfigParameters()); oneAdapter.put("stagingAreaServiceClass", gsrs.stagingarea.service.DefaultStagingAreaService.class); oneAdapter.put("entityServiceClass", "gsrs.dataexchange.SubstanceStagingAreaEntityService"); - List> adapters = new ArrayList<>(); - adapters.add(oneAdapter); + Map> adapters = new HashMap<>(); + // ix.ginas.export.exporterfactories.substances.SdfExporterFactory = + adapters.put("SDFImportAdapterFactory", oneAdapter); + adapterConfig.put(substanceContext, adapters); config.setImportAdapterFactories(adapterConfig); ConfigBasedGsrsImportAdapterFactoryFactory factoryFactory = new ConfigBasedGsrsImportAdapterFactoryFactory(); diff --git a/gsrs-module-substance-example/src/test/java/example/imports/StagingAreaServiceTest.java b/gsrs-module-substance-example/src/test/java/example/imports/StagingAreaServiceTest.java index 4089adc72..6fcc34574 100644 --- a/gsrs-module-substance-example/src/test/java/example/imports/StagingAreaServiceTest.java +++ b/gsrs-module-substance-example/src/test/java/example/imports/StagingAreaServiceTest.java @@ -29,37 +29,40 @@ public class StagingAreaServiceTest extends AbstractSubstanceJpaEntityTest { @BeforeEach public void setup() throws NoSuchFieldException, IllegalAccessException { + // gsrs.matchableCalculators.substances.KEY = + + if( stagingAreaService == null ){ log.trace("setting up staging area service"); stagingAreaService = new DefaultStagingAreaService(); stagingAreaService = AutowireHelper.getInstance().autowireAndProxy(stagingAreaService); - Map>> matchableCalculatorConfig = new HashMap<>(); - List> configs = new ArrayList<>(); + Map>> matchableCalculatorConfig = new HashMap<>(); + Map> configs = new HashMap<>(); Map casExtractor = new HashMap<>(); casExtractor.put("matchableCalculationClass", CASNumberMatchableExtractor.class); LinkedHashMap config= new LinkedHashMap<>(); config.put("casCodeSystems", Arrays.asList("CAS", "CASNo", "CASNumber")); casExtractor.put("config", config); - configs.add(casExtractor); + configs.put("CASNumberMatchableExtractor", casExtractor); Map namesExtractor = new HashMap<>(); namesExtractor.put("matchableCalculationClass", AllNamesMatchableExtractor.class); - configs.add(namesExtractor); + configs.put("AllNamesMatchableExtractor", namesExtractor); Map defHashExtractor = new HashMap<>(); defHashExtractor.put("matchableCalculationClass", DefinitionalHashMatchableExtractor.class); - configs.add(defHashExtractor); + configs.put("DefinitionalHashMatchableExtractor", defHashExtractor); Map selectedCodesExtractor = new HashMap<>(); selectedCodesExtractor.put("matchableCalculationClass", SelectedCodesMatchableExtractor.class); LinkedHashMap config2= new LinkedHashMap<>(); config2.put("codeSystems", Arrays.asList("CAS", "ChemBL", "NCI", "NSC", "EINECS")); selectedCodesExtractor.put("config", config2); - configs.add(selectedCodesExtractor); + configs.put("SelectedCodesMatchableExtractor", selectedCodesExtractor); Map uuidExtractor = new HashMap<>(); uuidExtractor.put("matchableCalculationClass", UUIDMatchableExtractor.class); - configs.add(uuidExtractor); + configs.put("UUIDMatchableExtractor", uuidExtractor); matchableCalculatorConfig.put("substances", configs); SubstanceStagingAreaEntityService stagingAreaEntityService = new SubstanceStagingAreaEntityService(); diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index fa86ee9f2..5f7c83335 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -1230,7 +1230,60 @@ gsrs.processing-strategy = { +## This is what mitch had for matchables, this was not included in previous substances-core.conf +## decide if this should be included after testing. +gsrs.matchableCalculators.substances.CASNumberMatchableExtractor = + { + "matchableCalculationClass" : "gsrs.dataexchange.extractors.CASNumberMatchableExtractor", + "order": 1000, + "config": { + "casCodeSystems": ["CAS", "CASNo", "CASNumber"] + } + } +gsrs.matchableCalculators.substances.AllNamesMatchableExtractor = + { + "matchableCalculationClass" : "gsrs.dataexchange.extractors.AllNamesMatchableExtractor", + "order": 1100, + "config" :{} + } +gsrs.matchableCalculators.substances.ApprovalIdMatchableExtractor = + { + "matchableCalculationClass" : "gsrs.dataexchange.extractors.ApprovalIdMatchableExtractor", + "order": 1200, + "config" :{} + } +gsrs.matchableCalculators.substances.DefinitionalHashMatchableExtractor = + { + "matchableCalculationClass" : "gsrs.dataexchange.extractors.DefinitionalHashMatchableExtractor", + "order": 1300, + "config" :{} + } +gsrs.matchableCalculators.substances.SelectedCodesMatchableExtractor = + { + "matchableCalculationClass" : "gsrs.dataexchange.extractors.SelectedCodesMatchableExtractor", + "order": 1400, + "config": { + "codeSystems" :["CAS", "ChemBL", "NCI", "NSC", "EINECS"] + } + } +gsrs.matchableCalculators.substances.UUIDMatchableExtractor = + { + "matchableCalculationClass" : "gsrs.dataexchange.extractors.UUIDMatchableExtractor", + "order": 1500, + "config" :{} + } +gsrs.matchableCalculators.substances.CodeMatchableExtractor = + { + "matchableCalculationClass" : "gsrs.dataexchange.extractors.CodeMatchableExtractor", + "order": 1600, + "disabled": true, + "config": { + "reqCodeSystems": ["FDA UNII"], + "codeType": "PRIMARY", + "codeKey": "CODE" + } + } From d489f220976afa596a3bbaeb2d094a72dd018057 Mon Sep 17 00:00:00 2001 From: alx652 Date: Wed, 13 Mar 2024 23:07:36 -0400 Subject: [PATCH 10/23] config list to map, registered functions --- .../src/main/resources/substances-core.conf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index 5f7c83335..778d122cb 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -399,14 +399,17 @@ server.servlet-path=/loop-service server.use-forward-headers=true -ix.api.registeredfunctions =${ix.api.registeredfunctions}[ +ix.api.registeredfunctions.InChIRegisteredFunction = { - "class":"ix.core.util.pojopointer.extensions.InChIRegisteredFunction" - }, + "registeredFunctionClass": "ix.core.util.pojopointer.extensions.InChIRegisteredFunction", + "order": 1500, + } +ix.api.registeredfunctions.InChIRegisteredFunction = { - "class":"ix.core.util.pojopointer.extensions.InChIFullRegisteredFunction" + "registeredFunctionClass":"ix.core.util.pojopointer.extensions.InChIFullRegisteredFunction" + "order": 1600, } -] + substance.renderer.style="CONF" substance.renderer.configPath="substances-default-renderer.json" From 6d230c17ca4b6d9aa81345c61d833c3d94d24759 Mon Sep 17 00:00:00 2001 From: alx652 Date: Thu, 14 Mar 2024 12:27:09 -0400 Subject: [PATCH 11/23] correction in config --- .../src/main/resources/substances-core.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index 778d122cb..13fe0eb6f 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -402,9 +402,9 @@ server.use-forward-headers=true ix.api.registeredfunctions.InChIRegisteredFunction = { "registeredFunctionClass": "ix.core.util.pojopointer.extensions.InChIRegisteredFunction", - "order": 1500, + "order": 1500 } -ix.api.registeredfunctions.InChIRegisteredFunction = +ix.api.registeredfunctions.InChIFullRegisteredFunction = { "registeredFunctionClass":"ix.core.util.pojopointer.extensions.InChIFullRegisteredFunction" "order": 1600, From 025dafde3d472d7c7bb65127ba02d01cccba3fc3 Mon Sep 17 00:00:00 2001 From: alx652 Date: Thu, 14 Mar 2024 22:11:34 -0400 Subject: [PATCH 12/23] config changes to help tests work --- .../src/main/resources/fda-extension.conf | 74 +++++++++++++------ .../indexer/ExampleValueMakerTest.java | 1 + .../ConfigurableMolweightProcessorTest.java | 1 + .../src/test/resources/application-test.conf | 19 +++-- 4 files changed, 67 insertions(+), 28 deletions(-) diff --git a/gsrs-module-substance-example/src/main/resources/fda-extension.conf b/gsrs-module-substance-example/src/main/resources/fda-extension.conf index e53091216..1ac931253 100644 --- a/gsrs-module-substance-example/src/main/resources/fda-extension.conf +++ b/gsrs-module-substance-example/src/main/resources/fda-extension.conf @@ -24,9 +24,11 @@ gsrs.microservice.clinicaltrialseurope.api.headers= { "auth-key"="myKey" } -gsrs.entityProcessors +={ +gsrs.entityProcessors.UniqueCodeGenerator = + { "entityClassName" = "ix.ginas.models.v1.Substance", "processor" = "gsrs.module.substance.processors.UniqueCodeGenerator", + "order" = 8010, "with"= { "useLegacy"=true, "codesystem"="BDNUM", @@ -39,34 +41,64 @@ gsrs.entityProcessors +={ } } -gsrs.entityProcessors += - { - "entityClassName" = "ix.ginas.models.v1.Substance", - "processor" = "gsrs.module.substance.processors.ApprovalIdProcessor", - "parameters" = { - "codeSystem" = "FDA UNII" +gsrs.entityProcessors.ApprovalIdProcessor = + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.ApprovalIdProcessor", + "order" = 6010 } + + + + + +# can we remove this section since all these are in substances-core.conf? +ix.ginas.export.exporterfactories.substances.FDANameExporterFactory = + { + "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDANameExporterFactory", + "order" = 1200, + "disabled" = true, + "parameters":{ + } + } +ix.ginas.export.exporterfactories.substances.FDACodeExporterFactory = + { + "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDACodeExporterFactory", + "order" = 1300, + "disabled" = true, + "parameters":{ } + } +ix.ginas.export.exporterfactories.substances.SPLValidatorXMLExporterFactory = + { + "exporterFactoryClass" = "fda.gsrs.substance.exporters.SPLValidatorXMLExporterFactory", + "order" = 1400, + "disabled" = true, + "parameters":{ + } + } +ix.ginas.export.exporterfactories.substances.SRSLegacyDictionaryExporterFactory = + { + "exporterFactoryClass" = "fda.gsrs.substance.exporters.SRSLegacyDictionaryExporterFactory", + "order" = 1500, + "disabled" = true, + "parameters":{ + } + } -ix.ginas.export.factories.substances = ${ix.ginas.export.factories.substances}[ - #"gsrs.module.substance.ExtraColumnsSpreadsheetExporterFactory", - "fda.gsrs.substance.exporters.FDANameExporterFactory", - "fda.gsrs.substance.exporters.FDACodeExporterFactory", - "fda.gsrs.substance.exporters.SPLValidatorXMLExporterFactory", - "fda.gsrs.substance.exporters.SRSLegacyDictionaryExporterFactory", - - # "ix.ginas.exporters.SRSLegacyDictionaryExporterFactory" -] -ix.ginas.approvalIdGenerator.generatorClass=ix.ginas.utils.UNIIGenerator -gsrs.validators.substances += { +ix.ginas.approvalIdGenerator.generatorClass=ix.ginas.utils.UNIIGenerator - "validatorClass" = "fda.gsrs.substance.validators.BdNumModificationValidator", - "newObjClass" = "ix.ginas.models.v1.Substance" - } + +gsrs.validators.substances.BdNumModificationValidator = + { + "validatorClass" = "fda.gsrs.substance.validators.BdNumModificationValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 1010 + } diff --git a/gsrs-module-substance-example/src/test/java/example/substance/indexer/ExampleValueMakerTest.java b/gsrs-module-substance-example/src/test/java/example/substance/indexer/ExampleValueMakerTest.java index 4dc007f52..73d113889 100644 --- a/gsrs-module-substance-example/src/test/java/example/substance/indexer/ExampleValueMakerTest.java +++ b/gsrs-module-substance-example/src/test/java/example/substance/indexer/ExampleValueMakerTest.java @@ -114,6 +114,7 @@ public void addExternalActiveMoietyShouldResultInChildSubstanceTag(){ }) .generateNewUUID() + // test fails here, seems to be cdk layout error .build(); this.testIndexableValuesHasFacet(childSub, ExampleValueMaker.MOIETY_TYPE_FACET, ExampleValueMaker.CHILD_SUBSTANCE_RELATIONSHIP); diff --git a/gsrs-module-substance-example/src/test/java/example/substance/processor/ConfigurableMolweightProcessorTest.java b/gsrs-module-substance-example/src/test/java/example/substance/processor/ConfigurableMolweightProcessorTest.java index b3b7ab4e3..f44c3c11c 100644 --- a/gsrs-module-substance-example/src/test/java/example/substance/processor/ConfigurableMolweightProcessorTest.java +++ b/gsrs-module-substance-example/src/test/java/example/substance/processor/ConfigurableMolweightProcessorTest.java @@ -106,6 +106,7 @@ public void testComplexMwCalcProperty() throws IOException { ChemicalSubstanceBuilder builder = new ChemicalSubstanceBuilder(); builder.addName("benzene") .setStructureWithDefaultReference("C[N+](C)(C)C.[O-]C(=O)c1ccc2ncccc2c1"); + // test fails here, seems to be cdk layout error ChemicalSubstance chemical = builder.build(); processor.prePersist(chemical); Property mwProp = chemical.properties.stream() diff --git a/gsrs-module-substance-example/src/test/resources/application-test.conf b/gsrs-module-substance-example/src/test/resources/application-test.conf index aaf7f875c..51af98bc8 100644 --- a/gsrs-module-substance-example/src/test/resources/application-test.conf +++ b/gsrs-module-substance-example/src/test/resources/application-test.conf @@ -43,7 +43,7 @@ logging.level.ix.core.EntityFetcher=OFF #logging.level.root=OFF #logging.level.gsrs.module.substance.scrubbers=trace #logging.level.example.exports.scrubbers=trace - +spring.datasource.driverClassName=org.h2.Driver spring.jpa.database-platform=org.hibernate.dialect.H2Dialect spring.jpa.defer-datasource-initialization=true @@ -57,12 +57,15 @@ gsrs.standardizers.substances = { } } -gsrs.importAdapterFactories.substances = - [ + +# reconcile how this stuff is configured +gsrs.importAdapterFactories.substances = {} +gsrs.importAdapterFactories.substances.SDFImportAdapterFactory = { "adapterName": "SDF Adapter", "importAdapterFactoryClass": "gsrs.module.substance.importers.SDFImportAdapterFactory", + "order": 1000, "stagingAreaServiceClass": "gsrs.stagingarea.service.DefaultStagingAreaService", "entityServiceClass" :"gsrs.dataexchange.SubstanceStagingAreaEntityService", "description" : "SD file importer for general users", @@ -299,7 +302,8 @@ gsrs.importAdapterFactories.substances = } ] } - }, + } +gsrs.importAdapterFactories.substances.DelimTextImportAdapterFactory = { "adapterName": "Delimited Text Adapter", "importAdapterFactoryClass": "gsrs.module.substance.importers.DelimTextImportAdapterFactory", @@ -432,7 +436,8 @@ gsrs.importAdapterFactories.substances = ], "lineValueDelimiter": "," } - }, + } +gsrs.importAdapterFactories.substances.DelimTextImportAdapterFactory.ExcelFileImportAdapterFactory = { "adapterName": "Excel File Adapter", "importAdapterFactoryClass": "gsrs.module.substance.importers.ExcelFileImportAdapterFactory", @@ -563,7 +568,8 @@ gsrs.importAdapterFactories.substances = ], "lineValueDelimiter": "," } - }, + } +gsrs.importAdapterFactories.substances.DelimTextImportAdapterFactory.GSRSJSONImportAdapterFactory = { "adapterName": "GSRS JSON Adapter", "importAdapterFactoryClass": "gsrs.module.substance.importers.GSRSJSONImportAdapterFactory", @@ -580,5 +586,4 @@ gsrs.importAdapterFactories.substances = } } - ] From 2ebb84b0e98fc1067dd578b07da52d049649be34 Mon Sep 17 00:00:00 2001 From: alx652 Date: Mon, 18 Mar 2024 16:16:36 -0400 Subject: [PATCH 13/23] change test --- .../example/imports/DefaultImportAdapterFactoryConfigTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java b/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java index 30d3d9942..9f80dc84a 100644 --- a/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java +++ b/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java @@ -38,7 +38,7 @@ public void testSetup() throws IllegalAccessException, NoSuchFieldException, Jso Map oneAdapter = new HashMap<>(); oneAdapter.put("importAdapterFactoryClass", "gsrs.module.substance.importers.SDFImportAdapterFactory"); oneAdapter.put("order", 1000); - oneAdapter.put("key", "SDFImportAdapterFactory"); + oneAdapter.put("parentKey", "SDFImportAdapterFactory"); oneAdapter.put("adapterName", "NSRS SDF Adapter"); oneAdapter.put("extensions", Arrays.asList("sdf", "sd")); oneAdapter.put("parameters", buildConfigParameters()); From 6df132415ee99d75cfa85aa0007d062c5a21e7d7 Mon Sep 17 00:00:00 2001 From: alx652 Date: Thu, 21 Mar 2024 14:25:28 -0400 Subject: [PATCH 14/23] adding .list to some configs --- .../src/main/resources/fda-extension.conf | 12 +- ...DefaultImportAdapterFactoryConfigTest.java | 8 +- .../imports/StagingAreaServiceTest.java | 9 +- .../src/test/resources/application-test.conf | 6 +- .../DefaultCodeSystemUrlGenerator.java | 3 +- .../ginas/utils/CodeSequentialGenerator.java | 15 +- .../src/main/resources/substances-core.conf | 222 +++++++++--------- 7 files changed, 139 insertions(+), 136 deletions(-) diff --git a/gsrs-module-substance-example/src/main/resources/fda-extension.conf b/gsrs-module-substance-example/src/main/resources/fda-extension.conf index 1ac931253..13d995bb2 100644 --- a/gsrs-module-substance-example/src/main/resources/fda-extension.conf +++ b/gsrs-module-substance-example/src/main/resources/fda-extension.conf @@ -24,7 +24,7 @@ gsrs.microservice.clinicaltrialseurope.api.headers= { "auth-key"="myKey" } -gsrs.entityProcessors.UniqueCodeGenerator = +gsrs.entityProcessors.list.UniqueCodeGenerator = { "entityClassName" = "ix.ginas.models.v1.Substance", "processor" = "gsrs.module.substance.processors.UniqueCodeGenerator", @@ -41,7 +41,7 @@ gsrs.entityProcessors.UniqueCodeGenerator = } } -gsrs.entityProcessors.ApprovalIdProcessor = +gsrs.entityProcessors.list.ApprovalIdProcessor = { "entityClassName" = "ix.ginas.models.v1.Substance", "processor" = "gsrs.module.substance.processors.ApprovalIdProcessor", @@ -53,7 +53,7 @@ gsrs.entityProcessors.ApprovalIdProcessor = # can we remove this section since all these are in substances-core.conf? -ix.ginas.export.exporterfactories.substances.FDANameExporterFactory = +ix.ginas.export.exporterfactories.substances.list.FDANameExporterFactory = { "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDANameExporterFactory", "order" = 1200, @@ -61,7 +61,7 @@ ix.ginas.export.exporterfactories.substances.FDANameExporterFactory = "parameters":{ } } -ix.ginas.export.exporterfactories.substances.FDACodeExporterFactory = +ix.ginas.export.exporterfactories.substances.list.FDACodeExporterFactory = { "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDACodeExporterFactory", "order" = 1300, @@ -69,7 +69,7 @@ ix.ginas.export.exporterfactories.substances.FDACodeExporterFactory = "parameters":{ } } -ix.ginas.export.exporterfactories.substances.SPLValidatorXMLExporterFactory = +ix.ginas.export.exporterfactories.substances.list.SPLValidatorXMLExporterFactory = { "exporterFactoryClass" = "fda.gsrs.substance.exporters.SPLValidatorXMLExporterFactory", "order" = 1400, @@ -77,7 +77,7 @@ ix.ginas.export.exporterfactories.substances.SPLValidatorXMLExporterFactory = "parameters":{ } } -ix.ginas.export.exporterfactories.substances.SRSLegacyDictionaryExporterFactory = +ix.ginas.export.exporterfactories.substances.list.SRSLegacyDictionaryExporterFactory = { "exporterFactoryClass" = "fda.gsrs.substance.exporters.SRSLegacyDictionaryExporterFactory", "order" = 1500, diff --git a/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java b/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java index 9f80dc84a..1da203cc8 100644 --- a/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java +++ b/gsrs-module-substance-example/src/test/java/example/imports/DefaultImportAdapterFactoryConfigTest.java @@ -34,7 +34,7 @@ public void testSetup() throws IllegalAccessException, NoSuchFieldException, Jso String substanceContext = "substances"; //build up a complete configuration GsrsFactoryConfiguration config = new GsrsFactoryConfiguration(); - Map>> adapterConfig = new HashMap<>(); + Map>>> adapterConfig = new HashMap<>(); Map oneAdapter = new HashMap<>(); oneAdapter.put("importAdapterFactoryClass", "gsrs.module.substance.importers.SDFImportAdapterFactory"); oneAdapter.put("order", 1000); @@ -45,10 +45,10 @@ public void testSetup() throws IllegalAccessException, NoSuchFieldException, Jso oneAdapter.put("stagingAreaServiceClass", gsrs.stagingarea.service.DefaultStagingAreaService.class); oneAdapter.put("entityServiceClass", "gsrs.dataexchange.SubstanceStagingAreaEntityService"); Map> adapters = new HashMap<>(); - // ix.ginas.export.exporterfactories.substances.SdfExporterFactory = + // ix.ginas.export.exporterfactories.substances.list.SdfExporterFactory = adapters.put("SDFImportAdapterFactory", oneAdapter); - - adapterConfig.put(substanceContext, adapters); + adapterConfig.put(substanceContext, null); + adapterConfig.get(substanceContext).put("list", adapters); config.setImportAdapterFactories(adapterConfig); ConfigBasedGsrsImportAdapterFactoryFactory factoryFactory = new ConfigBasedGsrsImportAdapterFactoryFactory(); Field configField = factoryFactory.getClass().getDeclaredField("gsrsFactoryConfiguration"); //gsrs.imports.ConfigBasedGsrsImportAdapterFactoryFactory. diff --git a/gsrs-module-substance-example/src/test/java/example/imports/StagingAreaServiceTest.java b/gsrs-module-substance-example/src/test/java/example/imports/StagingAreaServiceTest.java index 6fcc34574..9a7d4db74 100644 --- a/gsrs-module-substance-example/src/test/java/example/imports/StagingAreaServiceTest.java +++ b/gsrs-module-substance-example/src/test/java/example/imports/StagingAreaServiceTest.java @@ -29,14 +29,14 @@ public class StagingAreaServiceTest extends AbstractSubstanceJpaEntityTest { @BeforeEach public void setup() throws NoSuchFieldException, IllegalAccessException { - // gsrs.matchableCalculators.substances.KEY = + // gsrs.matchableCalculators.substances.list.KEY = if( stagingAreaService == null ){ log.trace("setting up staging area service"); stagingAreaService = new DefaultStagingAreaService(); stagingAreaService = AutowireHelper.getInstance().autowireAndProxy(stagingAreaService); - Map>> matchableCalculatorConfig = new HashMap<>(); + Map>>> matchableCalculatorConfig = new HashMap<>(); Map> configs = new HashMap<>(); Map casExtractor = new HashMap<>(); casExtractor.put("matchableCalculationClass", CASNumberMatchableExtractor.class); @@ -63,8 +63,9 @@ public void setup() throws NoSuchFieldException, IllegalAccessException { Map uuidExtractor = new HashMap<>(); uuidExtractor.put("matchableCalculationClass", UUIDMatchableExtractor.class); configs.put("UUIDMatchableExtractor", uuidExtractor); - matchableCalculatorConfig.put("substances", configs); - + matchableCalculatorConfig.put("substances", + new HashMap>>(){{ put("list", configs);}} + ); SubstanceStagingAreaEntityService stagingAreaEntityService = new SubstanceStagingAreaEntityService(); stagingAreaEntityService = AutowireHelper.getInstance().autowireAndProxy(stagingAreaEntityService); Field factoryConfigField= stagingAreaEntityService.getClass().getDeclaredField("gsrsFactoryConfiguration"); diff --git a/gsrs-module-substance-example/src/test/resources/application-test.conf b/gsrs-module-substance-example/src/test/resources/application-test.conf index 51af98bc8..69c724aa4 100644 --- a/gsrs-module-substance-example/src/test/resources/application-test.conf +++ b/gsrs-module-substance-example/src/test/resources/application-test.conf @@ -303,7 +303,7 @@ gsrs.importAdapterFactories.substances.SDFImportAdapterFactory = ] } } -gsrs.importAdapterFactories.substances.DelimTextImportAdapterFactory = +gsrs.importAdapterFactories.substances.list.DelimTextImportAdapterFactory = { "adapterName": "Delimited Text Adapter", "importAdapterFactoryClass": "gsrs.module.substance.importers.DelimTextImportAdapterFactory", @@ -437,7 +437,7 @@ gsrs.importAdapterFactories.substances.DelimTextImportAdapterFactory = "lineValueDelimiter": "," } } -gsrs.importAdapterFactories.substances.DelimTextImportAdapterFactory.ExcelFileImportAdapterFactory = +gsrs.importAdapterFactories.substances.list.ExcelFileImportAdapterFactory = { "adapterName": "Excel File Adapter", "importAdapterFactoryClass": "gsrs.module.substance.importers.ExcelFileImportAdapterFactory", @@ -569,7 +569,7 @@ gsrs.importAdapterFactories.substances.DelimTextImportAdapterFactory.ExcelFileIm "lineValueDelimiter": "," } } -gsrs.importAdapterFactories.substances.DelimTextImportAdapterFactory.GSRSJSONImportAdapterFactory = +gsrs.importAdapterFactories.substances.list.GSRSJSONImportAdapterFactory = { "adapterName": "GSRS JSON Adapter", "importAdapterFactoryClass": "gsrs.module.substance.importers.GSRSJSONImportAdapterFactory", diff --git a/gsrs-module-substances-core/src/main/java/gsrs/module/substance/datasource/DefaultCodeSystemUrlGenerator.java b/gsrs-module-substances-core/src/main/java/gsrs/module/substance/datasource/DefaultCodeSystemUrlGenerator.java index a22319c6f..13af814e4 100644 --- a/gsrs-module-substances-core/src/main/java/gsrs/module/substance/datasource/DefaultCodeSystemUrlGenerator.java +++ b/gsrs-module-substances-core/src/main/java/gsrs/module/substance/datasource/DefaultCodeSystemUrlGenerator.java @@ -30,9 +30,10 @@ public class DefaultCodeSystemUrlGenerator implements DataSet, C The JSON looks like this: [{"codeSystem":"XYZ","url":"http://some.url.com/$CODE$"}, {...}] 2) Configure like so: - gsrs.entityProcessors += { + gsrs.entityProcessors.list.CodeProcessor = { "class":"ix.ginas.models.v1.Substance", "processor":"gsrs.module.substance.processors.CodeProcessor", + "order": 1000, "with": { "class":"gsrs.module.substance.datasource.DefaultCodeSystemUrlGenerator", "json":{ diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/CodeSequentialGenerator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/CodeSequentialGenerator.java index b088b69a1..7b5807554 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/CodeSequentialGenerator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/CodeSequentialGenerator.java @@ -29,16 +29,17 @@ If you don't specify a length the default will be Long.MAX_VALUE Configure like so: - gsrs.entityProcessors +={ + gsrs.entityProcessors.list.UniqueCodeGenerator = { "entityClassName" = "ix.ginas.models.v1.Substance", "processor" = "gsrs.module.substance.processors.UniqueCodeGenerator", - "with"= { - "name": "Some Name", + "order" = 1200, + "with" = { + "name" = "Some Name", "codesystem"="SOMECODESYSTEM", - "suffix"="ZZ", - "length"=5, - "padding"=true, - "max"=999 + "suffix" = "ZZ", + "length" = 5, + "padding" = true, + "max" = 999 } } */ diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index 13fe0eb6f..b4a64125a 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -94,44 +94,44 @@ gsrs.standardizers.substances = { } } -gsrs.validators.substances.IgnoreValidator = +gsrs.validators.substances.list.IgnoreValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.IgnoreValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "configClass" = "SubstanceValidatorConfig" "order": 100 } -gsrs.validators.substances.NullCheckValidator = +gsrs.validators.substances.list.NullCheckValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NullCheckValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 200 } -gsrs.validators.substances.AutoGenerateUuidIfNeeded = +gsrs.validators.substances.list.AutoGenerateUuidIfNeeded = { "validatorClass" = "ix.ginas.utils.validation.validators.AutoGenerateUuidIfNeeded", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 300 } -gsrs.validators.substances.StructuralModificationsValidator = +gsrs.validators.substances.list.StructuralModificationsValidator = { #validates that any structural modifications are effectively non-null "validatorClass" = "ix.ginas.utils.validation.validators.StructuralModificationsValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 400 }, -gsrs.validators.substances.SubstanceStatusValidator = +gsrs.validators.substances.list.SubstanceStatusValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.SubstanceStatusValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 500 } -gsrs.validators.substances.RemovePublicIndReferences = { +gsrs.validators.substances.list.RemovePublicIndReferences = { "validatorClass" = "ix.ginas.utils.validation.validators.RemovePublicIndReferences", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 600 } -gsrs.validators.substances.NamesValidator = +gsrs.validators.substances.list.NamesValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NamesValidator", "newObjClass" = "ix.ginas.models.v1.Substance", @@ -142,7 +142,7 @@ gsrs.validators.substances.NamesValidator = "caseSearchType": "Explicit" } } -gsrs.validators.substances.PrimaryRelationshipsValidator = +gsrs.validators.substances.list.PrimaryRelationshipsValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.PrimaryRelationshipsValidator", "newObjClass" = "ix.ginas.models.v1.Substance", @@ -150,7 +150,7 @@ gsrs.validators.substances.PrimaryRelationshipsValidator = "type" = "PRIMARY" "configClass" = "SubstanceValidatorConfig" } -gsrs.validators.substances.NotesValidator = +gsrs.validators.substances.list.NotesValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NotesValidator", "newObjClass" = "ix.ginas.models.v1.Substance", @@ -158,7 +158,7 @@ gsrs.validators.substances.NotesValidator = "type" = "PRIMARY" "configClass" = "SubstanceValidatorConfig" } -gsrs.validators.substances.PrimaryDefinitionValidator = +gsrs.validators.substances.list.PrimaryDefinitionValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.PrimaryDefinitionValidator", "newObjClass" = "ix.ginas.models.v1.Substance", @@ -166,7 +166,7 @@ gsrs.validators.substances.PrimaryDefinitionValidator = "type" = "PRIMARY" "configClass" = "SubstanceValidatorConfig" } -gsrs.validators.substances.AlternateDefinitionValidator = +gsrs.validators.substances.list.AlternateDefinitionValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.AlternateDefinitionValidator", "newObjClass" = "ix.ginas.models.v1.Substance", @@ -174,7 +174,7 @@ gsrs.validators.substances.AlternateDefinitionValidator = "type" = "ALTERNATIVE" "configClass" = "SubstanceValidatorConfig" } -gsrs.validators.substances.ChemicalValidator = +gsrs.validators.substances.list.ChemicalValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.ChemicalValidator", "newObjClass" = "ix.ginas.models.v1.Substance", @@ -184,7 +184,7 @@ gsrs.validators.substances.ChemicalValidator = "parameters"= {"allow0AtomStructures":false, "allowV3000Molfiles": false } "configClass" = "SubstanceValidatorConfig" } -gsrs.validators.substances.MixtureValidator = +gsrs.validators.substances.list.MixtureValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.MixtureValidator", "newObjClass" = "ix.ginas.models.v1.Substance", @@ -192,7 +192,7 @@ gsrs.validators.substances.MixtureValidator = "substanceClass" = "mixture" "configClass" = "SubstanceValidatorConfig" } -gsrs.validators.substances.NucleicAcidValidator = +gsrs.validators.substances.list.NucleicAcidValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NucleicAcidValidator", "newObjClass" = "ix.ginas.models.v1.Substance", @@ -200,7 +200,7 @@ gsrs.validators.substances.NucleicAcidValidator = "substanceClass" = "nucleicAcid", "configClass" = "SubstanceValidatorConfig" } -gsrs.validators.substances.PolymerValidator = +gsrs.validators.substances.list.PolymerValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.PolymerValidator", "newObjClass" = "ix.ginas.models.v1.Substance", @@ -208,7 +208,7 @@ gsrs.validators.substances.PolymerValidator = "substanceClass" = "polymer" "configClass" = "SubstanceValidatorConfig" } -gsrs.validators.substances.ProteinValidator = +gsrs.validators.substances.list.ProteinValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.ProteinValidator", "newObjClass" = "ix.ginas.models.v1.Substance", @@ -216,7 +216,7 @@ gsrs.validators.substances.ProteinValidator = "substanceClass" = "protein" "configClass" = "SubstanceValidatorConfig" } -gsrs.validators.substances.StructurallyDiverseValidator = +gsrs.validators.substances.list.StructurallyDiverseValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.StructurallyDiverseValidator", "newObjClass" = "ix.ginas.models.v1.Substance", @@ -224,7 +224,7 @@ gsrs.validators.substances.StructurallyDiverseValidator = "substanceClass" = "structurallyDiverse" "configClass" = "SubstanceValidatorConfig" } -gsrs.validators.substances.SSSG1Validator = +gsrs.validators.substances.list.SSSG1Validator = { "validatorClass" = "ix.ginas.utils.validation.validators.SSSG1Validator", "newObjClass" = "ix.ginas.models.v1.Substance", @@ -232,44 +232,44 @@ gsrs.validators.substances.SSSG1Validator = "substanceClass" = "specifiedSubstanceG1", "configClass" = "SubstanceValidatorConfig" }, -gsrs.validators.substances.UnknownSubstanceClassValidator = +gsrs.validators.substances.list.UnknownSubstanceClassValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.UnknownSubstanceClassValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 1900 } -gsrs.validators.substances.NewSubstanceNonBatchLoadValidator = +gsrs.validators.substances.list.NewSubstanceNonBatchLoadValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.NewSubstanceNonBatchLoadValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 2000 } -gsrs.validators.substances.UpdateSubstanceNonBatchLoaderValidator = +gsrs.validators.substances.list.UpdateSubstanceNonBatchLoaderValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.UpdateSubstanceNonBatchLoaderValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 2100 } -gsrs.validators.substances.PublicDomainRefValidator = +gsrs.validators.substances.list.PublicDomainRefValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.PublicDomainRefValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 2200 } -gsrs.validators.substances.DefinitionalHashValidator = +gsrs.validators.substances.list.DefinitionalHashValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.DefinitionalHashValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 2300, "disabled": false } -gsrs.validators.substances.DefinitionalReferenceValidator = +gsrs.validators.substances.list.DefinitionalReferenceValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.DefinitionalReferenceValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 2400 } -gsrs.validators.substances.RelationshipModificationValidator = +gsrs.validators.substances.list.RelationshipModificationValidator = # Validator for Relationship modifications (restrict to admins) { "validatorClass" = "ix.ginas.utils.validation.validators.RelationshipModificationValidator", @@ -277,7 +277,7 @@ gsrs.validators.substances.RelationshipModificationValidator = "order": 2500, "disabled": false } -gsrs.validators.substances.PropertyValidator = +gsrs.validators.substances.list.PropertyValidator = # Make sure each property has a name { "validatorClass" = "ix.ginas.utils.validation.validators.PropertyValidator", @@ -285,7 +285,7 @@ gsrs.validators.substances.PropertyValidator = "order": 2600, "disabled": false } -gsrs.validators.substances.SuperatomValidator = +gsrs.validators.substances.list.SuperatomValidator = # Check the mol files of chemical substances and throw errors if there are SUP s-groups. # To remove this check comment out or delete this statement. { @@ -297,7 +297,7 @@ gsrs.validators.substances.SuperatomValidator = } # cross check with substances service -gsrs.validators.substances.StandardNameValidator = +gsrs.validators.substances.list.StandardNameValidator = #Standardize Names; Listed here for reference. Copy and paste into your application.conf and uncomment. { "validatorClass" = "ix.ginas.utils.validation.validators.StandardNameValidator", @@ -313,13 +313,13 @@ gsrs.validators.substances.StandardNameValidator = # THIS IS IMPORTANT, ADDITION OF VALIDATORS! ############################################## -gsrs.validators.substances.CodeFormatValidator = +gsrs.validators.substances.list.CodeFormatValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.CodeFormatValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 2900 } -gsrs.validators.substances.SaltValidator = +gsrs.validators.substances.list.SaltValidator = # TODO katzelda Feb 2021: remove for now # Check that individual moieties of a multi-moiety chemical are registered separately { @@ -327,21 +327,21 @@ gsrs.validators.substances.SaltValidator = "newObjClass" = "ix.ginas.models.v1.ChemicalSubstance", "order": 3000 } -gsrs.validators.substances.SubstanceUniquenessValidator = +gsrs.validators.substances.list.SubstanceUniquenessValidator = # Check for uniqueness of several classes of substance based on definitional hashes { "validatorClass" = "ix.ginas.utils.validation.validators.SubstanceUniquenessValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 3100 } -gsrs.validators.substances.CASCodeValidator = +gsrs.validators.substances.list.CASCodeValidator = { # add check for CAS RNs "validatorClass" = "ix.ginas.utils.validation.validators.CASCodeValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 3200 } -gsrs.validators.substances.SetReferenceAccess = +gsrs.validators.substances.list.SetReferenceAccess = #removed from suggestedPublic but not yet added to alwaysPrivate: CTP and DMF { "validatorClass" = "ix.ginas.utils.validation.validators.SetReferenceAccess", @@ -359,14 +359,14 @@ gsrs.validators.substances.SetReferenceAccess = "referenceCitationPatterns" : [".*[^A-Z]IND[^A-Z]*[0-9][0-9][0-9]*.*"] } -gsrs.validators.substances.CodesValidator = +gsrs.validators.substances.list.CodesValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.CodesValidator", "newObjClass" = "ix.ginas.models.v1.Substance", "order": 3400, "configClass" = "SubstanceValidatorConfig" } -gsrs.validators.substances.ChemicalUniquenessValidator = +gsrs.validators.substances.list.ChemicalUniquenessValidator = { "validatorClass" = "ix.ginas.utils.validation.validators.ChemicalUniquenessValidator", "newObjClass" = "ix.ginas.models.v1.Substance", @@ -376,7 +376,7 @@ gsrs.validators.substances.ChemicalUniquenessValidator = } # commented out do we want it but disabled? -# gsrs.validators.substances.CodeUniquenessValidator = +# gsrs.validators.substances.list.CodeUniquenessValidator = # { # "validatorClass" = "ix.ginas.utils.validation.validators.CodeUniquenessValidator", # "newObjClass" = "ix.ginas.models.v1.Substance", @@ -399,12 +399,12 @@ server.servlet-path=/loop-service server.use-forward-headers=true -ix.api.registeredfunctions.InChIRegisteredFunction = +ix.api.registeredfunctions.list.InChIRegisteredFunction = { "registeredFunctionClass": "ix.core.util.pojopointer.extensions.InChIRegisteredFunction", "order": 1500 } -ix.api.registeredfunctions.InChIFullRegisteredFunction = +ix.api.registeredfunctions.list.InChIFullRegisteredFunction = { "registeredFunctionClass":"ix.core.util.pojopointer.extensions.InChIFullRegisteredFunction" "order": 1600, @@ -435,62 +435,62 @@ XXXX_ix.ginas.export.factories.substances_XXXX = [ # "ix.ginas.exporters.SPLValidatorXMLExporterFactory", # "ix.ginas.exporters.SRSLegacyDictionaryExporterFactory" ] - -ix.ginas.export.exporterfactories.substances.DefaultSubstanceSpreadsheetExporterFactory = - { - "exporterFactoryClass" = "gsrs.module.substance.exporters.DefaultSubstanceSpreadsheetExporterFactory", - "order" = 1000, - "parameters":{ - } - } -ix.ginas.export.exporterfactories.substances.JsonExporterFactory = - { - "exporterFactoryClass" = "gsrs.module.substance.exporters.JsonExporterFactory", - "order" = 1100, - "parameters":{ - } - } -ix.ginas.export.exporterfactories.substances.FDANameExporterFactory = - { - "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDANameExporterFactory", - "order" = 1200, - "disabled" = true, - "parameters":{ - } - } -ix.ginas.export.exporterfactories.substances.FDACodeExporterFactory = - { - "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDACodeExporterFactory", - "order" = 1300, - "disabled" = true, - "parameters":{ - } - } -ix.ginas.export.exporterfactories.substances.SPLValidatorXMLExporterFactory = - { - "exporterFactoryClass" = "fda.gsrs.substance.exporters.SPLValidatorXMLExporterFactory", - "order" = 1400, - "disabled" = true, - "parameters":{ - } - } -ix.ginas.export.exporterfactories.substances.SRSLegacyDictionaryExporterFactory = - { - "exporterFactoryClass" = "fda.gsrs.substance.exporters.SRSLegacyDictionaryExporterFactory", - "order" = 1500, - "disabled" = true, - "parameters":{ - } - } - -ix.ginas.export.exporterfactories.substances.SdfExporterFactory = - { - "exporterFactoryClass" = "gsrs.module.substance.exporters.SdfExporterFactory", - "order" = 1600, - "parameters":{ - "approvalIDName": "UNII" - } - } +# +# ix.ginas.export.exporterfactories.substances.list.DefaultSubstanceSpreadsheetExporterFactory = +# { +# "exporterFactoryClass" = "gsrs.module.substance.exporters.DefaultSubstanceSpreadsheetExporterFactory", +# "order" = 1000, +# "parameters":{ +# } +# } +# ix.ginas.export.exporterfactories.substances.list.JsonExporterFactory = +# { +# "exporterFactoryClass" = "gsrs.module.substance.exporters.JsonExporterFactory", +# "order" = 1100, +# "parameters":{ +# } +# } +# ix.ginas.export.exporterfactories.substances.list.FDANameExporterFactory = +# { +# "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDANameExporterFactory", +# "order" = 1200, +# "disabled" = true, +# "parameters":{ +# } +# } +# ix.ginas.export.exporterfactories.substances.list.FDACodeExporterFactory = +# { +# "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDACodeExporterFactory", +# "order" = 1300, +# "disabled" = true, +# "parameters":{ +# } +# } +# ix.ginas.export.exporterfactories.substances.list.SPLValidatorXMLExporterFactory = +# { +# "exporterFactoryClass" = "fda.gsrs.substance.exporters.SPLValidatorXMLExporterFactory", +# "order" = 1400, +# "disabled" = true, +# "parameters":{ +# } +# } +# ix.ginas.export.exporterfactories.substances.list.SRSLegacyDictionaryExporterFactory = +# { +# "exporterFactoryClass" = "fda.gsrs.substance.exporters.SRSLegacyDictionaryExporterFactory", +# "order" = 1500, +# "disabled" = true, +# "parameters":{ +# } +# } +# +# ix.ginas.export.exporterfactories.substances.list.SdfExporterFactory = +# { +# "exporterFactoryClass" = "gsrs.module.substance.exporters.SdfExporterFactory", +# "order" = 1600, +# "parameters":{ +# "approvalIDName": "UNII" +# } +# } substance.definitional-elements.implementations =[ { @@ -536,43 +536,43 @@ gsrs.resolvers.implementations =[ } ] -gsrs.entityProcessors.SubstanceProcessor = +gsrs.entityProcessors.list.SubstanceProcessor = { "entityClassName" = "ix.ginas.models.v1.Substance", "processor" = "gsrs.module.substance.processors.SubstanceProcessor", "order" = 1000 } -# gsrs.entityProcessors.ChemicalStructurePropertiesProcessor = +# gsrs.entityProcessors.list.ChemicalStructurePropertiesProcessor = # { # "entityClassName" = "ix.ginas.models.v1.Substance", # "processor" = "gsrs.module.substance.processors.ChemicalStructurePropertiesProcessor", # "order" = 2000 # } -gsrs.entityProcessors.PublicTagFlagger = +gsrs.entityProcessors.list.PublicTagFlagger = { "entityClassName" = "ix.ginas.models.v1.Substance", "processor" = "gsrs.module.substance.processors.PublicTagFlagger" "order" = 3000 } -gsrs.entityProcessors.ReferenceProcessor = +gsrs.entityProcessors.list.ReferenceProcessor = { "entityClassName" = "ix.ginas.models.v1.Reference", "processor" = "gsrs.module.substance.processors.ReferenceProcessor", "order" = 4000 } -gsrs.entityProcessors.RelationshipProcessor = +gsrs.entityProcessors.list.RelationshipProcessor = { "entityClassName" = "ix.ginas.models.v1.Substance", "processor" = "gsrs.module.substance.processors.RelationshipProcessor", "order" = 5000 } -# gsrs.entityProcessors.ApprovalIdProcessor = +# gsrs.entityProcessors.list.ApprovalIdProcessor = # { # "entityClassName" = "ix.ginas.models.v1.Substance", # "processor" = "gsrs.module.substance.processors.ApprovalIdProcessor", # "order" = 6000 # }, -gsrs.entityProcessors.GroupProcessor = +gsrs.entityProcessors.list.GroupProcessor = { "entityClassName" = "ix.ginas.models.v1.Substance", "processor" = "gsrs.module.substance.processors.GroupProcessor", @@ -926,10 +926,10 @@ gsrs.standardizers.substances = { #### AW: this was copied from application.conf for others' testing purposes -#### Infuture we may want this in substances-core.conf as it can be overridden +#### In future we may want this in substances-core.conf as it can be overridden ### need to reconcile the various ways this stuff is configured in different places. -gsrs.importAdapterFactories.substances.SDFImportAdapterFactory = +gsrs.importAdapterFactories.substances.list.SDFImportAdapterFactory = { "adapterName": "SDF Adapter", "importAdapterFactoryClass": "gsrs.module.substance.importers.SDFImportAdapterFactory", @@ -1190,7 +1190,7 @@ gsrs.importAdapterFactories.substances.SDFImportAdapterFactory = } } -gsrs.importAdapterFactories.substances.GSRSJSONImportAdapterFactory = +gsrs.importAdapterFactories.substances.list.GSRSJSONImportAdapterFactory = { "adapterName": "GSRS JSON Adapter", "importAdapterFactoryClass": "gsrs.module.substance.importers.GSRSJSONImportAdapterFactory", @@ -1236,7 +1236,7 @@ gsrs.processing-strategy = { ## This is what mitch had for matchables, this was not included in previous substances-core.conf ## decide if this should be included after testing. -gsrs.matchableCalculators.substances.CASNumberMatchableExtractor = +gsrs.matchableCalculators.substances.list.CASNumberMatchableExtractor = { "matchableCalculationClass" : "gsrs.dataexchange.extractors.CASNumberMatchableExtractor", "order": 1000, @@ -1244,25 +1244,25 @@ gsrs.matchableCalculators.substances.CASNumberMatchableExtractor = "casCodeSystems": ["CAS", "CASNo", "CASNumber"] } } -gsrs.matchableCalculators.substances.AllNamesMatchableExtractor = +gsrs.matchableCalculators.substances.list.AllNamesMatchableExtractor = { "matchableCalculationClass" : "gsrs.dataexchange.extractors.AllNamesMatchableExtractor", "order": 1100, "config" :{} } -gsrs.matchableCalculators.substances.ApprovalIdMatchableExtractor = +gsrs.matchableCalculators.substances.list.ApprovalIdMatchableExtractor = { "matchableCalculationClass" : "gsrs.dataexchange.extractors.ApprovalIdMatchableExtractor", "order": 1200, "config" :{} } -gsrs.matchableCalculators.substances.DefinitionalHashMatchableExtractor = +gsrs.matchableCalculators.substances.list.DefinitionalHashMatchableExtractor = { "matchableCalculationClass" : "gsrs.dataexchange.extractors.DefinitionalHashMatchableExtractor", "order": 1300, "config" :{} } -gsrs.matchableCalculators.substances.SelectedCodesMatchableExtractor = +gsrs.matchableCalculators.substances.list.SelectedCodesMatchableExtractor = { "matchableCalculationClass" : "gsrs.dataexchange.extractors.SelectedCodesMatchableExtractor", "order": 1400, @@ -1270,13 +1270,13 @@ gsrs.matchableCalculators.substances.SelectedCodesMatchableExtractor = "codeSystems" :["CAS", "ChemBL", "NCI", "NSC", "EINECS"] } } -gsrs.matchableCalculators.substances.UUIDMatchableExtractor = +gsrs.matchableCalculators.substances.list.UUIDMatchableExtractor = { "matchableCalculationClass" : "gsrs.dataexchange.extractors.UUIDMatchableExtractor", "order": 1500, "config" :{} } -gsrs.matchableCalculators.substances.CodeMatchableExtractor = +gsrs.matchableCalculators.substances.list.CodeMatchableExtractor = { "matchableCalculationClass" : "gsrs.dataexchange.extractors.CodeMatchableExtractor", "order": 1600, From 3e20078719ceac0d2cfcecceb767ed948efcb133 Mon Sep 17 00:00:00 2001 From: alx652 Date: Thu, 16 May 2024 13:34:26 -0400 Subject: [PATCH 15/23] update subst core conf --- .../src/main/resources/substances-core.conf | 1127 +++++++++-------- 1 file changed, 581 insertions(+), 546 deletions(-) diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index b4a64125a..bd0d7a2e9 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -296,7 +296,7 @@ gsrs.validators.substances.list.SuperatomValidator = "configClass" = "SubstanceValidatorConfig" } -# cross check with substances service +# __aw__ including this here and not in MS, cross check with substances service gsrs.validators.substances.list.StandardNameValidator = #Standardize Names; Listed here for reference. Copy and paste into your application.conf and uncomment. { @@ -309,6 +309,29 @@ gsrs.validators.substances.list.StandardNameValidator = } } +# __aw__ include this in substance-core.conf instead in microservice since it can now be disabled easily +# __aw__ make sure this is still consistent with FDA ??? +# Manage tags/bracketed terms in names per FDA configuration. +# In FDA's case: +# No automatic addition in tags found in names to explicit tag list. +# No automatic deletion of explicit tags missing from bracketed terms. +# Warnings off for bracket name missing from tags; warning on for explicit tag missing from names. +gsrs.validators.substances.list.TagsValidator = { + "validatorClass" = "ix.ginas.utils.validation.validators.tags.TagsValidator", + "newObjClass" = "ix.ginas.models.v1.Substance", + "order": 2850, + "parameters" = { + "checkExplicitTagsExtractedFromNames": false, + "checkExplicitTagsMissingFromNames": true, + "addExplicitTagsExtractedFromNamesOnCreate": false, + "addExplicitTagsExtractedFromNamesOnUpdate": false, + "removeExplicitTagsMissingFromNamesOnCreate": false, + "removeExplicitTagsMissingFromNamesOnUpdate": false + } +} + + + ############################################## # THIS IS IMPORTANT, ADDITION OF VALIDATORS! ############################################## @@ -435,62 +458,62 @@ XXXX_ix.ginas.export.factories.substances_XXXX = [ # "ix.ginas.exporters.SPLValidatorXMLExporterFactory", # "ix.ginas.exporters.SRSLegacyDictionaryExporterFactory" ] + +ix.ginas.export.exporterfactories.substances.list.DefaultSubstanceSpreadsheetExporterFactory = +{ + "exporterFactoryClass" = "gsrs.module.substance.exporters.DefaultSubstanceSpreadsheetExporterFactory", + "order" = 1000, + "parameters":{ + } +} +ix.ginas.export.exporterfactories.substances.list.JsonExporterFactory = +{ + "exporterFactoryClass" = "gsrs.module.substance.exporters.JsonExporterFactory", + "order" = 1100, + "parameters":{ + } +} +ix.ginas.export.exporterfactories.substances.list.FDANameExporterFactory = +{ + "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDANameExporterFactory", + "order" = 1200, + "disabled" = true, + "parameters":{ + } +} +ix.ginas.export.exporterfactories.substances.list.FDACodeExporterFactory = +{ + "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDACodeExporterFactory", + "order" = 1300, + "disabled" = true, + "parameters":{ + } +} +ix.ginas.export.exporterfactories.substances.list.SPLValidatorXMLExporterFactory = +{ + "exporterFactoryClass" = "fda.gsrs.substance.exporters.SPLValidatorXMLExporterFactory", + "order" = 1400, + "disabled" = true, + "parameters":{ + } +} +ix.ginas.export.exporterfactories.substances.list.SRSLegacyDictionaryExporterFactory = +{ + "exporterFactoryClass" = "fda.gsrs.substance.exporters.SRSLegacyDictionaryExporterFactory", + "order" = 1500, + "disabled" = true, + "parameters":{ + } +} # -# ix.ginas.export.exporterfactories.substances.list.DefaultSubstanceSpreadsheetExporterFactory = -# { -# "exporterFactoryClass" = "gsrs.module.substance.exporters.DefaultSubstanceSpreadsheetExporterFactory", -# "order" = 1000, -# "parameters":{ -# } -# } -# ix.ginas.export.exporterfactories.substances.list.JsonExporterFactory = -# { -# "exporterFactoryClass" = "gsrs.module.substance.exporters.JsonExporterFactory", -# "order" = 1100, -# "parameters":{ -# } -# } -# ix.ginas.export.exporterfactories.substances.list.FDANameExporterFactory = -# { -# "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDANameExporterFactory", -# "order" = 1200, -# "disabled" = true, -# "parameters":{ -# } -# } -# ix.ginas.export.exporterfactories.substances.list.FDACodeExporterFactory = -# { -# "exporterFactoryClass" = "fda.gsrs.substance.exporters.FDACodeExporterFactory", -# "order" = 1300, -# "disabled" = true, -# "parameters":{ -# } -# } -# ix.ginas.export.exporterfactories.substances.list.SPLValidatorXMLExporterFactory = -# { -# "exporterFactoryClass" = "fda.gsrs.substance.exporters.SPLValidatorXMLExporterFactory", -# "order" = 1400, -# "disabled" = true, -# "parameters":{ -# } -# } -# ix.ginas.export.exporterfactories.substances.list.SRSLegacyDictionaryExporterFactory = -# { -# "exporterFactoryClass" = "fda.gsrs.substance.exporters.SRSLegacyDictionaryExporterFactory", -# "order" = 1500, -# "disabled" = true, -# "parameters":{ -# } -# } -# -# ix.ginas.export.exporterfactories.substances.list.SdfExporterFactory = -# { -# "exporterFactoryClass" = "gsrs.module.substance.exporters.SdfExporterFactory", -# "order" = 1600, -# "parameters":{ -# "approvalIDName": "UNII" -# } -# } +ix.ginas.export.exporterfactories.substances.list.SdfExporterFactory = +{ + "exporterFactoryClass" = "gsrs.module.substance.exporters.SdfExporterFactory", + "order" = 1600, + "parameters":{ + "approvalIDName": "UNII" + } +} substance.definitional-elements.implementations =[ { @@ -537,137 +560,137 @@ gsrs.resolvers.implementations =[ ] gsrs.entityProcessors.list.SubstanceProcessor = - { - "entityClassName" = "ix.ginas.models.v1.Substance", - "processor" = "gsrs.module.substance.processors.SubstanceProcessor", - "order" = 1000 - } + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.SubstanceProcessor", + "order" = 1000 + } # gsrs.entityProcessors.list.ChemicalStructurePropertiesProcessor = # { # "entityClassName" = "ix.ginas.models.v1.Substance", # "processor" = "gsrs.module.substance.processors.ChemicalStructurePropertiesProcessor", -# "order" = 2000 +# "order" = 1100 # } gsrs.entityProcessors.list.PublicTagFlagger = - { - "entityClassName" = "ix.ginas.models.v1.Substance", - "processor" = "gsrs.module.substance.processors.PublicTagFlagger" - "order" = 3000 - } + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.PublicTagFlagger" + "order" = 1200 + } gsrs.entityProcessors.list.ReferenceProcessor = - { - "entityClassName" = "ix.ginas.models.v1.Reference", - "processor" = "gsrs.module.substance.processors.ReferenceProcessor", - "order" = 4000 - } + { + "entityClassName" = "ix.ginas.models.v1.Reference", + "processor" = "gsrs.module.substance.processors.ReferenceProcessor", + "order" = 1300 + } gsrs.entityProcessors.list.RelationshipProcessor = - { - "entityClassName" = "ix.ginas.models.v1.Substance", - "processor" = "gsrs.module.substance.processors.RelationshipProcessor", - "order" = 5000 - } + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.RelationshipProcessor", + "order" = 1400 + } # gsrs.entityProcessors.list.ApprovalIdProcessor = # { # "entityClassName" = "ix.ginas.models.v1.Substance", # "processor" = "gsrs.module.substance.processors.ApprovalIdProcessor", -# "order" = 6000 +# "order" = 1500 # }, gsrs.entityProcessors.list.GroupProcessor = - { - "entityClassName" = "ix.ginas.models.v1.Substance", - "processor" = "gsrs.module.substance.processors.GroupProcessor", - "order" = 7000 - } + { + "entityClassName" = "ix.ginas.models.v1.Substance", + "processor" = "gsrs.module.substance.processors.GroupProcessor", + "order" = 1600 + } gsrs.scheduled-tasks.list.ReindexTaskInitializer = - { - "scheduledTaskClass" : "gsrs.module.substance.tasks.ReindexTaskInitializer", - "order" = 1000, - "parameters" : { - "autorun": false - } - } +{ +"scheduledTaskClass" : "gsrs.module.substance.tasks.ReindexTaskInitializer", +"order" = 1000, +"parameters" : { +"autorun": false +} +} gsrs.scheduled-tasks.list.StructureRecalcTaskInitializer = - { - "scheduledTaskClass" : "gsrs.module.substance.tasks.StructureRecalcTaskInitializer", - "order" = 1100, - "parameters" : { - "autorun": false - } - } +{ +"scheduledTaskClass" : "gsrs.module.substance.tasks.StructureRecalcTaskInitializer", +"order" = 1100, +"parameters" : { +"autorun": false +} +} gsrs.scheduled-tasks.list.RebackupTaskInitializer = - { - "scheduledTaskClass" : "gsrs.module.substance.tasks.RebackupTaskInitializer", - "order" = 1200, - "parameters" : { - "autorun": false, - "description" : "Re-backup all Substance entities", - "repositoryClass" : "gsrs.module.substance.repository.SubstanceRepository" - } - } +{ +"scheduledTaskClass" : "gsrs.module.substance.tasks.RebackupTaskInitializer", +"order" = 1200, +"parameters" : { +"autorun": false, + "description" : "Re-backup all Substance entities", + "repositoryClass" : "gsrs.module.substance.repository.SubstanceRepository" + } +} gsrs.scheduled-tasks.list.ChronicStackDumper = - { - "scheduledTaskClass" : "gsrs.module.substance.tasks.ChronicStackDumper", - "order" = 1300, - "parameters" : { - "autorun": false, - "dateFormat" : "yyyy.MMMM.dd hh:mm:ss a", #any valid Java 8 DateTimeFormatter - "cron":"0 0/3 * * * ?", #every 3 mins - "outputPath" : "logs/all-running-stacktraces.log" - } - } -gsrs.scheduled-tasks.list.DataRecorder = - { - "scheduledTaskClass" : "gsrs.module.substance.tasks.DataRecorder", - "order" = 1400, - "parameters" : { - "autorun": false, - "dateFormat" : "yyyy.MMMM.dd hh:mm:ss a", #any valid Java 8 DateTimeFormatter - "cron":"0/10 * * * * ?", #every 10 seconds - "outputPath" : "logs/datarecorder.log" - } +{ + "scheduledTaskClass" : "gsrs.module.substance.tasks.ChronicStackDumper", +"order" = 1300, + "parameters" : { + "autorun": false, + "dateFormat" : "yyyy.MMMM.dd hh:mm:ss a", #any valid Java 8 DateTimeFormatter + "cron":"0 0/3 * * * ?", #every 3 mins + "outputPath" : "logs/all-running-stacktraces.log" } +} +gsrs.scheduled-tasks.list.DataRecorder = +{ +"scheduledTaskClass" : "gsrs.module.substance.tasks.DataRecorder", +"order" = 1400, + "parameters" : { + "autorun": false, + "dateFormat" : "yyyy.MMMM.dd hh:mm:ss a", #any valid Java 8 DateTimeFormatter +"cron":"0/10 * * * * ?", #every 10 seconds + "outputPath" : "logs/datarecorder.log" +} +} gsrs.scheduled-tasks.list.ImportMetadataReindexTask = - { - "scheduledTaskClass" : "gsrs.dataexchange.tasks.ImportMetadataReindexTask", - "order" = 1500, - "parameters": { - "autorun": false - } - } +{ +"scheduledTaskClass" : "gsrs.dataexchange.tasks.ImportMetadataReindexTask", +"order" = 1500, +"parameters": { + "autorun": false +} +} gsrs.scheduled-tasks.list.SubstanceRefTaskInitializer = - { - #fixes - "scheduledTaskClass" : "gsrs.module.substance.tasks.SubstanceRefTaskInitializer", - "order" = 1600, - "parameters" : { - "autorun": false, - "refUuidCodeSystem" :"UUID Code", - "reportFilePath" :"logs/substance_reference_report.txt", - "refApprovalIdCodeSystem" : "FDA UNII" - } - } +{ +#fixes +"scheduledTaskClass" : "gsrs.module.substance.tasks.SubstanceRefTaskInitializer", +"order" = 1600, +"parameters" : { + "autorun": false, + "refUuidCodeSystem" :"UUID Code", + "reportFilePath" :"logs/substance_reference_report.txt", + "refApprovalIdCodeSystem" : "FDA UNII" +} +} gsrs.scheduled-tasks.list.CalculateMatchablesScheduledTask = - { - "scheduledTaskClass" : "gsrs.dataexchange.tasks.CalculateMatchablesScheduledTask", - "order" = 1700, - "parameters" : { - "autorun": false, - "threadCount": 5 # Use max 5 threads, if null or <1 this will use all threads available - } - } +{ +"scheduledTaskClass" : "gsrs.dataexchange.tasks.CalculateMatchablesScheduledTask", +"order" = 1700, +"parameters" : { + "autorun": false, + "threadCount": 5 # Use max 5 threads, if null or <1 this will use all threads available +} +} gsrs.scheduled-tasks.list.CalculateStagingAreaMatchablesScheduledTask = - { - "order" = 1800, - "scheduledTaskClass" : "gsrs.tasks.CalculateStagingAreaMatchablesScheduledTask", - "parameters" : { - "autorun": false, - "threadCount": 5 # Use max 5 threads, if null or <1 this will use all threads available - } - } +{ +"order" = 1800, +"scheduledTaskClass" : "gsrs.tasks.CalculateStagingAreaMatchablesScheduledTask", +"parameters" : { + "autorun": false, + "threadCount": 5 # Use max 5 threads, if null or <1 this will use all threads available +} +} @@ -678,16 +701,16 @@ ix.ginas.structure.search.includeModifications=true ix.ginas.structure.search.includeMixtures=true -# What does this do? AW I don't think this is included in the code logic +# What does this do? __aw__ I don't think this is included in the code logic gsrs.indexers.includeDefaultIndexers = false # start at 3000 gsrs.indexers.list.DeprecatedIndexValueMaker = { - "indexer" = "gsrs.module.substance.indexers.DeprecatedIndexValueMaker", - "class" = "ix.ginas.models.v1.Substance", - "order" = 3000 +"indexer" = "gsrs.module.substance.indexers.DeprecatedIndexValueMaker", +"class" = "ix.ginas.models.v1.Substance", +"order" = 3000 } # gsrs.indexers.list.ChemicalSubstanceStructureHashIndexValueMaker = @@ -800,7 +823,7 @@ gsrs.indexers.list.ImportMetadataBasicsIndexValueMaker = # "name": "Simple Code Report", # "cron":"0 0/1 * * * ?", #every 1 mins ### Datasource qualifier can be specified if needed. This is typically of the form: -### "DataSource". For example, "defaultDataSource" or "productsDataSource"/ +### "DataSource". For example, "defaultDataSource" or "productsDataSource"/ ### "dataSourceQualifier":"defaultDataSource", # } # } @@ -825,55 +848,55 @@ gsrs.search.substances.restrictDefaultToIdentifiers=true gsrs.scheduled-tasks.list.NameStandardizerTaskInitializer_RISN = { "scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", - "order" = 2100 - "parameters" : { - "nameStandardizerClassName": "gsrs.module.substance.standardizer.FDAFullNameStandardizer", - "autorun": false, - "regenerateNameValue":"[standardize me]", - "forceRecalculationOfAll": false, - "description" : "Regenerate standardized names, report on inconsistent standardized names without changing existing standardized names" - "cron":"0 0/0 0 1 * ?", #every - } + "order" = 2100 +"parameters" : { + "nameStandardizerClassName": "gsrs.module.substance.standardizer.FDAFullNameStandardizer", + "autorun": false, + "regenerateNameValue":"[standardize me]", + "forceRecalculationOfAll": false, + "description" : "Regenerate standardized names, report on inconsistent standardized names without changing existing standardized names" + "cron":"0 0/0 0 1 * ?", #every +} } gsrs.scheduled-tasks.list.NameStandardizerTaskInitializer_FISN = { - "scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", - "order" = 2200, - "parameters" : { - "nameStandardizerClassName": "gsrs.module.substance.standardizer.FDAFullNameStandardizer", - "autorun": false, - "regenerateNameValue":"[standardize me]", - "forceRecalculationOfAll": true, - "disabledHistory": true, - "disabledHooks": true, - "threadCount": 5, - "description" : "Regenerate standardized names, force inconsistent standardized names to be regenerated" - "cron":"0 0/0 0 1 * ?", #every - } + "scheduledTaskClass" : "gsrs.module.substance.tasks.NameStandardizerTaskInitializer", + "order" = 2200, +"parameters" : { + "nameStandardizerClassName": "gsrs.module.substance.standardizer.FDAFullNameStandardizer", + "autorun": false, + "regenerateNameValue":"[standardize me]", + "forceRecalculationOfAll": true, + "disabledHistory": true, + "disabledHooks": true, + "threadCount": 5, + "description" : "Regenerate standardized names, force inconsistent standardized names to be regenerated" + "cron":"0 0/0 0 1 * ?", #every +} } ix.ginas.export.settingsPresets.substances= { - "PUBLIC_DATA_ONLY": { - "owner":"admin", - "scrubberSettings": { - "removeAllLocked":true - } - }, - "ALL_DATA": { - "owner":"admin", - "scrubberSettings":null - } +"PUBLIC_DATA_ONLY": { + "owner":"admin", + "scrubberSettings": { + "removeAllLocked":true + } +}, +"ALL_DATA": { +"owner":"admin", + "scrubberSettings":null +} } gsrs.standardizers.substances = { - "name" = { - "standardizerClass" = "gsrs.module.substance.standardizer.HtmlNameStandardizer" - }, - "stdname" = { - "standardizerClass" = "gsrs.module.substance.standardizer.HtmlNameStandardizer" - } +"name" = { + "standardizerClass" = "gsrs.module.substance.standardizer.HtmlNameStandardizer" +}, +"stdname" = { + "standardizerClass" = "gsrs.module.substance.standardizer.HtmlNameStandardizer" +} } # ix.gsrs.sdfActions={structure_and_moieties:'gsrs.module.substance.importers.StructureExtractorActionFactory', @@ -881,7 +904,7 @@ gsrs.standardizers.substances = { # common_name:'gsrs.module.substance.importers.NameExtractorActionFactory'} -#### This was in substances-core.conf but is different than what was in application.conf +#### __aw__ This was in substances-core.conf but is different than what was in application.conf # gsrs.importAdapterFactories.substances = [] # gsrs.importAdapterFactories.substances += { # "importAdapterFactoryClass" = "gsrs.module.substance.importers.SDFImportAdapterFactory", @@ -921,291 +944,303 @@ gsrs.standardizers.substances = { # ] # } # } + +# __aw__ what does this refer to? # this is the length to expect the column to be # for names after truncation -#### AW: this was copied from application.conf for others' testing purposes +#### __aw__: this was copied from application.conf for others' testing purposes #### In future we may want this in substances-core.conf as it can be overridden ### need to reconcile the various ways this stuff is configured in different places. + gsrs.importAdapterFactories.substances.list.SDFImportAdapterFactory = - { - "adapterName": "SDF Adapter", - "importAdapterFactoryClass": "gsrs.module.substance.importers.SDFImportAdapterFactory", - "order": 1000, - "stagingAreaServiceClass": "gsrs.stagingarea.service.DefaultStagingAreaService", - "entityServiceClass" :"gsrs.dataexchange.SubstanceStagingAreaEntityService", - "description" : "SD file importer for general users", - "supportedFileExtensions": [ - "sdf", - "sd", - "sdfile" - ], - - "parameters": { + { + "adapterName": "SDF Adapter", + "importAdapterFactoryClass": "gsrs.module.substance.importers.SDFImportAdapterFactory", + "order": 1000, + "stagingAreaServiceClass": "gsrs.stagingarea.service.DefaultStagingAreaService", + "entityServiceClass" :"gsrs.dataexchange.SubstanceStagingAreaEntityService", + "description" : "SD file importer for general users", + "supportedFileExtensions": [ + "sdf", + "sd", + "sdfile" + ], + + "parameters": { #the things used to instantiate a thing used to do the import - "fileImportActions": [ + "fileImportActions": [ ##list of available actions for user to select from #each action takes in a file record + a substance record to update substance record with data from file { - "actionClass": "gsrs.module.substance.importers.importActionFactories.NameExtractorActionFactory", - "fields": [ - { - "fieldName": "Name", - "fieldLabel": "Substance Name", - "defaultValue": null, - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": true, - "lookupKey": null - }, - { - "fieldName": "nameType", - "fieldLabel": "Name Type", - "defaultValue": "cn", - "cv": "name_type", - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": false, - "lookupKey": null - }, - { - "fieldName": "displayName", - "fieldLabel": "Display Name?", - "defaultValue": false, - "fieldType": "java.lang.Boolean", - "expectedToChange": true, - "required": false, - "lookupKey": null - } - ], - "parameters": { - "lang": "en" + "actionClass": "gsrs.module.substance.importers.importActionFactories.NameExtractorActionFactory", + "fields": [ + { + "fieldName": "Name", + "fieldLabel": "Substance Name", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null }, - "actionName": "common_name", - "label":"Create Name" - }, - { - "actionName": "code_import", - "label":"Create Code", - "actionClass": "gsrs.module.substance.importers.importActionFactories.CodeExtractorActionFactory", - "fields": [ - { - "fieldName": "code", - "fieldLabel": "Code/Identifier", - "defaultValue": null, - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": true, - "lookupKey": null - }, - { - "fieldName": "codeType", - "fieldLabel": "Primary or Alternative", - "defaultValue": "PRIMARY", - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": false, - "lookupKey": null - }, - { - "fieldName": "codeSystem", - "fieldLabel": "Code System", - "defaultValue": null, - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": true, - "lookupKey": null - } - ], - "parameters": { + { + "fieldName": "nameType", + "fieldLabel": "Name Type", + "defaultValue": "cn", + "cv": "name_type", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "displayName", + "fieldLabel": "Display Name?", + "defaultValue": false, + "fieldType": "java.lang.Boolean", + "expectedToChange": true, + "required": false, + "lookupKey": null } + ], + "parameters": { + "lang": "en" }, - { - "actionClass": "gsrs.module.substance.importers.importActionFactories.NSRSCustomCodeExtractorActionFactory", - "fields": [ - { - "fieldName": "code", - "fieldLabel": "NSC Number", - "defaultValue": null, - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": true, - "lookupKey": null - }, - { - "fieldName": "codeType", - "fieldLabel": "Primary or Alternative", - "defaultValue": "PRIMARY", - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": false, - "lookupKey": null - } - ], - "parameters": { - "codeSystem": "NSC" + "actionName": "common_name", + "label":"Create Name" + }, + { + "actionName": "code_import", + "label":"Create Code", + "actionClass": "gsrs.module.substance.importers.importActionFactories.CodeExtractorActionFactory", + "fields": [ + { + "fieldName": "code", + "fieldLabel": "Code/Identifier", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null }, - "actionName": "nci_import", - "label":"Create NSC Code" - }, - { - "actionClass": "gsrs.module.substance.importers.importActionFactories.StructureExtractorActionFactory", - "fields": [ - { - "fieldName": "molfile", - "fieldLabel": "Structure", - "defaultValue": null, - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": true, - "lookupKey": null - } - ], - "parameters": { - + { + "fieldName": "codeType", + "fieldLabel": "Primary or Alternative", + "defaultValue": "PRIMARY", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null }, - "actionName": "structure_and_moieties", - "label":"Create Structure" - }, - { - "actionClass": "gsrs.module.substance.importers.importActionFactories.PropertyExtractorActionFactory", - "fields": [ - { - "fieldName": "name", - "fieldLabel": "Name", - "defaultValue": null, - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": true, - "lookupKey": null - }, - { - "fieldName": "propertyType", - "fieldLabel": "Property Type", - "defaultValue": "chemical", - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": false, - "lookupKey": null - }, - { - "fieldName": "valueAverage", - "fieldLabel": "Average Value", - "defaultValue": null, - "fieldType": "java.lang.Double", - "expectedToChange": true, - "required": false, - "lookupKey": null - }, - { - "fieldName": "valueNonNumeric", - "fieldLabel": "Non-numeric Value", - "defaultValue": null, - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": false, - "lookupKey": null - }, - { - "fieldName": "valueUnits", - "fieldLabel": "Units", - "defaultValue": null, - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": false, - "lookupKey": null - } - ], - "parameters": { + { + "fieldName": "codeSystem", + "fieldLabel": "Code System", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + } + ], + "parameters": { + } + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.NSRSCustomCodeExtractorActionFactory", + "fields": [ + { + "fieldName": "code", + "fieldLabel": "NSC Number", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null }, - "actionName": "property_import", - "label":"Create Chemical Property" + { + "fieldName": "codeType", + "fieldLabel": "Primary or Alternative", + "defaultValue": "PRIMARY", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + } + ], + "parameters": { + "codeSystem": "NSC" }, - { - "actionClass": "gsrs.module.substance.importers.importActionFactories.ReferenceExtractorActionFactory", - "fields": [ - { - "fieldName": "docType", - "fieldLabel": "Type", - "defaultValue": "OTHER", - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": true, - "lookupKey": null - }, - { - "fieldName": "citation", - "fieldLabel": "Reference", - "defaultValue": "{INSERT REFERENCE CITATION HERE}", - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": false, - "lookupKey": null - } - ], - "parameters": { + "actionName": "nci_import", + "label":"Create NSC Code" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.StructureExtractorActionFactory", + "fields": [ + { + "fieldName": "molfile", + "fieldLabel": "Structure", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + } + ], + "parameters": { - }, - "actionName": "public_reference", - "label":"Create Reference" }, - { - "actionClass": "gsrs.module.substance.importers.importActionFactories.NotesExtractorActionFactory", - "fields": [ - { - "fieldName": "note", - "fieldLabel": "Note", - "defaultValue": null, - "fieldType": "java.lang.String", - "expectedToChange": true, - "required": true, - "lookupKey": null - } - ], - "parameters": { + "actionName": "structure_and_moieties", + "label":"Create Structure" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.PropertyExtractorActionFactory", + "fields": [ + { + "fieldName": "name", + "fieldLabel": "Name", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null }, - "actionName": "note_import", - "label":"Create Note" + { + "fieldName": "propertyType", + "fieldLabel": "Property Type", + "defaultValue": "chemical", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "valueAverage", + "fieldLabel": "Average Value", + "defaultValue": null, + "fieldType": "java.lang.Double", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "valueNonNumeric", + "fieldLabel": "Non-numeric Value", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + }, + { + "fieldName": "valueUnits", + "fieldLabel": "Units", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + } + ], + "parameters": { }, - { - "actionClass": "gsrs.module.substance.importers.importActionFactories.NoOpActionFactory", - "fields": [ + "actionName": "property_import", + "label":"Create Chemical Property" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.ReferenceExtractorActionFactory", + "fields": [ { - "fieldName": "fieldName", - "fieldLabel": "Field to ignore", - "fieldType": "java.lang.String", - "expectedToChange": true, - "lookupKey": null - } - ], - "parameters": { + "fieldName": "docType", + "fieldLabel": "Type", + "defaultValue": "OTHER", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null }, - "actionName": "no-op", - "label":"Omit this field" - } - ] - } + { + "fieldName": "citation", + "fieldLabel": "Reference", + "defaultValue": "{INSERT REFERENCE CITATION HERE}", + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": false, + "lookupKey": null + } + ], + "parameters": { + + }, + "actionName": "public_reference", + "label":"Create Reference" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.NotesExtractorActionFactory", + "fields": [ + { + "fieldName": "note", + "fieldLabel": "Note", + "defaultValue": null, + "fieldType": "java.lang.String", + "expectedToChange": true, + "required": true, + "lookupKey": null + } + ], + "parameters": { + }, + "actionName": "note_import", + "label":"Create Note" + }, + { + "actionClass": "gsrs.module.substance.importers.importActionFactories.NoOpActionFactory", + "fields": [ + { + "fieldName": "fieldName", + "fieldLabel": "Field to ignore", + "fieldType": "java.lang.String", + "expectedToChange": true, + "lookupKey": null + } + ], + "parameters": { + }, + "actionName": "no-op", + "label":"Omit this field" + } + ] } + } gsrs.importAdapterFactories.substances.list.GSRSJSONImportAdapterFactory = - { - "adapterName": "GSRS JSON Adapter", - "importAdapterFactoryClass": "gsrs.module.substance.importers.GSRSJSONImportAdapterFactory", - "order": 1100, - "stagingAreaServiceClass": "gsrs.stagingarea.service.DefaultStagingAreaService", - "entityServiceClass" :"gsrs.dataexchange.SubstanceStagingAreaEntityService", - "description" : "GSRS legacy JSON file importer", - #extensions belong here because they can override the default set within the class - "supportedFileExtensions": [ - "gsrs", - "gz" - ], - "parameters": { - } + { + "adapterName": "GSRS JSON Adapter", + "importAdapterFactoryClass": "gsrs.module.substance.importers.GSRSJSONImportAdapterFactory", + "order": 1100, + "stagingAreaServiceClass": "gsrs.stagingarea.service.DefaultStagingAreaService", + "entityServiceClass" :"gsrs.dataexchange.SubstanceStagingAreaEntityService", + "description" : "GSRS legacy JSON file importer", + #extensions belong here because they can override the default set within the class + "supportedFileExtensions": [ + "gsrs", + "gz" + ], + "parameters": { } + } + + +### __aw__ is this needed? +# gsrs.defaultStagingAreaServiceClass.substances = gsrs.stagingarea.service.DefaultStagingAreaService +# gsrs.defaultStagingAreaEntityService.substances = gsrs.dataexchange.SubstanceStagingAreaEntityService +# gsrs.availableProcessActions.substances = ["gsrs.dataexchange.processingactions.CreateProcessingAction", +# "gsrs.dataexchange.processingactions.MergeProcessingAction", +# "gsrs.dataexchange.processingactions.RejectProcessingAction", +# "gsrs.dataexchange.processingactions.CreateBatchProcessingAction"] @@ -1215,20 +1250,20 @@ gsrs.substance.data.nameColumnLength=254 # This feature allows one to filter on validation message ids or message texts to -# for example change a warning to a notice for users with a given role. +# for example change a warning to a notice for users with a given role. # OverrideRule(s) could look like this: -# {"regex": "W.*", "userRoles": ["Approver","Admin"], "newMessageType": "NOTICE"} +# {"regex": "W.*", "userRoles": ["Approver","Admin"], "newMessageType": "NOTICE"} # In this sample rule, the regex determines if the messageId begins with W, implying # a warning. gsrs.processing-strategy = { - "defaultStrategy": "ACCEPT_APPLY_ALL", - "overrideRules": [ - # NamesValidator duplicateNameIsError - # {"regex": "W7431274", "newMessageType": "ERROR"}, - # {"regex": "W7439452", "newMessageType": "ERROR"}, - # SubstanceUniquenessValidator - {"regex": "E4562650", "userRoles": ["SuperUpdate", "SuperDataEntry"], "newMessageType": "WARNING"} - ] +"defaultStrategy": "ACCEPT_APPLY_ALL", +"overrideRules": [ + # NamesValidator duplicateNameIsError + # {"regex": "W7431274", "newMessageType": "ERROR"}, + # {"regex": "W7439452", "newMessageType": "ERROR"}, + # SubstanceUniquenessValidator + {"regex": "E4562650", "userRoles": ["SuperUpdate", "SuperDataEntry"], "newMessageType": "WARNING"} +] } @@ -1237,56 +1272,56 @@ gsrs.processing-strategy = { ## decide if this should be included after testing. gsrs.matchableCalculators.substances.list.CASNumberMatchableExtractor = - { - "matchableCalculationClass" : "gsrs.dataexchange.extractors.CASNumberMatchableExtractor", - "order": 1000, - "config": { - "casCodeSystems": ["CAS", "CASNo", "CASNumber"] - } - } +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.CASNumberMatchableExtractor", + "order": 1000, + "config": { + "casCodeSystems": ["CAS", "CASNo", "CASNumber"] + } +} gsrs.matchableCalculators.substances.list.AllNamesMatchableExtractor = - { - "matchableCalculationClass" : "gsrs.dataexchange.extractors.AllNamesMatchableExtractor", - "order": 1100, - "config" :{} - } +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.AllNamesMatchableExtractor", + "order": 1100, + "config" :{} +} gsrs.matchableCalculators.substances.list.ApprovalIdMatchableExtractor = - { - "matchableCalculationClass" : "gsrs.dataexchange.extractors.ApprovalIdMatchableExtractor", - "order": 1200, - "config" :{} - } +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.ApprovalIdMatchableExtractor", + "order": 1200, + "config" :{} +} gsrs.matchableCalculators.substances.list.DefinitionalHashMatchableExtractor = - { - "matchableCalculationClass" : "gsrs.dataexchange.extractors.DefinitionalHashMatchableExtractor", - "order": 1300, - "config" :{} - } +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.DefinitionalHashMatchableExtractor", + "order": 1300, + "config" :{} +} gsrs.matchableCalculators.substances.list.SelectedCodesMatchableExtractor = - { - "matchableCalculationClass" : "gsrs.dataexchange.extractors.SelectedCodesMatchableExtractor", - "order": 1400, - "config": { - "codeSystems" :["CAS", "ChemBL", "NCI", "NSC", "EINECS"] - } - } +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.SelectedCodesMatchableExtractor", + "order": 1400, + "config": { + "codeSystems" :["CAS", "ChemBL", "NCI", "NSC", "EINECS"] + } +} gsrs.matchableCalculators.substances.list.UUIDMatchableExtractor = - { - "matchableCalculationClass" : "gsrs.dataexchange.extractors.UUIDMatchableExtractor", - "order": 1500, - "config" :{} - } +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.UUIDMatchableExtractor", + "order": 1500, + "config" :{} +} gsrs.matchableCalculators.substances.list.CodeMatchableExtractor = - { - "matchableCalculationClass" : "gsrs.dataexchange.extractors.CodeMatchableExtractor", - "order": 1600, - "disabled": true, - "config": { - "reqCodeSystems": ["FDA UNII"], - "codeType": "PRIMARY", - "codeKey": "CODE" - } - } +{ + "matchableCalculationClass" : "gsrs.dataexchange.extractors.CodeMatchableExtractor", + "order": 1600, + "disabled": true, + "config": { + "reqCodeSystems": ["FDA UNII"], + "codeType": "PRIMARY", + "codeKey": "CODE" + } +} @@ -1296,49 +1331,49 @@ gsrs.matchableCalculators.substances.list.CodeMatchableExtractor = # This shows how special render settings can be applied # at a pretty deep explicit level. This is ported over largely from how # it was done in GSRS 2.8 -# -# +# +# # 1. Supports embedded JSON options definitions for the structure renderer # 2. Supports naming styles for use # 3. Supports using previously named styles and making variations of them # gsrs.renderers.list=[ { - "name" : "CLEAN", - "renderer" :{ - "preset": "USP", //Note this part - "options" : { - "PROP_KEY_DRAW_GREYSCALE" : false, - "ATOM_LABEL_FONT_FRACTION" : 0.47918, - "ATOM_LABEL_BOND_GAP_FRACTION" :1.02, - "BOND_STROKE_WIDTH_FRACTION" : 0.032, - "BOND_DOUBLE_GAP_FRACTION": 0.1995, - "BOND_STEREO_WEDGE_ANGLE" : 0.13659, - "BOND_STEREO_DASH_NUMBER" :8, - "SUBSCRIPT_Y_DISPLACEMENT_FRACTION" : 0.17, - "DRAW_WEDGE_AS_POINT" : false, - "DRAW_STEREO_WEDGE_JOIN" : true, - "DRAW_STEREO_LAST_DASH_ON_NON_SYMBOLS" : false, - "colorPalette" : { - "atomColors" : { - "C" : "FFFF0000" // red carbons (ugly) - } +"name" : "CLEAN", +"renderer" :{ + "preset": "USP", //Note this part + "options" : { + "PROP_KEY_DRAW_GREYSCALE" : false, + "ATOM_LABEL_FONT_FRACTION" : 0.47918, + "ATOM_LABEL_BOND_GAP_FRACTION" :1.02, + "BOND_STROKE_WIDTH_FRACTION" : 0.032, + "BOND_DOUBLE_GAP_FRACTION": 0.1995, + "BOND_STEREO_WEDGE_ANGLE" : 0.13659, + "BOND_STEREO_DASH_NUMBER" :8, + "SUBSCRIPT_Y_DISPLACEMENT_FRACTION" : 0.17, + "DRAW_WEDGE_AS_POINT" : false, + "DRAW_STEREO_WEDGE_JOIN" : true, + "DRAW_STEREO_LAST_DASH_ON_NON_SYMBOLS" : false, + "colorPalette" : { + "atomColors" : { + "C" : "FFFF0000" // red carbons (ugly) } - }, - "add-shadow" : true, - "add-border" : false } + }, + "add-shadow" : true, + "add-border" : false + } }, { - "name" : "MONSTRUOUS", - "renderer" :{ - "preset": "CLEAN", //Note this part - "options" : { - "BOND_STROKE_WIDTH_FRACTION" : 0.64 - }, - "add-shadow" : false, - "add-border" : false - } +"name" : "MONSTRUOUS", +"renderer" :{ + "preset": "CLEAN", //Note this part + "options" : { + "BOND_STROKE_WIDTH_FRACTION" : 0.64 + }, + "add-shadow" : false, + "add-border" : false + } } ] From 29ca25cec129e564b762b0f528730cd5c530a020 Mon Sep 17 00:00:00 2001 From: alx652 Date: Fri, 17 May 2024 15:25:31 -0400 Subject: [PATCH 16/23] edit config comment --- .../src/main/resources/substances-core.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gsrs-module-substances-core/src/main/resources/substances-core.conf b/gsrs-module-substances-core/src/main/resources/substances-core.conf index bd0d7a2e9..a03ed475d 100644 --- a/gsrs-module-substances-core/src/main/resources/substances-core.conf +++ b/gsrs-module-substances-core/src/main/resources/substances-core.conf @@ -459,6 +459,9 @@ XXXX_ix.ginas.export.factories.substances_XXXX = [ # "ix.ginas.exporters.SRSLegacyDictionaryExporterFactory" ] + +# note some of these are "disabled=true" by default + ix.ginas.export.exporterfactories.substances.list.DefaultSubstanceSpreadsheetExporterFactory = { "exporterFactoryClass" = "gsrs.module.substance.exporters.DefaultSubstanceSpreadsheetExporterFactory", @@ -505,7 +508,7 @@ ix.ginas.export.exporterfactories.substances.list.SRSLegacyDictionaryExporterFac "parameters":{ } } -# + ix.ginas.export.exporterfactories.substances.list.SdfExporterFactory = { "exporterFactoryClass" = "gsrs.module.substance.exporters.SdfExporterFactory", From 218806dc562c06ac65250b0f8409d33aaa95964f Mon Sep 17 00:00:00 2001 From: alx652 Date: Fri, 17 May 2024 16:21:08 -0400 Subject: [PATCH 17/23] fix some test configs --- .../src/main/resources/fda-extension.conf | 2 +- .../src/test/resources/application-test.conf | 4 ++-- .../ginas/utils/validation/validators/tags/TagsValidator.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gsrs-module-substance-example/src/main/resources/fda-extension.conf b/gsrs-module-substance-example/src/main/resources/fda-extension.conf index 13d995bb2..72b63cc57 100644 --- a/gsrs-module-substance-example/src/main/resources/fda-extension.conf +++ b/gsrs-module-substance-example/src/main/resources/fda-extension.conf @@ -94,7 +94,7 @@ ix.ginas.export.exporterfactories.substances.list.SRSLegacyDictionaryExporterFac ix.ginas.approvalIdGenerator.generatorClass=ix.ginas.utils.UNIIGenerator -gsrs.validators.substances.BdNumModificationValidator = +gsrs.validators.substances.list.BdNumModificationValidator = { "validatorClass" = "fda.gsrs.substance.validators.BdNumModificationValidator", "newObjClass" = "ix.ginas.models.v1.Substance", diff --git a/gsrs-module-substance-example/src/test/resources/application-test.conf b/gsrs-module-substance-example/src/test/resources/application-test.conf index 69c724aa4..c97a1f2cd 100644 --- a/gsrs-module-substance-example/src/test/resources/application-test.conf +++ b/gsrs-module-substance-example/src/test/resources/application-test.conf @@ -59,8 +59,8 @@ gsrs.standardizers.substances = { # reconcile how this stuff is configured -gsrs.importAdapterFactories.substances = {} -gsrs.importAdapterFactories.substances.SDFImportAdapterFactory = +gsrs.importAdapterFactories.substances.list = {} +gsrs.importAdapterFactories.substances.list.SDFImportAdapterFactory = { "adapterName": "SDF Adapter", diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/tags/TagsValidator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/tags/TagsValidator.java index 5eba2cd4d..a7e9b9b17 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/tags/TagsValidator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/tags/TagsValidator.java @@ -44,7 +44,7 @@ public class TagsValidator extends AbstractValidatorPlugin { * * Without this setting, the validator will not be run on submission of a substance. * - * gsrs.validators.substances += { + * gsrs.validators.substances.list.TagsValidator = { * "validatorClass" = "ix.ginas.utils.validation.validators.tags.TagsValidator", * "newObjClass" = "ix.ginas.models.v1.Substance", * parameters: { From 10226e9b0662fa048966107c3cb0693eb50a9fb6 Mon Sep 17 00:00:00 2001 From: alx652 Date: Fri, 17 May 2024 19:11:14 -0400 Subject: [PATCH 18/23] fix import --- .../src/main/java/ix/ginas/utils/CodeSequentialGenerator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/CodeSequentialGenerator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/CodeSequentialGenerator.java index e23173fd8..61aa5d826 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/CodeSequentialGenerator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/CodeSequentialGenerator.java @@ -13,6 +13,7 @@ import ix.ginas.models.v1.Substance; import lombok.extern.slf4j.Slf4j; +import java.util.Map; import java.util.Objects; /* See UniqueCodeGenerator. From 0b538b5f0dda2007866a2127d52509860ea36ec7 Mon Sep 17 00:00:00 2001 From: alx652 Date: Sat, 1 Jun 2024 11:49:27 -0400 Subject: [PATCH 19/23] fix test conf --- .../src/main/resources/application.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gsrs-module-substance-example/src/main/resources/application.conf b/gsrs-module-substance-example/src/main/resources/application.conf index b8e306a34..09d5102e8 100644 --- a/gsrs-module-substance-example/src/main/resources/application.conf +++ b/gsrs-module-substance-example/src/main/resources/application.conf @@ -25,8 +25,8 @@ ix.authentication.logheaders=false #logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE logging.level.gsrs.module.substance.scrubbers.basic=trace -gsrs.matchableCalculators.substances = -[ +gsrs.matchableCalculators.substances.list.CASNumberMatchableExtractor = +{ {"matchableCalculationClass" : "gsrs.dataexchange.extractors.CASNumberMatchableExtractor", "config" :{ "casCodeSystems": ["CAS", "CASNo", "CASNumber"] @@ -49,5 +49,5 @@ gsrs.matchableCalculators.substances = "codeKey": "CODE" } } -] +} From 790e4b1cb884cdf0abe8af3ca986ce409a506da1 Mon Sep 17 00:00:00 2001 From: alx652 Date: Tue, 22 Oct 2024 00:05:00 -0400 Subject: [PATCH 20/23] merge changes from 3.1.1 post public --- ...ar => applications-api-3.1.2-SNAPSHOT.jar} | Bin 26806 -> 26806 bytes ...=> clinical-trials-api-3.1.2-SNAPSHOT.jar} | Bin 46824 -> 46824 bytes ...OT.jar => products-api-3.1.2-SNAPSHOT.jar} | Bin 76868 -> 76868 bytes gsrs-fda-substance-extension/pom.xml | 8 ++++---- gsrs-module-substance-example/pom.xml | 4 ++-- gsrs-module-substances-api/pom.xml | 2 +- gsrs-module-substances-core/pom.xml | 2 +- gsrs-module-substances-data-exchange/pom.xml | 2 +- gsrs-module-substances-dto/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- gsrs-module-substances-tests/pom.xml | 2 +- gsrs-ncats-substance-extension/pom.xml | 2 +- installExtraJars.cmd | 6 +++--- installExtraJars.sh | 6 +++--- pom-version.properties | 8 +++++--- pom.xml | 9 ++++++--- 17 files changed, 31 insertions(+), 26 deletions(-) rename extraJars/{applications-api-3.1.1-SNAPSHOT.jar => applications-api-3.1.2-SNAPSHOT.jar} (82%) rename extraJars/{clinical-trials-api-3.1.1-SNAPSHOT.jar => clinical-trials-api-3.1.2-SNAPSHOT.jar} (86%) rename extraJars/{products-api-3.1.1-SNAPSHOT.jar => products-api-3.1.2-SNAPSHOT.jar} (88%) diff --git a/extraJars/applications-api-3.1.1-SNAPSHOT.jar b/extraJars/applications-api-3.1.2-SNAPSHOT.jar similarity index 82% rename from extraJars/applications-api-3.1.1-SNAPSHOT.jar rename to extraJars/applications-api-3.1.2-SNAPSHOT.jar index 13aa94f2519444180c568f49783e7e402f739272..3728274dc19e6950b536c2660e3ac21c5771cef9 100644 GIT binary patch delta 1264 zcmdmXk#XBaM(F@=W)=|!1`ZB}vR$E(zcx+Z-NL}Yun>qvCJV-h*QfSw+u%uYWBIin|n>xJ`C%6EMt3Cglk$UkDK1So>+=@3#UWxup{x@q!%51#~0>$dMBdt1yG8SMnfgG7qCNm^Nb6 z0MoIIreJz1qa~QW$fyOT|1nyCX-g(g5WTsT$%Glq*u#1Y%$Pir^B-8nEUy1xi80BS5Kifd$=>4A}9AB@N zIYno7$*kJzv-V1T(5}q&e0SKkCq!=(HuC-buK10EN3@C3S{sEL%j5sO}Vy8QqlBw!vUX-dsuY7 zcG=k7naFKZxY?z!y7F{ReRf59_AEB@=l3S~sRe)f{I2X_+6u`>ha%L9UfkxLFZusl z*t0WLXX^Fj`8BsK<8XaadZTyp8GSd=%L+Ny*80rc_GjkPZ_7@Exk-ndPKsqr@(Q(? zAmLTDsJVFQ)2O#OMa``G8w-k-=bmPNX!qldjDKO5*!OsO@$3BlQ?`6{aQjuCaV62= zYqI`_*npyt?nT>w)TSIi-@mbW4+HC>g8TEDUka8zjcx=#DZ(LS?@NCnu)F^|~)6N{=xMn2#BYh9^i_kw4d+yW&gW-)nY90-l zeCy5R@aSfRo|5LjGR#f3f1GzP1b8zti7=yP@Hzvk`X`v*DzDY?Cbw865z~V8<$zb|Way*z;Nr9N#nbHjA^QS`iC8>>I i{tqZ!la>nRKS`?w(@E*Ih}8c)JsO-b!NKK~kplqnJSuho delta 1264 zcmdmXk#XBaM(F@=W)=|!1`ZB}$psdXiqpRxZ((3ySO~--lLceM>r;C-avd@dasBS_ zPtpEE)7It*XLn^RjPfX~H}S7D=~eV({eSP(gGW^s&+qXu-`5b|5p?Pghg)cs@=--W zv7!rmdR~3-blf^4@`{U(68&VjO|$wu4$z_Yk_SQ9@bl6#^jlt|G+9{as3BN%;9EX z1Tz-%G_ZgfYJx>A#~Bcqitb(cOB9d$(TgI`(y?xsTgo!^$1I=IoZ#YTIEjt&?Y0+2Q5K_V1k{ zxmoV>{L{y4yLwML3s%aOJy!YJ9eC7)WA--f;AOh?DKr00Uhch^cU8(hEk?toUUD8h zs6R%UQ^X|yrSn>ef_;N_3`(EE?r@kd|AIJu$}Sg zU%v;t7d%-Y<|_Yj_ldsw@=5HKd|WQ?_Sv#uR?IoA|NBv(ZJp#&wq*NenTS~&esSCR z_DJumJ)!pGa;pu~-CT}6w{I+6BlfA1p-%bD(`i}K#@fNF!yP=W-yF2^D^Cxl)LH@;R63z=0B8=Z+YjcHks>^L2$)C{aCxTEZg6$ z+rcb*Vczw{VfSxeHh++|>CjP?^l7>?8X4CdUGjYXN6rPoAKi_L{x@!jyj+f&M?=3_ zluizhZdTwaZT>66++_R5c?Uy)HzSh>GipYj{43fDl!hjo$C!ZWycm5jy&%RIOkazE zWC_7oS1>;^7MwLEFO7xhdlc&d7T1l71k;^y^+6d;bX5=b7 zg(6sxgu@UBkQf9M!(nN~s|9IG1#CqD6~SY`7G;|Jw^PUIOyA6#-?zK}_wBc{Z+CK< zI5|yRy@x~6VPY7KhP7PY7dj@ixpxx7Fp1`6;ykgDFedLRz1v>@#JuOI89TX4CHneS zd)x)CZ;HooP(Cl(H>j(%mBo5K7Lb!Qqda&yko(5C-1^z>`e^f;PM^LzT65iqJP_${ zUZ$s8)AFd~Vo0&UxfJ5M_+NUj22X6E-(osEwxeu|HH)SEt|rmPd##p6j(fbGm-C}I zvnAdW0V{sy**3UqL((-NF>T1g9!pZQ22a*$fiELi038TczzBjfu$ZvLKr;a{1>&Q%93qH= zrn&?W>1KyXARbwAi4c+;fBFQOieX#^hPi7(x+!ut8d9M~%resf(dS@52l3lhD)M=> zjgOo^_cTF0sa_q(dGq!dG8C8kB~n081IfroZ{J!}Y#%H@v&(O8?oyI4END4~@ij}_ zinHDA6vm;w$m>Bk1AQgf&7p+#bG?Ll$+8%(lG{2-b^-q8C#a;(VJOGkneEJ*<4k zYoXFQN|YjL;!Hw+g|*_743+b6rQhSS75cVq4|0pYPuR`Di@tpx$xCbtJXU-EK-bbu zCLIH+DN)nZS4Z<>UA+1i)ieg96s{3Cgd*>jZDf!7Ou z6j@No=3iK-yIxy$yq0^vl(>34tD{7ZiA+L=oy*^ix+OCfGX^T|irvSTOeV3C9mlF= z!7tNwj@z1y7bkc~l{aOho__7g*t`>0taPimb1rxf=iTX$y~74~yH3p|jNdNhsVWQ8 zDoJ>uGpj5in_jH;e}yI-35D=ldxB8BQ&wN<|3{PCum0Ch}D_x7S7PRO8| zHe_!6MsS5R8S}QV{Ibw%Drb%%g>T@KLfVmvVKVm8o7Dg>5FV}YdlGT?>!bfB>e2g+ro zKu$vn@LB_EhczCB_F&_AV4A!HsM{m}o@hz}zGx}{iki{*nif=lwdFAM+bK}K4n^7$ t?UmM?5W1+sqZ$oye`Od{)GJegW|t64E~ULcZVVNVroH@OV=`2NzX7^Rq;LQL delta 1562 zcmaKs3rtg27{_mWDHIS?KoD4~r62+WDk35(D-tSNnRFrw2odE`DKE#v7p_GZWP-xH zJc8&{+ERt`E(}u*0#5J&hKHK?Ao5UL5hqhA4#lBr^ogqm9jpZ+HG7ERn%w@-r#mKG z5$LRFU2@YQ_rc=+px2W%d3m$yfygoI9!hOd><^q+M`fR?P~VWkAL>n=so;m+sVsfg z+c%g#8-4mmJGM2QW&3A!>wwDL?!r%d+8b}|9bHdcRq?!Ml$_$p-q_J6xN21TA~FpkHiGJk(L9)Ngluw(wc>u^$^WY{{7hy z4K8-DW#snddZy3+tuG@oeH@JblZGfEJK~yDL?_u3I7i;1?cWrD->?E;Z7jq1$%*4^1@`%|p#NqQCVf(kEtOYrL96i2#Bu?op&#rRkyHFLxN}*y*@9bu#B}zVL{HWi$QFxknq19DvegB!i zdQALQQOjG_+6RTr`Imhpq)uWZ$LJOptl^kpFF#ZMT*1=+{l)b2;u1k~$}J=FbzL0| zYZHhe!-*l8?BFqb{*-#WXGHxjVT15=hKOktPNf-`shc}?oGQ%PRWot^=rvBzl<(W8 z-R#Wn$JAsN?Uu*K#;x@2Y%Bd? zoK(3B>Ut}qfgZ9f;1!tw=y)*(NLaR8?z`S!4%BO5f v)z@BW4RIlJEktDPA|gN$1{Kwc6dZm6vv;t%{d?kdttmgVB`Ho2*^ZBoPmm|!$d(+!MChHoW$F3ASxp2Onk@( z15G0#1qItdYL$bDWNxWkkAlM+kGB8r$2V?=X~$)x9`38_nh1Q8>js@ zj+=5WncfL!eJGo3__sO+6s@-oNn2<9d;i^xS9`fFO za#}-aT+fQyperu@-J)z$zG!4&HD$_6`z#)M?tv(b9T13d2wuk+%8JF9 z!+L0qy0vUJAf$5^voLdx`;WkqNggt(V8L z(6Y?Crmc1yL1aq^LTRy-ll}4l-7>$^R!5wshhO4W7jrE`r4fxZ8X$rcW|+vXRie0^|J|L(gcD~ zSo@*0T+65?c!I00q~dS7hr&uV7i~ummC{ghbeL{fQ*TR~?QHO;Yd5~1TdcP{N^c~o zV*8PveRfo%qh;{VPIfxrpL7@&uc`=T&2svCJ%#{8jnY>RyfJ z1@C4-?hz61#}@g|Clex?AHTMA*A#`zO#$~*>!s~6p`s^Go^D>dVP%n8b^Y!suc7Zh z&qzuTH+|g;3bCi0kUDILBAMviD z8A<7PtA#yBKJ1>(@7OgsHCZvI;!SQ}No3!x=fSen8_$Q2hbCs|_c|S}Dj^<>J2;qr zZbh7FvT?@x(9Y(v%gU~5&X*Z{)AG3bZINypLsW6Lp({)~v)*9oZP`cXxmId@qRL~c z0-O^Hr58-!ieg*59aS@o$LsDJ2K+|-ySrZR$$fJ0hch+bJvdl3C=V~IxOFwhbKo+$ zc6jEGi**~fo9{Q6M>?jTum8E3vJ*gXxa?4yR=P^NB&l4`;8tYfPiNgr>W}KHEciwr zqcBhY|C-()UGpZjP5_0TecaJ0Tu#B$(hWc;=K@R2{{J$kxI&1weuvadAw(jmg)j-B zK?o5Dw}td}q&!401C=xp;GU$8iJ0qmMKBvv;bKTcC=WB1a|1Qt3yu`u8DcP*;0#3wmz|-2R$L$x z;j9ZRMsRn96$pi{kc@Ecr83P8l2D=CAPr&E4O9r3?of;{NSobgL%ZVTW delta 2122 zcmY+EeN>Zm6vv;tjj@4%8)G1^!;SX|LljXF5t4{RrIZ)Z!WWDR!F$!ks)gOl`6)|`pT+O_?V6&r+tv5Q z%P%FiSN@ru;-ah0^s6lGb#)B5D!(s#B&~k;$5u( z!8VcP8-T3e@(P9eR0Yf2P}@+6vWLSVh;(x@xYLc)yqZom*@KHZBEy`6C*!vsU}KB> z8e3QXNNQwqGI+#{(l~&tIwq%|?qcB%CGFVxi4}cqptPBWT4gC0`GmU_r*UG-2NEx{9`~Z<~#; zpnlvQNyFUEw`eHr3Zy~v1JM4hJt_;sbuzB+1^&&d{tB#>e5Rd3;g2Vd^tdga|BZtA zNS+D8-d7zsC@P){V_4eS`n$KtCfO`%g(vuteO;yv*Nx#WI@MP3Y0HKqCa|6(SP*R$ z7r926C1epqC|~~}Qt1NlE!dWleE0KpsZ|QmZry|xZ|vSy)#lqG!O35jRoyxB`R&N7 zSsJKKh`+=?c>LA)j1fUnNZ4`D2bYN*-MPbB`+|w=NqJWG8=f6M-L7gW(+b7UOV4k6 znwK}l`z<%SaKQ9tgY3?kD8GxN!qYccHPdvwqS!u#^ZrhoMT>%}=YLUI@Sc6c_T=^r zXOrxrMMm;1DVpTj2aoD3#=Uw&cSB;tMzLzk<)fyF-;M{iKG-mozAZcaTuf9VC)zmj zXVc+?YZ{fp;evEB_M^t;nkjpub1IWffgSI%mU$cvywmZfL$kAIMWA&e@8Oa#%l2s( zZut)u)qCfpnbxM6M86*tcsi(HQPAYq=VDfUz2~tVN0ood$e-;rmb`bw_S^&2S|-5pR}$kj3SoiaJETH|Fb5$= z2tEjPLhwU)B&4?^XK{`UJJrp90*h3ydrUTJm zIx=359T{b#6C~i_HYZ3y@Ru;ADhU*$V(SbaAbjG?wD`;!K1L;eCNry+natq`DQv*h zSt(P7j|?(V`AP;w2wpBssb^haJFU3FMuc)#<~g3aLOd#Ox gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 @@ -110,7 +110,7 @@ gov.nih.ncats applications-api - 3.1.1-SNAPSHOT + ${gsrs.applications-api.version} org.apache.logging.log4j @@ -139,7 +139,7 @@ gov.nih.ncats products-api - 3.1.1-SNAPSHOT + ${gsrs.products-api.version} org.apache.logging.log4j @@ -168,7 +168,7 @@ gov.nih.ncats clinical-trials-api - 3.1.1-SNAPSHOT + ${gsrs.clinical-trials-api.version} org.apache.logging.log4j diff --git a/gsrs-module-substance-example/pom.xml b/gsrs-module-substance-example/pom.xml index d139403d2..a3c6b6d9f 100644 --- a/gsrs-module-substance-example/pom.xml +++ b/gsrs-module-substance-example/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 @@ -339,7 +339,7 @@ commons-io commons-io - 2.11.0 + 2.14.0 org.apache.commons diff --git a/gsrs-module-substances-api/pom.xml b/gsrs-module-substances-api/pom.xml index 42b298e2a..49e2495dc 100644 --- a/gsrs-module-substances-api/pom.xml +++ b/gsrs-module-substances-api/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 diff --git a/gsrs-module-substances-core/pom.xml b/gsrs-module-substances-core/pom.xml index 675a6c34c..7039b183e 100644 --- a/gsrs-module-substances-core/pom.xml +++ b/gsrs-module-substances-core/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 diff --git a/gsrs-module-substances-data-exchange/pom.xml b/gsrs-module-substances-data-exchange/pom.xml index 83bbe0082..d8f8a494d 100644 --- a/gsrs-module-substances-data-exchange/pom.xml +++ b/gsrs-module-substances-data-exchange/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 diff --git a/gsrs-module-substances-dto/pom.xml b/gsrs-module-substances-dto/pom.xml index ac316f23d..99fa094a4 100644 --- a/gsrs-module-substances-dto/pom.xml +++ b/gsrs-module-substances-dto/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT diff --git a/gsrs-module-substances-spring-boot-autoconfigure/pom.xml b/gsrs-module-substances-spring-boot-autoconfigure/pom.xml index 928caa8d3..6fe68744c 100644 --- a/gsrs-module-substances-spring-boot-autoconfigure/pom.xml +++ b/gsrs-module-substances-spring-boot-autoconfigure/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 diff --git a/gsrs-module-substances-spring-boot-starter/pom.xml b/gsrs-module-substances-spring-boot-starter/pom.xml index edca18a96..fe4316ab4 100644 --- a/gsrs-module-substances-spring-boot-starter/pom.xml +++ b/gsrs-module-substances-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT 4.0.0 diff --git a/gsrs-module-substances-tests/pom.xml b/gsrs-module-substances-tests/pom.xml index ed2ed85e3..f7d20f03e 100644 --- a/gsrs-module-substances-tests/pom.xml +++ b/gsrs-module-substances-tests/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT diff --git a/gsrs-ncats-substance-extension/pom.xml b/gsrs-ncats-substance-extension/pom.xml index 8ecb5ee71..7a621a89f 100644 --- a/gsrs-ncats-substance-extension/pom.xml +++ b/gsrs-ncats-substance-extension/pom.xml @@ -5,7 +5,7 @@ gsrs-module-substances gov.nih.ncats - 3.1.1.1 + 3.1.2-SNAPSHOT diff --git a/installExtraJars.cmd b/installExtraJars.cmd index 72a00e097..b799a658c 100755 --- a/installExtraJars.cmd +++ b/installExtraJars.cmd @@ -1,4 +1,4 @@ -mvnw.cmd install:install-file -Dfile=extraJars/applications-api-3.1.1-SNAPSHOT.jar -mvnw.cmd install:install-file -Dfile=extraJars/products-api-3.1.1-SNAPSHOT.jar -mvnw.cmd install:install-file -Dfile=extraJars/clinical-trials-api-3.1.1-SNAPSHOT.jar +mvnw.cmd install:install-file -Dfile=extraJars/applications-api-3.1.2-SNAPSHOT.jar +mvnw.cmd install:install-file -Dfile=extraJars/products-api-3.1.2-SNAPSHOT.jar +mvnw.cmd install:install-file -Dfile=extraJars/clinical-trials-api-3.1.2-SNAPSHOT.jar mvnw.cmd install:install-file -Dfile=extraJars/Featureize-Nitrosamines-0.0.3-SNAPSHOT.jar diff --git a/installExtraJars.sh b/installExtraJars.sh index aafcf26cc..070fa29ea 100755 --- a/installExtraJars.sh +++ b/installExtraJars.sh @@ -1,4 +1,4 @@ -./mvnw install:install-file -Dfile=extraJars/applications-api-3.1.1-SNAPSHOT.jar -./mvnw install:install-file -Dfile=extraJars/products-api-3.1.1-SNAPSHOT.jar -./mvnw install:install-file -Dfile=extraJars/clinical-trials-api-3.1.1-SNAPSHOT.jar +./mvnw install:install-file -Dfile=extraJars/applications-api-3.1.2-SNAPSHOT.jar +./mvnw install:install-file -Dfile=extraJars/products-api-3.1.2-SNAPSHOT.jar +./mvnw install:install-file -Dfile=extraJars/clinical-trials-api-3.1.2-SNAPSHOT.jar ./mvnw install:install-file -Dfile=extraJars/Featureize-Nitrosamines-0.0.3-SNAPSHOT.jar diff --git a/pom-version.properties b/pom-version.properties index fa208adff..40490151e 100644 --- a/pom-version.properties +++ b/pom-version.properties @@ -1,4 +1,6 @@ # For use in project pom version check test -sm.pomversiontest.starterModuleVersion=3.1.1 -sm.pomversiontest.substancesModuleVersion=3.1.1.1 -sm.pomversiontest.otherModuleVersion=3.1.1-SNAPSHOT +# Need to adjust test for api versions +# mvn test -Dtest=gsrs.substances.tests.SubstancesPomsVersionTest -DdoPomCheck=true -pl gsrs-module-substances-tests +sm.pomversiontest.starterModuleVersion=3.1.2-SNAPSHOT +sm.pomversiontest.substancesModuleVersion=3.1.2-SNAPSHOT +sm.pomversiontest.otherModuleVersion=3.1.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index c31aeb672..5e878302e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ gov.nih.ncats gsrs-module-substances - 3.1.1.1 + 3.1.2-SNAPSHOT GSRS Substance Module Substance Module for GSRS Spring Boot https://github.com/ncats/gsrs-spring-module-substances @@ -33,8 +33,11 @@ 1.8 Hoxton.SR1 - 3.1.1 - 3.1.1.1 + 3.1.2-SNAPSHOT + 3.1.2-SNAPSHOT + 3.1.2-SNAPSHOT + 3.1.2-SNAPSHOT + 3.1.2-SNAPSHOT 2.4.5 2.17.2 From e9836c2a8802fbf0cc8ef76c15a7e9cdfe104f83 Mon Sep 17 00:00:00 2001 From: Mitch Miller Date: Wed, 23 Oct 2024 16:14:42 -0400 Subject: [PATCH 21/23] preventing an NPE when ChemicalUtils does not have a data file --- .../java/gsrs/module/substance/utils/ChemicalUtils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java b/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java index 492a010d6..9952fe9f0 100644 --- a/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java +++ b/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java @@ -130,7 +130,11 @@ public class ChemicalUtils { @PostConstruct private void setUpSalts() { - log.warn("in setUpSalts, structureHandlingConfiguration.getSaltFilePath(): {}", structureHandlingConfiguration.getSaltFilePath()); + if( structureHandlingConfiguration.getSaltFilePath() == null ) { + log.warn("ChemicalUtils - setUpSalts not initialized"); + return; + } + log.trace("in setUpSalts, structureHandlingConfiguration.getSaltFilePath(): {}", structureHandlingConfiguration.getSaltFilePath()); saltData = new HashMap<>(); try { File file = new File(structureHandlingConfiguration.getSaltFilePath()); From c2ce0920ff36455c75af2ac238f6b2d2c57fddb1 Mon Sep 17 00:00:00 2001 From: alx652 Date: Fri, 29 Nov 2024 14:46:05 -0500 Subject: [PATCH 22/23] report path in assertion fail message --- .../java/gsrs/module/substance/utils/ChemicalUtils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java b/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java index 9952fe9f0..1a8931a65 100644 --- a/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java +++ b/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java @@ -137,8 +137,10 @@ private void setUpSalts() { log.trace("in setUpSalts, structureHandlingConfiguration.getSaltFilePath(): {}", structureHandlingConfiguration.getSaltFilePath()); saltData = new HashMap<>(); try { - File file = new File(structureHandlingConfiguration.getSaltFilePath()); - Assert.assertTrue("input salt data file must exist!", file.exists()); + String path = structureHandlingConfiguration.getSaltFilePath(); + log.info("Trying to read salt file at path: " + path); + File file = new File(path); + Assert.assertTrue("input salt data file must exist! The path was: " + path, file.exists()); List lines = Files.readAllLines(file.toPath()); for (String line : lines) { String[] lineParts = line.split("\\t"); From 50a93495777432b00dcd45c67d7913855bda69f1 Mon Sep 17 00:00:00 2001 From: alx652 Date: Fri, 29 Nov 2024 16:50:44 -0500 Subject: [PATCH 23/23] change salt path to class path --- .../java/gsrs/module/substance/utils/ChemicalUtils.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java b/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java index 1a8931a65..6abb89049 100644 --- a/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java +++ b/gsrs-module-substances-core/src/main/java/gsrs/module/substance/utils/ChemicalUtils.java @@ -7,6 +7,7 @@ import lombok.extern.slf4j.Slf4j; import org.junit.Assert; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; @@ -139,12 +140,14 @@ private void setUpSalts() { try { String path = structureHandlingConfiguration.getSaltFilePath(); log.info("Trying to read salt file at path: " + path); - File file = new File(path); + File file = new ClassPathResource(path).getFile(); Assert.assertTrue("input salt data file must exist! The path was: " + path, file.exists()); List lines = Files.readAllLines(file.toPath()); for (String line : lines) { - String[] lineParts = line.split("\\t"); - saltData.put(lineParts[0], lineParts[1]); + if (line.matches(".*\\w.*")) { + String[] lineParts = line.split("\\t"); + saltData.put(lineParts[0], lineParts[1]); + } } } catch (Exception ex){