diff --git a/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java b/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java
index d0f46b80c..46c5b0007 100644
--- a/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java
+++ b/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java
@@ -569,7 +569,7 @@ public class FHIRPathEngine {
return executeType(new ExecutionTypeContext(appContext, resourceType, types, types), types, expr, true);
}
- private FHIRException makeExceptionPL(Integer num, ExpressionNode holder, String constName, Object... args) {
+ private FHIRException makeExceptionPlural(Integer num, ExpressionNode holder, String constName, Object... args) {
String fmt = worker.formatMessagePlural(num, constName, args);
if (location != null) {
fmt = fmt + " "+worker.formatMessage(I18nConstants.FHIRPATH_LOCATION, location);
@@ -2486,13 +2486,13 @@ public class FHIRPathEngine {
return new ArrayList();
}
if (left.size() > 1) {
- throw makeExceptionPL(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "+");
+ throw makeExceptionPlural(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "+");
}
if (!left.get(0).isPrimitive()) {
throw makeException(expr, I18nConstants.FHIRPATH_LEFT_VALUE_WRONG_TYPE, "+", left.get(0).fhirType());
}
if (right.size() > 1) {
- throw makeExceptionPL(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "+");
+ throw makeExceptionPlural(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "+");
}
if (!right.get(0).isPrimitive() && !((left.get(0).isDateTime() || "0".equals(left.get(0).primitiveValue()) || left.get(0).hasType("Quantity")) && right.get(0).hasType("Quantity"))) {
throw makeException(expr, I18nConstants.FHIRPATH_RIGHT_VALUE_WRONG_TYPE, "+", right.get(0).fhirType());
@@ -2573,13 +2573,13 @@ public class FHIRPathEngine {
return new ArrayList();
}
if (left.size() > 1) {
- throw makeExceptionPL(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "*");
+ throw makeExceptionPlural(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "*");
}
if (!left.get(0).isPrimitive() && !(left.get(0) instanceof Quantity)) {
throw makeException(expr, I18nConstants.FHIRPATH_LEFT_VALUE_WRONG_TYPE, "*", left.get(0).fhirType());
}
if (right.size() > 1) {
- throw makeExceptionPL(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "*");
+ throw makeExceptionPlural(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "*");
}
if (!right.get(0).isPrimitive() && !(right.get(0) instanceof Quantity)) {
throw makeException(expr, I18nConstants.FHIRPATH_RIGHT_VALUE_WRONG_TYPE, "*", right.get(0).fhirType());
@@ -2612,13 +2612,13 @@ public class FHIRPathEngine {
private List opConcatenate(List left, List right, ExpressionNode expr) throws PathEngineException {
if (left.size() > 1) {
- throw makeExceptionPL(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "&");
+ throw makeExceptionPlural(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "&");
}
if (left.size() > 0 && !left.get(0).hasType(FHIR_TYPES_STRING)) {
throw makeException(expr, I18nConstants.FHIRPATH_LEFT_VALUE_WRONG_TYPE, "&", left.get(0).fhirType());
}
if (right.size() > 1) {
- throw makeExceptionPL(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "&");
+ throw makeExceptionPlural(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "&");
}
if (right.size() > 0 && !right.get(0).hasType(FHIR_TYPES_STRING)) {
throw makeException(expr, I18nConstants.FHIRPATH_RIGHT_VALUE_WRONG_TYPE, "&", right.get(0).fhirType());
@@ -2745,13 +2745,13 @@ public class FHIRPathEngine {
return new ArrayList();
}
if (left.size() > 1) {
- throw makeExceptionPL(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "-");
+ throw makeExceptionPlural(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "-");
}
if (!left.get(0).isPrimitive() && !left.get(0).hasType("Quantity")) {
throw makeException(expr, I18nConstants.FHIRPATH_LEFT_VALUE_WRONG_TYPE, "-", left.get(0).fhirType());
}
if (right.size() > 1) {
- throw makeExceptionPL(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "-");
+ throw makeExceptionPlural(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "-");
}
if (!right.get(0).isPrimitive() && !((left.get(0).isDateTime() || "0".equals(left.get(0).primitiveValue()) || left.get(0).hasType("Quantity")) && right.get(0).hasType("Quantity"))) {
throw makeException(expr, I18nConstants.FHIRPATH_RIGHT_VALUE_WRONG_TYPE, "-", right.get(0).fhirType());
@@ -2784,13 +2784,13 @@ public class FHIRPathEngine {
return new ArrayList();
}
if (left.size() > 1) {
- throw makeExceptionPL(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "/");
+ throw makeExceptionPlural(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "/");
}
if (!left.get(0).isPrimitive() && !(left.get(0) instanceof Quantity)) {
throw makeException(expr, I18nConstants.FHIRPATH_LEFT_VALUE_WRONG_TYPE, "/", left.get(0).fhirType());
}
if (right.size() > 1) {
- throw makeExceptionPL(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "/");
+ throw makeExceptionPlural(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "/");
}
if (!right.get(0).isPrimitive() && !(right.get(0) instanceof Quantity)) {
throw makeException(expr, I18nConstants.FHIRPATH_RIGHT_VALUE_WRONG_TYPE, "/", right.get(0).fhirType());
@@ -2830,13 +2830,13 @@ public class FHIRPathEngine {
return new ArrayList();
}
if (left.size() > 1) {
- throw makeExceptionPL(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "div");
+ throw makeExceptionPlural(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "div");
}
if (!left.get(0).isPrimitive() && !(left.get(0) instanceof Quantity)) {
throw makeException(expr, I18nConstants.FHIRPATH_LEFT_VALUE_WRONG_TYPE, "div", left.get(0).fhirType());
}
if (right.size() > 1) {
- throw makeExceptionPL(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "div");
+ throw makeExceptionPlural(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "div");
}
if (!right.get(0).isPrimitive() && !(right.get(0) instanceof Quantity)) {
throw makeException(expr, I18nConstants.FHIRPATH_RIGHT_VALUE_WRONG_TYPE, "div", right.get(0).fhirType());
@@ -2870,13 +2870,13 @@ public class FHIRPathEngine {
if (left.size() == 0 || right.size() == 0) {
return new ArrayList();
} if (left.size() > 1) {
- throw makeExceptionPL(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "mod");
+ throw makeExceptionPlural(left.size(), expr, I18nConstants.FHIRPATH_LEFT_VALUE_PLURAL, "mod");
}
if (!left.get(0).isPrimitive()) {
throw makeException(expr, I18nConstants.FHIRPATH_LEFT_VALUE_WRONG_TYPE, "mod", left.get(0).fhirType());
}
if (right.size() > 1) {
- throw makeExceptionPL(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "mod");
+ throw makeExceptionPlural(right.size(), expr, I18nConstants.FHIRPATH_RIGHT_VALUE_PLURAL, "mod");
}
if (!right.get(0).isPrimitive()) {
throw makeException(expr, I18nConstants.FHIRPATH_RIGHT_VALUE_WRONG_TYPE, "mod", right.get(0).fhirType());
@@ -3611,7 +3611,7 @@ public class FHIRPathEngine {
private List funcSqrt(ExecutionContext context, List focus, ExpressionNode expr) {
if (focus.size() != 1) {
- throw makeExceptionPL(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "sqrt", focus.size());
+ throw makeExceptionPlural(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "sqrt", focus.size());
}
Base base = focus.get(0);
List result = new ArrayList();
@@ -3631,7 +3631,7 @@ public class FHIRPathEngine {
private List funcAbs(ExecutionContext context, List focus, ExpressionNode expr) {
if (focus.size() != 1) {
- throw makeExceptionPL(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "abs", focus.size());
+ throw makeExceptionPlural(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "abs", focus.size());
}
Base base = focus.get(0);
List result = new ArrayList();
@@ -3654,7 +3654,7 @@ public class FHIRPathEngine {
private List funcCeiling(ExecutionContext context, List focus, ExpressionNode expr) {
if (focus.size() != 1) {
- throw makeExceptionPL(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "ceiling", focus.size());
+ throw makeExceptionPlural(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "ceiling", focus.size());
}
Base base = focus.get(0);
List result = new ArrayList();
@@ -3672,7 +3672,7 @@ public class FHIRPathEngine {
private List funcFloor(ExecutionContext context, List focus, ExpressionNode expr) {
if (focus.size() != 1) {
- throw makeExceptionPL(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "floor", focus.size());
+ throw makeExceptionPlural(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "floor", focus.size());
}
Base base = focus.get(0);
List result = new ArrayList();
@@ -3695,7 +3695,7 @@ public class FHIRPathEngine {
return new ArrayList();
}
if (focus.size() > 1) {
- throw makeExceptionPL(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "exp", focus.size());
+ throw makeExceptionPlural(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "exp", focus.size());
}
Base base = focus.get(0);
List result = new ArrayList();
@@ -3716,7 +3716,7 @@ public class FHIRPathEngine {
private List funcLn(ExecutionContext context, List focus, ExpressionNode expr) {
if (focus.size() != 1) {
- throw makeExceptionPL(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "ln", focus.size());
+ throw makeExceptionPlural(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "ln", focus.size());
}
Base base = focus.get(0);
List result = new ArrayList();
@@ -3736,7 +3736,7 @@ public class FHIRPathEngine {
private List funcLog(ExecutionContext context, List focus, ExpressionNode expr) {
if (focus.size() != 1) {
- throw makeExceptionPL(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "log", focus.size());
+ throw makeExceptionPlural(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "log", focus.size());
}
Base base = focus.get(0);
List result = new ArrayList();
@@ -3764,7 +3764,7 @@ public class FHIRPathEngine {
private List funcPower(ExecutionContext context, List focus, ExpressionNode expr) {
if (focus.size() != 1) {
- throw makeExceptionPL(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "power", focus.size());
+ throw makeExceptionPlural(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "power", focus.size());
}
Base base = focus.get(0);
List result = new ArrayList();
@@ -3788,7 +3788,7 @@ public class FHIRPathEngine {
private List funcTruncate(ExecutionContext context, List focus, ExpressionNode expr) {
if (focus.size() != 1) {
- throw makeExceptionPL(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "truncate", focus.size());
+ throw makeExceptionPlural(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "truncate", focus.size());
}
Base base = focus.get(0);
List result = new ArrayList();
@@ -3806,7 +3806,7 @@ public class FHIRPathEngine {
private List funcLowBoundary(ExecutionContext context, List focus, ExpressionNode expr) {
if (focus.size() != 1) {
- throw makeExceptionPL(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "lowBoundary", focus.size());
+ throw makeExceptionPlural(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "lowBoundary", focus.size());
}
int precision = 0;
if (expr.getParameters().size() > 0) {
@@ -3836,7 +3836,7 @@ public class FHIRPathEngine {
private List funcHighBoundary(ExecutionContext context, List focus, ExpressionNode expr) {
if (focus.size() != 1) {
- throw makeExceptionPL(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "highBoundary", focus.size());
+ throw makeExceptionPlural(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "highBoundary", focus.size());
}
int precision = 0;
if (expr.getParameters().size() > 0) {
@@ -3866,7 +3866,7 @@ public class FHIRPathEngine {
private List funcPrecision(ExecutionContext context, List focus, ExpressionNode expr) {
if (focus.size() != 1) {
- throw makeExceptionPL(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "highBoundary", focus.size());
+ throw makeExceptionPlural(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "highBoundary", focus.size());
}
Base base = focus.get(0);
List result = new ArrayList();
@@ -3884,7 +3884,7 @@ public class FHIRPathEngine {
private List funcRound(ExecutionContext context, List focus, ExpressionNode expr) {
if (focus.size() != 1) {
- throw makeExceptionPL(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "round", focus.size());
+ throw makeExceptionPlural(focus.size(), expr, I18nConstants.FHIRPATH_FOCUS_PLURAL, "round", focus.size());
}
Base base = focus.get(0);
List result = new ArrayList();
@@ -5794,13 +5794,13 @@ public class FHIRPathEngine {
throw makeException(expr, I18nConstants.FHIRPATH_DISCRIMINATOR_RESOLVE_NO_TYPE, element.getElement().getId());
}
if (element.getTypes().size() > 1) {
- throw makeExceptionPL(element.getTypes().size(), expr, I18nConstants.FHIRPATH_DISCRIMINATOR_RESOLVE_MULTIPLE_TYPES_PLURAL, element.getElement().getId());
+ throw makeExceptionPlural(element.getTypes().size(), expr, I18nConstants.FHIRPATH_DISCRIMINATOR_RESOLVE_MULTIPLE_TYPES_PLURAL, element.getElement().getId());
}
if (!element.getTypes().get(0).hasTarget()) {
throw makeException(expr, I18nConstants.FHIRPATH_DISCRIMINATOR_RESOLVE_NOT_REFERENCE, element.getElement().getId(), element.getElement().getType().get(0).getCode()+")");
}
if (element.getTypes().get(0).getTargetProfile().size() > 1) {
- throw makeExceptionPL(element.getTypes().get(0).getTargetProfile().size(), expr, I18nConstants.FHIRPATH_RESOLVE_DISCRIMINATOR_NO_TARGET_PLURAL, element.getElement().getId());
+ throw makeExceptionPlural(element.getTypes().get(0).getTargetProfile().size(), expr, I18nConstants.FHIRPATH_RESOLVE_DISCRIMINATOR_NO_TARGET_PLURAL, element.getElement().getId());
}
sd = worker.fetchResource(StructureDefinition.class, element.getTypes().get(0).getTargetProfile().get(0).getValue());
if (sd == null) {
@@ -5897,10 +5897,10 @@ public class FHIRPathEngine {
throw makeException(expr, I18nConstants.FHIRPATH_DISCRIMINATOR_NOTYPE, ed.getElement().getId());
}
if (ed.getTypes().size() > 1) {
- throw makeExceptionPL(ed.getTypes().size(), expr, I18nConstants.FHIRPATH_DISCRIMINATOR_MULTIPLE_TYPES_PLURAL, ed.getElement().getId());
+ throw makeExceptionPlural(ed.getTypes().size(), expr, I18nConstants.FHIRPATH_DISCRIMINATOR_MULTIPLE_TYPES_PLURAL, ed.getElement().getId());
}
if (ed.getTypes().get(0).getProfile().size() > 1) {
- throw makeExceptionPL(ed.getTypes().get(0).getProfile().size(), expr, I18nConstants.FHIRPATH_DISCRIMINATOR_MULTIPLE_PROFILES_PLURAL, ed.getElement().getId());
+ throw makeExceptionPlural(ed.getTypes().get(0).getProfile().size(), expr, I18nConstants.FHIRPATH_DISCRIMINATOR_MULTIPLE_PROFILES_PLURAL, ed.getElement().getId());
}
if (ed.getTypes().get(0).hasProfile()) {
return worker.fetchResource(StructureDefinition.class, ed.getTypes().get(0).getProfile().get(0).getValue());
diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/BaseValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/BaseValidator.java
index 595098f77..1b81cb0b9 100644
--- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/BaseValidator.java
+++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/BaseValidator.java
@@ -322,7 +322,7 @@ public class BaseValidator implements IValidationContextResourceLoader {
protected boolean hintPL(List errors, IssueType type, int line, int col, String path, boolean thePass, int num, String theMessage, Object... theMessageArguments) {
if (!thePass && doingHints()) {
- String message = context.formatMessagePL(num, theMessage, theMessageArguments);
+ String message = context.formatMessagePlural(num, theMessage, theMessageArguments);
addValidationMessage(errors, type, line, col, path, message, IssueSeverity.INFORMATION, theMessage);
}
return thePass;
@@ -389,7 +389,7 @@ public class BaseValidator implements IValidationContextResourceLoader {
protected boolean rulePL(List errors, IssueType type, int line, int col, String path, boolean thePass, int num, String theMessage, Object... theMessageArguments) {
if (!thePass && doingErrors()) {
- String message = context.formatMessagePL(num, theMessage, theMessageArguments);
+ String message = context.formatMessagePlural(num, theMessage, theMessageArguments);
addValidationMessage(errors, type, line, col, path, message, IssueSeverity.ERROR, theMessage);
}
return thePass;
@@ -456,7 +456,7 @@ public class BaseValidator implements IValidationContextResourceLoader {
protected boolean rulePL(List errors, IssueType type, String path, boolean thePass, int num, String theMessage, Object... theMessageArguments) {
if (!thePass && doingErrors()) {
- String message = context.formatMessagePL(num, theMessage, theMessageArguments);
+ String message = context.formatMessagePlural(num, theMessage, theMessageArguments);
addValidationMessage(errors, type, -1, -1, path, message, IssueSeverity.ERROR, theMessage);
}
return thePass;
@@ -530,9 +530,9 @@ public class BaseValidator implements IValidationContextResourceLoader {
}
- protected boolean warningPL(List errors, IssueType type, int line, int col, String path, boolean thePass, int num, String msg, Object... theMessageArguments) {
+ protected boolean warningPlural(List errors, IssueType type, int line, int col, String path, boolean thePass, int num, String msg, Object... theMessageArguments) {
if (!thePass && doingWarnings()) {
- String nmsg = context.formatMessagePL(num, msg, theMessageArguments);
+ String nmsg = context.formatMessagePlural(num, msg, theMessageArguments);
IssueSeverity severity = IssueSeverity.WARNING;
addValidationMessage(errors, type, line, col, path, nmsg, severity, msg);
}
diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java
index 2f5264d44..2b16eaa3c 100644
--- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java
+++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java
@@ -2824,7 +2824,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
if (invalidChars.isEmpty()) {
return null;
} else {
- return context.formatMessagePL(c, I18nConstants.XHTML_URL_INVALID_CHARS_PLURAL, invalidChars.toString());
+ return context.formatMessagePlural(c, I18nConstants.XHTML_URL_INVALID_CHARS_PLURAL, invalidChars.toString());
}
}
}
@@ -4242,7 +4242,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
throw new DefinitionException(context.formatMessage(I18nConstants.DISCRIMINATOR__IS_BASED_ON_TYPE_BUT_SLICE__IN__HAS_NO_TYPES, discriminator, ed.getId(), profile.getUrl()));
}
} else if (criteriaElement.getType().size() > 1) {
- throw new DefinitionException(context.formatMessagePL(criteriaElement.getType().size(), I18nConstants.DISCRIMINATOR__IS_BASED_ON_TYPE_BUT_SLICE__IN__HAS_MULTIPLE_TYPES_PLURAL, discriminator, ed.getId(), profile.getUrl(), criteriaElement.typeSummary()));
+ throw new DefinitionException(context.formatMessagePlural(criteriaElement.getType().size(), I18nConstants.DISCRIMINATOR__IS_BASED_ON_TYPE_BUT_SLICE__IN__HAS_MULTIPLE_TYPES_PLURAL, discriminator, ed.getId(), profile.getUrl(), criteriaElement.typeSummary()));
} else
throw new DefinitionException(context.formatMessage(I18nConstants.DISCRIMINATOR__IS_BASED_ON_TYPE_BUT_SLICE__IN__HAS_NO_TYPES, discriminator, ed.getId(), profile.getUrl()));
if (discriminator.isEmpty()) {
@@ -4255,7 +4255,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
throw new DefinitionException(context.formatMessage(I18nConstants.PROFILE_BASED_DISCRIMINATORS_MUST_HAVE_A_TYPE__IN_PROFILE_, criteriaElement.getId(), profile.getUrl()));
}
if (criteriaElement.getType().size() != 1) {
- throw new DefinitionException(context.formatMessagePL(criteriaElement.getType().size(), I18nConstants.PROFILE_BASED_DISCRIMINATORS_MUST_HAVE_ONLY_ONE_TYPE__IN_PROFILE_PLURAL, criteriaElement.getId(), profile.getUrl()));
+ throw new DefinitionException(context.formatMessagePlural(criteriaElement.getType().size(), I18nConstants.PROFILE_BASED_DISCRIMINATORS_MUST_HAVE_ONLY_ONE_TYPE__IN_PROFILE_PLURAL, criteriaElement.getId(), profile.getUrl()));
}
List list = discriminator.endsWith(".resolve()") || discriminator.equals("resolve()") ? criteriaElement.getType().get(0).getTargetProfile() : criteriaElement.getType().get(0).getProfile();
if (list.size() == 0) {
@@ -4293,7 +4293,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
anyFound = true;
}
if (!anyFound) {
- throw new DefinitionException(context.formatMessagePL(slicer.getSlicing().getDiscriminator().size(), I18nConstants.Could_not_match_discriminator_for_slice_in_profile_PLURAL, discriminators, ed.getId(), profile.getUrl(), discriminators));
+ throw new DefinitionException(context.formatMessagePlural(slicer.getSlicing().getDiscriminator().size(), I18nConstants.Could_not_match_discriminator_for_slice_in_profile_PLURAL, discriminators, ed.getId(), profile.getUrl(), discriminators));
}
try {
@@ -5522,7 +5522,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
}
}
} else {
- warningPL(errors, IssueType.STRUCTURE, ei.line(), ei.col(), ei.getPath(), false, goodProfiles.size(), I18nConstants.VALIDATION_VAL_PROFILE_MULTIPLEMATCHES_PLURAL, ResourceUtilities.listStrings(goodProfiles.keySet()));
+ warningPlural(errors, IssueType.STRUCTURE, ei.line(), ei.col(), ei.getPath(), false, goodProfiles.size(), I18nConstants.VALIDATION_VAL_PROFILE_MULTIPLEMATCHES_PLURAL, ResourceUtilities.listStrings(goodProfiles.keySet()));
for (String m : goodProfiles.keySet()) {
p = this.context.fetchResource(StructureDefinition.class, m);
for (ValidationMessage message : goodProfiles.get(m)) {