i18n: slicingHint finished
This commit is contained in:
parent
2f596be5b0
commit
253570a7d8
|
@ -359,4 +359,5 @@ public class I18nConstants {
|
|||
public final static String DOES_NOT_MATCH_SLICE_ = "Does_not_match_slice_";
|
||||
public final static String PROFILE__DOES_NOT_MATCH_FOR__BECAUSE_OF_THE_FOLLOWING_PROFILE_ISSUES__ = "Profile__does_not_match_for__because_of_the_following_profile_issues__";
|
||||
public final static String THIS_ELEMENT_DOES_NOT_MATCH_ANY_KNOWN_SLICE_ = "This_element_does_not_match_any_known_slice_";
|
||||
public final static String DEFINED_IN_THE_PROFILE = "defined_in_the_profile";
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ import java.util.HashMap;
|
|||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -3149,7 +3150,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
ValidatorHostContext shc = hostContext.forSlicing();
|
||||
boolean pass = evaluateSlicingExpression(shc, element, path, profile, n);
|
||||
if (!pass) {
|
||||
slicingHint(sliceInfo, IssueType.STRUCTURE, element.line(), element.col(), path, false, formatMessage(I18nConstants.DOES_NOT_MATCH_SLICE_, ed.getSliceName(), "discriminator = " + Utilities.escapeXml(n.toString()));
|
||||
slicingHint(sliceInfo, IssueType.STRUCTURE, element.line(), element.col(), path, false, (formatMessage(I18nConstants.DOES_NOT_MATCH_SLICE_, ed.getSliceName())), "discriminator = " + Utilities.escapeXml(n.toString()));
|
||||
for (String url : shc.getSliceRecords().keySet()) {
|
||||
slicingHint(sliceInfo, IssueType.STRUCTURE, element.line(), element.col(), path, false,
|
||||
formatMessage(I18nConstants.DETAILS_FOR__MATCHING_AGAINST_PROFILE_, stack.getLiteralPath(), url),
|
||||
|
@ -5016,9 +5017,9 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
slicingHint(errors, IssueType.INFORMATIONAL, ei.line(), ei.col(), ei.getPath(), false,
|
||||
formatMessage(I18nConstants.THIS_ELEMENT_DOES_NOT_MATCH_ANY_KNOWN_SLICE_,
|
||||
profile == null ? "" : " defined in the profile " + profile.getUrl()),
|
||||
formatMessage(I18nConstants.THIS_ELEMENT_DOES_NOT_MATCH_ANY_KNOWN_SLICE_, profile == null ? "" : " defined in the profile " + profile.getUrl()) + errorSummaryForSlicingAsHtml(ei.sliceInfo));
|
||||
formatMessage(I18nConstants.THIS_ELEMENT_DOES_NOT_MATCH_ANY_KNOWN_SLICE_, profile == null ? "" : I18nConstants.DEFINED_IN_THE_PROFILE + profile.getUrl()) + errorSummaryForSlicingAsHtml(ei.sliceInfo));
|
||||
} else if (ei.definition.getSlicing().getRules().equals(ElementDefinition.SlicingRules.CLOSED)) {
|
||||
rule(errors, IssueType.INVALID, ei.line(), ei.col(), ei.getPath(), false, I18nConstants.VALIDATION_VAL_PROFILE_NOTSLICE, (profile == null ? "" : " defined in the profile " + profile.getUrl() + " and slicing is CLOSED: " + errorSummaryForSlicing(ei.sliceInfo)));
|
||||
rule(errors, IssueType.INVALID, ei.line(), ei.col(), ei.getPath(), false, I18nConstants.VALIDATION_VAL_PROFILE_NOTSLICE, (profile == null ? "" : " defined in the profile " + profile.getUrl()), errorSummaryForSlicing(ei.sliceInfo));
|
||||
}
|
||||
} else {
|
||||
// Don't raise this if we're in an abstract profile, like Resource
|
||||
|
@ -5601,6 +5602,4 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
|||
public void setDebug(boolean debug) {
|
||||
this.debug = debug;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -212,7 +212,7 @@ Validation_VAL_Profile_NoMatch = Unable to find matching profile among choices:
|
|||
Validation_VAL_Profile_NoSnapshot = StructureDefinition has no snapshot - validation is against the snapshot, so it must be provided
|
||||
Validation_VAL_Profile_NoType = The type of element {0} is not known, which is illegal. Valid types at this point are {1}
|
||||
Validation_VAL_Profile_NotAllowed = This element is not allowed by the profile {0}
|
||||
Validation_VAL_Profile_NotSlice = This element does not match any known slice {0}
|
||||
Validation_VAL_Profile_NotSlice = This element does not match any known slice {0} and slicing is CLOSED: {1}
|
||||
Validation_VAL_Profile_OutOfOrder = As specified by profile {0}, Element "{1}" is out of order
|
||||
Validation_VAL_Profile_SliceOrder = As specified by profile {0}, Element "{1}" is out of order in ordered slice
|
||||
Validation_VAL_Profile_Unknown = Profile reference "{0}" could not be resolved, so has not been checked
|
||||
|
@ -343,4 +343,5 @@ Unable_to_resolve_name_reference__at_path_ = Unable to resolve name reference {0
|
|||
Details_for__matching_against_Profile_ = Details for {0} matching against Profile{1}
|
||||
Does_not_match_slice_ = Does not match slice "{0}"
|
||||
Profile__does_not_match_for__because_of_the_following_profile_issues__ = Profile {0} does not match for {1} because of the following profile issues: {2}
|
||||
This_element_does_not_match_any_known_slice_ = This element does not match any known slice{0}
|
||||
This_element_does_not_match_any_known_slice_ = This element does not match any known slice{0}
|
||||
defined_in_the_profile = defined in the profile
|
Loading…
Reference in New Issue