From b05b1886482a00b1582a60605fe08c7438799c69 Mon Sep 17 00:00:00 2001 From: epuzanov Date: Mon, 24 Jun 2024 16:25:46 +0200 Subject: [PATCH 1/2] Normalize the ValidationMassages texts --- .../BdNumModificationValidator.java | 6 +++--- .../main/java/ix/core/models/Structure.java | 4 ++-- .../main/java/ix/ginas/utils/ChemUtils.java | 4 ++-- .../ix/ginas/utils/GinasV1ProblemHandler.java | 7 ++----- .../java/ix/ginas/utils/ProteinUtils.java | 19 ++++++++----------- .../utils/validation/ValidationUtils.java | 2 +- .../validators/ChemicalValidator.java | 2 +- .../validators/CodeFormatValidator.java | 2 +- .../validators/DefinitionalHashValidator.java | 4 ++-- .../validation/validators/NamesValidator.java | 4 ++-- .../validators/NucleicAcidValidator.java | 8 ++++---- .../validators/PolymerValidator.java | 4 ++-- .../PrimaryDefinitionValidator.java | 2 +- .../validators/ProteinValidator.java | 8 ++++---- .../validators/StandardNameValidator.java | 4 ++-- .../SubstanceUniquenessValidator.java | 4 ++-- 16 files changed, 39 insertions(+), 45 deletions(-) diff --git a/gsrs-fda-substance-extension/src/main/java/fda/gsrs/substance/validators/BdNumModificationValidator.java b/gsrs-fda-substance-extension/src/main/java/fda/gsrs/substance/validators/BdNumModificationValidator.java index da286cb18..e641890f1 100644 --- a/gsrs-fda-substance-extension/src/main/java/fda/gsrs/substance/validators/BdNumModificationValidator.java +++ b/gsrs-fda-substance-extension/src/main/java/fda/gsrs/substance/validators/BdNumModificationValidator.java @@ -61,10 +61,10 @@ public void validate(Substance s, Substance objold, ValidatorCallback callback) if(!allCurrentBdNums.contains(bd)){ if(! ("SUPERSEDED".equalsIgnoreCase(bdnumType) || "SUPERCEDED".equalsIgnoreCase(bdnumType))){ //1. If the BDNUM literal that existed in the old record (e.g. XXXXXX) no longer exists in the current record, throw an error unless that BDNUM was marked as type "superseded". - callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE(bdnumType + " BDNUM " + bd + " has been removed, but only SUPERSEDED BDNUM codes may be removed")); + callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE("%s BDNUM %s has been removed, but only SUPERSEDED BDNUM codes may be removed", bdnumType, bd)); }else { - callback.addMessage(GinasProcessingMessage.WARNING_MESSAGE(bdnumType + " BDNUM " + bd + " has been removed")); + callback.addMessage(GinasProcessingMessage.WARNING_MESSAGE("%s BDNUM %s has been removed", bdnumType, bd)); } } } @@ -75,7 +75,7 @@ public void validate(Substance s, Substance objold, ValidatorCallback callback) //or if it has been removed (in which case we alrady added an error above for that) if(primaries !=null && primaries.size() > 1){ //2. If there are 2 or more BDNUMs where both are type "PRIMARY", throw an error. - callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE("can not have more than 1 PRIMARY BDNUM but have : " + primaries)); + callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE("Can not have more than 1 PRIMARY BDNUM but have : %s", primaries)); } } diff --git a/gsrs-module-substances-core/src/main/java/ix/core/models/Structure.java b/gsrs-module-substances-core/src/main/java/ix/core/models/Structure.java index 000d05c9d..1087c7087 100644 --- a/gsrs-module-substances-core/src/main/java/ix/core/models/Structure.java +++ b/gsrs-module-substances-core/src/main/java/ix/core/models/Structure.java @@ -513,7 +513,7 @@ public Chemical toChemical(List messages, boolean comput } }catch(Exception e){ e.printStackTrace(); - messages.add(GinasProcessingMessage.ERROR_MESSAGE(e.getMessage())); + messages.add(GinasProcessingMessage.ERROR_MESSAGE("SMILES parsing error: %s", e.getMessage())); } }else{ @@ -521,7 +521,7 @@ public Chemical toChemical(List messages, boolean comput c = Chemical.parseMol(molfile); }catch(Exception e){ e.printStackTrace(); - messages.add(GinasProcessingMessage.ERROR_MESSAGE(e.getMessage())); + messages.add(GinasProcessingMessage.ERROR_MESSAGE("Molfile parsing error: %s", e.getMessage())); } } diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/ChemUtils.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/ChemUtils.java index d6182f4be..0d729e675 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/ChemUtils.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/ChemUtils.java @@ -58,7 +58,7 @@ public static void checkValance(Structure newstr, List g for (Atom atom : c.getAtoms()) { if (atom.hasValenceError()) { GinasProcessingMessage mes = GinasProcessingMessage - .WARNING_MESSAGE("Valence Error on " + atom.getSymbol() + " atom (" + (atom.getAtomIndexInParent() + 1) + ") "); + .WARNING_MESSAGE("Valence Error on %s atom (%s)", atom.getSymbol(), (atom.getAtomIndexInParent() + 1)); gpm.add(mes); } } @@ -73,7 +73,7 @@ public static void checkValance(Structure newstr, List g public static void checkChargeBalance(Structure newstr, List gpm) { if (newstr.charge != 0) { GinasProcessingMessage mes = GinasProcessingMessage - .WARNING_MESSAGE("Structure is not charge-balanced, net charge of: " + newstr.charge); + .WARNING_MESSAGE("Structure is not charge-balanced, net charge of: %s", newstr.charge); gpm.add(mes); } } diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/GinasV1ProblemHandler.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/GinasV1ProblemHandler.java index 952641c72..f6a3f0bbc 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/GinasV1ProblemHandler.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/GinasV1ProblemHandler.java @@ -62,10 +62,7 @@ else if ("count".equals(property)) { } if (!parsed) { - messages.add(GinasProcessingMessage.WARNING_MESSAGE("Unknown property \"" - +property+"\" while parsing " - +bean+"; skipping it..")); - + messages.add(GinasProcessingMessage.WARNING_MESSAGE("Unknown property \"%s\" while parsing %s; skipping it..", property, bean)); log.debug("Unknown property \"" +property+"\" while parsing " +bean+"; skipping it.."); @@ -74,7 +71,7 @@ else if ("count".equals(property)) { } } catch (Exception ex) { - messages.add(GinasProcessingMessage.ERROR_MESSAGE("Error parsing substance JSON:" + ex.getMessage())); + messages.add(GinasProcessingMessage.ERROR_MESSAGE("Error parsing substance JSON:%s", ex.getMessage())); ex.printStackTrace(); } return true; diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/ProteinUtils.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/ProteinUtils.java index 21bbfba46..6aa21af21 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/ProteinUtils.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/ProteinUtils.java @@ -350,9 +350,8 @@ public static MolecularWeightAndFormulaContribution generateProteinWeightAndForm //There is no computable fragment to use log.info("No usable molecular weight contribution from structural modification fragment: " + mod.molecularFragment.refuuid); messages.add( - GinasProcessingMessage.WARNING_MESSAGE( - String.format("Structural modification will not affect the molecular weight because %s has no associated molecular weight", - mod.molecularFragment.refPname))); + GinasProcessingMessage.WARNING_MESSAGE("Structural modification will not affect the molecular weight because %s has no associated molecular weight", + mod.molecularFragment.refPname)); } else if (contribution.getMw() > 0 || (contribution.getMwHigh() > 0 && contribution.getMwLow() > 0)) { //removeWater(contribution.getFormulaMap()); 1 December 2020 MAM no need for this @@ -405,9 +404,8 @@ else if (contribution.getMw() > 0 || (contribution.getMwHigh() > 0 && contributi } else { log.trace("extent other than complete: " + mod.extent); - messages.add(GinasProcessingMessage.WARNING_MESSAGE( - String.format("Note: structural modification with extent '%s' will not be counted toward the molecular weight", - mod.extent != null ? mod.extent : "[missing]"))); + messages.add(GinasProcessingMessage.WARNING_MESSAGE("Note: structural modification with extent '%s' will not be counted toward the molecular weight", + mod.extent != null ? mod.extent : "[missing]")); } } } @@ -680,15 +678,14 @@ private static MolecularWeightAndFormulaContribution getContributionForID(Substa log.trace("contribution: " + ((contribution == null) ? "null" : "not null")); if ((mwHigh != null && mwHigh > 0) || (mwHighLimit != null && mwHighLimit > 0) || (mwLow != null && mwLow > 0) || (mwLowLimit != null && mwLowLimit > 0)) { - contribution.getMessages().add(GinasProcessingMessage.WARNING_MESSAGE( - String.format("Using range of molecular weights for substance %s in structural modification", - referencedSubstance.getName()))); + contribution.getMessages().add(GinasProcessingMessage.WARNING_MESSAGE("Using range of molecular weights for substance %s in structural modification", + referencedSubstance.getName())); } } else { GinasProcessingMessage warning = GinasProcessingMessage.WARNING_MESSAGE( - String.format("Structural modification molecular fragment %s has no average molecular weight and will not be used in the molecular weight calculation", - referencedSubstance.getApprovalIDDisplay())); + "Structural modification molecular fragment %s has no average molecular weight and will not be used in the molecular weight calculation", + referencedSubstance.getApprovalIDDisplay()); contribution = new MolecularWeightAndFormulaContribution(referencedSubstance.substanceClass.name(), warning); } log.trace("containsStarAtom: " + containsStarAtom); diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/ValidationUtils.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/ValidationUtils.java index ef6b9f425..d304ed10c 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/ValidationUtils.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/ValidationUtils.java @@ -203,7 +203,7 @@ public static boolean validateReference(Substance s, Reference dbReference = referenceRepository.getOne(UUID.fromString(ref.getValue())); if(dbReference !=null) { callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE( - "Reference type: \"%s\" citation: \"%s\" uuid \"%s\" not found on substance.", + "Reference type: \"%s\" citation: \"%s\" uuid \"%s\" not found on substance.", dbReference.docType, dbReference.citation, ref.getValue())); }else{ callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE("Reference \"%s\" not found on substance.", diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/ChemicalValidator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/ChemicalValidator.java index c5ad36940..75f2314bd 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/ChemicalValidator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/ChemicalValidator.java @@ -124,7 +124,7 @@ public void validate(Substance s, Substance objold, ValidatorCallback callback) //not a mol convert it //struc is already standardized callback.addMessage(GinasProcessingMessage.WARNING_MESSAGE( - "structure should always be specified as mol file converting to format to mol automatically").appliableChange(true), + "Structure should always be specified as mol file converting to format to mol automatically").appliableChange(true), () -> { try { cs.setStructure(cs.getStructure().copy()); diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/CodeFormatValidator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/CodeFormatValidator.java index 9f360aeed..bc3491b4e 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/CodeFormatValidator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/CodeFormatValidator.java @@ -66,7 +66,7 @@ public void validate(Substance s, Substance oldSubstance, ValidatorCallback call } } } catch (IOException e) { - callback.addMessage(GinasProcessingMessage.WARNING_MESSAGE("could not validate CV")); + callback.addMessage(GinasProcessingMessage.WARNING_MESSAGE("Could not validate CV")); } } diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/DefinitionalHashValidator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/DefinitionalHashValidator.java index 5e2f75e77..6e2dc27be 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/DefinitionalHashValidator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/DefinitionalHashValidator.java @@ -140,10 +140,10 @@ private GinasProcessingMessage createDiffMessage(List n.setName(r.fix(name))); diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/NucleicAcidValidator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/NucleicAcidValidator.java index 8d4daa918..bf2ffad58 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/NucleicAcidValidator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/NucleicAcidValidator.java @@ -99,9 +99,9 @@ public void validate(Substance s, Substance objold, ValidatorCallback callback) //for now just null/blank need to confer with stakeholders if validation is needed or not if(su.sequence == null || su.sequence.trim().isEmpty()){ if(Substance.SubstanceDefinitionLevel.INCOMPLETE.equals(cs.definitionLevel)){ - callback.addMessage(GinasProcessingMessage.WARNING_MESSAGE("subunit at position %s is blank. This is allowed but discouraged for incomplete nucleic acid records.", (i +1))); + callback.addMessage(GinasProcessingMessage.WARNING_MESSAGE("Subunit at position %s is blank. This is allowed but discouraged for incomplete nucleic acid records.", (i +1))); }else { - callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE("subunit at position %s is blank", (i +1))); + callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE("Subunit at position %s is blank", (i +1))); } } } @@ -190,7 +190,7 @@ private void validateSequence(NucleicAcidSubstance s, ValidatorCallback callback }catch(Exception e){ //invalid bases callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE( - "invalid nucleic acid sequence base in subunit %s %s", subunit.subunitIndex, e.getMessage())); + "Invalid nucleic acid sequence base in subunit %s %s", subunit.subunitIndex, e.getMessage())); } } @@ -351,7 +351,7 @@ private void validateSequenceDuplicates( } catch (Exception e) { log.error("Problem executing duplicate search function", e); callback.addMessage(GinasProcessingMessage - .ERROR_MESSAGE("Error performing seqeunce search on Nucleic Acid:", + .ERROR_MESSAGE("Error performing seqeunce search on Nucleic Acid:%s", e.getMessage())); } } diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/PolymerValidator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/PolymerValidator.java index 79d7f250a..272b1a0c6 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/PolymerValidator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/PolymerValidator.java @@ -101,7 +101,7 @@ public void validate(Substance s, Substance objold, ValidatorCallback callback) if (mentioned != null) { if (!contained.containsAll(mentioned)) { callback.addMessage(GinasProcessingMessage - .ERROR_MESSAGE("Mentioned attachment points '%s' in unit '%s' are not all found in actual connecitons '%s'. ", + .ERROR_MESSAGE("Mentioned attachment points '%s' in unit '%s' are not all found in actual connecitons '%s'.", mentioned.toString(), u.label, contained.toString())); } } @@ -121,7 +121,7 @@ public void validate(Substance s, Substance objold, ValidatorCallback callback) Set leftovers = new HashSet(rgroupMentions); leftovers.removeAll(rgroupsWithMappings); callback.addMessage(GinasProcessingMessage - .ERROR_MESSAGE("Mentioned attachment point(s) '%s' cannot be found ", + .ERROR_MESSAGE("Mentioned attachment point(s) '%s' cannot be found", leftovers.toString())); } diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/PrimaryDefinitionValidator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/PrimaryDefinitionValidator.java index ebd2cb3ea..760f9ab40 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/PrimaryDefinitionValidator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/PrimaryDefinitionValidator.java @@ -33,7 +33,7 @@ public void validate(Substance s, Substance objold, ValidatorCallback callback) Substance subAlternative = substanceRepository.findBySubstanceReference(relsub); if(subAlternative ==null){ //does not exist - callback.addMessage(GinasProcessingMessage.WARNING_MESSAGE("alternative definition not found %s", relsub.refPname)); + callback.addMessage(GinasProcessingMessage.WARNING_MESSAGE("Alternative definition not found %s", relsub.refPname)); }else if (subAlternative.isPrimaryDefinition()) { callback.addMessage(GinasProcessingMessage .ERROR_MESSAGE("Primary definitions cannot be alternative definitions for other Primary definitions")); diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/ProteinValidator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/ProteinValidator.java index 53383d1b5..4c4b6b913 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/ProteinValidator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/ProteinValidator.java @@ -97,10 +97,10 @@ public void validate(Substance objnew, Substance objold, ValidatorCallback callb //for now just null/blank need to confer with stakeholders if amino acid validation is needed or not if (su.sequence == null || su.sequence.trim().isEmpty()) { if (Substance.SubstanceDefinitionLevel.INCOMPLETE.equals(cs.definitionLevel)) { - callback.addMessage(GinasProcessingMessage.WARNING_MESSAGE("subunit at position %s is blank. This is allowed but discouraged for incomplete protein records.", (i + 1))); + callback.addMessage(GinasProcessingMessage.WARNING_MESSAGE("Subunit at position %s is blank. This is allowed but discouraged for incomplete protein records.", (i + 1))); } else { - callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE("subunit at position %s is blank", (i + 1))); + callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE("Subunit at position %s is blank", (i + 1))); } } } @@ -398,8 +398,8 @@ private void validateSequenceDuplicates( } catch (Exception e) { log.error("Problem executing duplicate search function", e); callback.addMessage(GinasProcessingMessage - .ERROR_MESSAGE("Error performing seqeunce search on protein:" - + e.getMessage())); + .ERROR_MESSAGE("Error performing seqeunce search on protein:%s", + e.getMessage())); } } diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/StandardNameValidator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/StandardNameValidator.java index fb1102693..284740dae 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/StandardNameValidator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/StandardNameValidator.java @@ -161,10 +161,10 @@ public void validateFull(Substance objnew, Substance objold, ValidatorCallback c if (!stdNameStandardizer.isStandardized(name.stdName)) { warnedAboutThisNameStandardization =true; if( invalidStdNameBehavior== InvalidStdNameBehavior.error) { - callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE("Standardized name does not meet standards. This name may contain one or more non-allowed character: '%s'", + callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE("Standardized name does not meet standards. This name may contain one or more non-allowed character: '%s'", name.stdName)); }else { - callback.addMessage(GinasProcessingMessage.WARNING_MESSAGE("Standardized name does not meet standards. This name may contain one or more non-allowed character: '%s'", + callback.addMessage(GinasProcessingMessage.WARNING_MESSAGE("Standardized name does not meet standards. This name may contain one or more non-allowed character: '%s'", name.stdName)); } } diff --git a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/SubstanceUniquenessValidator.java b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/SubstanceUniquenessValidator.java index 2edefea09..7d6781236 100644 --- a/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/SubstanceUniquenessValidator.java +++ b/gsrs-module-substances-core/src/main/java/ix/ginas/utils/validation/validators/SubstanceUniquenessValidator.java @@ -58,7 +58,7 @@ public void validate(Substance testSubstance, Substance oldSubstance, ValidatorC if (fullMatches.size() > 0) { for (int i = 0; i < fullMatches.size(); i++) { Substance possibleMatch = fullMatches.get(i); - GinasProcessingMessage mes = GinasProcessingMessage.ERROR_MESSAGE("Substance %s (ID: %s) appears to be a full duplicate\n", + GinasProcessingMessage mes = GinasProcessingMessage.ERROR_MESSAGE("Substance %s (ID: %s) appears to be a full duplicate", possibleMatch.getName(), possibleMatch.uuid); mes.addLink(ValidationUtils.createSubstanceLink(possibleMatch.asSubstanceReference())); //.createSubstanceLink((possibleMatch)); @@ -73,7 +73,7 @@ public void validate(Substance testSubstance, Substance oldSubstance, ValidatorC for (int i = 0; i < matches.size(); i++) { Substance possibleMatch = matches.get(i); log.debug("in SubstanceUniquenessValidator before message creation"); - GinasProcessingMessage mes = GinasProcessingMessage.WARNING_MESSAGE("Substance %s (ID: %s) is a possible duplicate\n", + GinasProcessingMessage mes = GinasProcessingMessage.WARNING_MESSAGE("Substance %s (ID: %s) is a possible duplicate", possibleMatch.getName(), possibleMatch.uuid); log.debug("in SubstanceUniquenessValidator, created warning with message " + mes.getMessage()); mes.addLink(ValidationUtils.createSubstanceLink(possibleMatch.asSubstanceReference())); From b2374e685e0e81e3585c188801354f00aac6961b Mon Sep 17 00:00:00 2001 From: epuzanov Date: Thu, 4 Jul 2024 22:11:11 +0200 Subject: [PATCH 2/2] Fix spelling in the BdNumModificationValidator --- .../gsrs/substance/validators/BdNumModificationValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsrs-fda-substance-extension/src/main/java/fda/gsrs/substance/validators/BdNumModificationValidator.java b/gsrs-fda-substance-extension/src/main/java/fda/gsrs/substance/validators/BdNumModificationValidator.java index e641890f1..86c10cd9d 100644 --- a/gsrs-fda-substance-extension/src/main/java/fda/gsrs/substance/validators/BdNumModificationValidator.java +++ b/gsrs-fda-substance-extension/src/main/java/fda/gsrs/substance/validators/BdNumModificationValidator.java @@ -75,7 +75,7 @@ public void validate(Substance s, Substance objold, ValidatorCallback callback) //or if it has been removed (in which case we alrady added an error above for that) if(primaries !=null && primaries.size() > 1){ //2. If there are 2 or more BDNUMs where both are type "PRIMARY", throw an error. - callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE("Can not have more than 1 PRIMARY BDNUM but have : %s", primaries)); + callback.addMessage(GinasProcessingMessage.ERROR_MESSAGE("Cannot have more than 1 PRIMARY BDNUM but have : %s", primaries)); } }