From 09e3816d37d29ecb9dea4cc174bb078eed3d6f0e Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 3 Mar 2020 07:41:34 +1100 Subject: [PATCH] make ProfileUtilities methods not static --- .../hl7/fhir/r5/conformance/ProfileUtilities.java | 12 ++++++------ .../org/hl7/fhir/r5/conformance/ShExGenerator.java | 8 +++++--- .../hl7/fhir/r5/conformance/XmlSchemaGenerator.java | 6 ++++-- .../hl7/fhir/r5/elementmodel/ObjectConverter.java | 4 +++- .../java/org/hl7/fhir/r5/elementmodel/Property.java | 12 +++++++----- .../java/org/hl7/fhir/r5/utils/FHIRPathEngine.java | 12 +++++++----- .../hl7/fhir/r5/utils/GraphQLSchemaGenerator.java | 4 +++- .../org/hl7/fhir/r5/utils/NarrativeGenerator.java | 10 ++++++---- .../org/hl7/fhir/r5/utils/QuestionnaireBuilder.java | 4 +++- .../org/hl7/fhir/r5/utils/StructureMapUtilities.java | 9 +++++++-- .../fhir/validation/instance/InstanceValidator.java | 8 +++++--- 11 files changed, 56 insertions(+), 33 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java index 80a7723ef..a9135390a 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java @@ -315,7 +315,7 @@ public class ProfileUtilities extends TranslatingUtilities { - public static List getChildMap(StructureDefinition profile, ElementDefinition element) throws DefinitionException { + public List getChildMap(StructureDefinition profile, ElementDefinition element) throws DefinitionException { if (element.getContentReference()!=null) { for (ElementDefinition e : profile.getSnapshot().getElement()) { if (element.getContentReference().equals("#"+e.getId())) @@ -341,7 +341,7 @@ public class ProfileUtilities extends TranslatingUtilities { } - public static List getSliceList(StructureDefinition profile, ElementDefinition element) throws DefinitionException { + public List getSliceList(StructureDefinition profile, ElementDefinition element) throws DefinitionException { if (!element.hasSlicing()) throw new Error("getSliceList should only be called when the element has slicing"); @@ -368,11 +368,11 @@ public class ProfileUtilities extends TranslatingUtilities { * @param path The path of the element within the structure to get the children for * @return A List containing the element children (all of them are Elements) */ - public static List getChildList(StructureDefinition profile, String path, String id) { + public List getChildList(StructureDefinition profile, String path, String id) { return getChildList(profile, path, id, false); } - public static List getChildList(StructureDefinition profile, String path, String id, boolean diff) { + public List getChildList(StructureDefinition profile, String path, String id, boolean diff) { List res = new ArrayList(); boolean capturing = id==null; @@ -415,11 +415,11 @@ public class ProfileUtilities extends TranslatingUtilities { return res; } - public static List getChildList(StructureDefinition structure, ElementDefinition element, boolean diff) { + public List getChildList(StructureDefinition structure, ElementDefinition element, boolean diff) { return getChildList(structure, element.getPath(), element.getId(), diff); } - public static List getChildList(StructureDefinition structure, ElementDefinition element) { + public List getChildList(StructureDefinition structure, ElementDefinition element) { return getChildList(structure, element.getPath(), element.getId(), false); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ShExGenerator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ShExGenerator.java index 89e00365c..9a8b78b17 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ShExGenerator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ShExGenerator.java @@ -188,6 +188,7 @@ public class ShExGenerator { * this makes internal metadata services available to the generator - retrieving structure definitions, and value set expansion etc */ private IWorkerContext context; + private ProfileUtilities profileUtilities; /** * innerTypes -- inner complex types. Currently flattened in ShEx (doesn't have to be, btw) @@ -208,6 +209,7 @@ public class ShExGenerator { public ShExGenerator(IWorkerContext context) { super(); this.context = context; + profileUtilities = new ProfileUtilities(context, null, null); innerTypes = new HashSet>(); emittedInnerTypes = new HashSet>(); datatypes = new HashSet(); @@ -486,7 +488,7 @@ public class ShExGenerator { element_def.add("id", "fhir:" + (id.charAt(0) == id.toLowerCase().charAt(0)? shortId : id) + " "); } - List children = ProfileUtilities.getChildList(sd, ed); + List children = profileUtilities.getChildList(sd, ed); if (children.size() > 0) { innerTypes.add(new ImmutablePair(sd, ed)); defn = simpleElement(sd, ed, id); @@ -571,7 +573,7 @@ public class ShExGenerator { if(typ.hasProfile()) { if(typ.getWorkingCode().equals("Reference")) return genReference("", typ); - else if(ProfileUtilities.getChildList(sd, ed).size() > 0) { + else if(profileUtilities.getChildList(sd, ed).size() > 0) { // inline anonymous type - give it a name and factor it out innerTypes.add(new ImmutablePair(sd, ed)); return simpleElement(sd, ed, id); @@ -704,7 +706,7 @@ public class ShExGenerator { element_reference.add("comment", comment == null? " " : "# " + comment); List elements = new ArrayList(); - for (ElementDefinition child: ProfileUtilities.getChildList(sd, path, null)) + for (ElementDefinition child: profileUtilities.getChildList(sd, path, null)) elements.add(genElementDefinition(sd, child)); element_reference.add("elements", StringUtils.join(elements, "\n")); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/XmlSchemaGenerator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/XmlSchemaGenerator.java index 6fa652aa8..dde500b8d 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/XmlSchemaGenerator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/XmlSchemaGenerator.java @@ -107,10 +107,12 @@ public class XmlSchemaGenerator { private String genDate; private String license; private boolean annotations; + private ProfileUtilities profileUtilities; public XmlSchemaGenerator(String folder, IWorkerContext context) { this.folder = folder; this.context = context; + this.profileUtilities = new ProfileUtilities(context, null, null); } public boolean isSingle() { @@ -325,12 +327,12 @@ public class XmlSchemaGenerator { ln(" "); // hack.... - for (ElementDefinition edc : ProfileUtilities.getChildList(sd, ed)) { + for (ElementDefinition edc : profileUtilities.getChildList(sd, ed)) { if (!(edc.hasRepresentation(PropertyRepresentation.XMLATTR) || edc.hasRepresentation(PropertyRepresentation.XMLTEXT)) && !inheritedElement(edc)) produceElement(sd, ed, edc, lang); } ln(" "); - for (ElementDefinition edc : ProfileUtilities.getChildList(sd, ed)) { + for (ElementDefinition edc : profileUtilities.getChildList(sd, ed)) { if ((edc.hasRepresentation(PropertyRepresentation.XMLATTR) || edc.hasRepresentation(PropertyRepresentation.XMLTEXT)) && !inheritedElement(edc)) produceAttribute(sd, ed, edc, lang); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/ObjectConverter.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/ObjectConverter.java index 32dc778f5..59a6c824a 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/ObjectConverter.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/ObjectConverter.java @@ -46,9 +46,11 @@ import org.hl7.fhir.r5.model.DataType; public class ObjectConverter { private IWorkerContext context; + private ProfileUtilities profileUtilities; public ObjectConverter(IWorkerContext context) { this.context = context; + profileUtilities = new ProfileUtilities(context, null, null); } public Element convert(Resource ig) throws IOException, FHIRException { @@ -76,7 +78,7 @@ public class ObjectConverter { if (sd.getKind() == StructureDefinitionKind.PRIMITIVETYPE) res.setValue(((PrimitiveType) base).asStringValue()); - List children = ProfileUtilities.getChildMap(sd, sd.getSnapshot().getElementFirstRep()); + List children = profileUtilities.getChildMap(sd, sd.getSnapshot().getElementFirstRep()); for (ElementDefinition child : children) { String n = tail(child.getPath()); if (sd.getKind() != StructureDefinitionKind.PRIMITIVETYPE || !"value".equals(n)) { diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Property.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Property.java index b1734497e..08a4b1558 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Property.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Property.java @@ -44,12 +44,14 @@ public class Property { private IWorkerContext context; private ElementDefinition definition; private StructureDefinition structure; - private Boolean canBePrimitive; + private Boolean canBePrimitive; + private ProfileUtilities profileUtilities; public Property(IWorkerContext context, ElementDefinition definition, StructureDefinition structure) { this.context = context; this.definition = definition; this.structure = structure; + profileUtilities = new ProfileUtilities(context, null, null); } public String getName() { @@ -248,7 +250,7 @@ public class Property { protected List getChildProperties(String elementName, String statedType) throws FHIRException { ElementDefinition ed = definition; StructureDefinition sd = structure; - List children = ProfileUtilities.getChildMap(sd, ed); + List children = profileUtilities.getChildMap(sd, ed); String url = null; if (children.isEmpty() || isElementWithOnlyExtension(ed, children)) { // ok, find the right definitions @@ -313,7 +315,7 @@ public class Property { sd = context.fetchResource(StructureDefinition.class, url); if (sd == null) throw new DefinitionException("Unable to find type '"+t+"' for name '"+elementName+"' on property "+definition.getPath()); - children = ProfileUtilities.getChildMap(sd, sd.getSnapshot().getElement().get(0)); + children = profileUtilities.getChildMap(sd, sd.getSnapshot().getElement().get(0)); } } List properties = new ArrayList(); @@ -326,7 +328,7 @@ public class Property { protected List getChildProperties(TypeDetails type) throws DefinitionException { ElementDefinition ed = definition; StructureDefinition sd = structure; - List children = ProfileUtilities.getChildMap(sd, ed); + List children = profileUtilities.getChildMap(sd, ed); if (children.isEmpty()) { // ok, find the right definitions String t = null; @@ -352,7 +354,7 @@ public class Property { sd = context.fetchResource(StructureDefinition.class, t); if (sd == null) throw new DefinitionException("Unable to find class '"+t+"' for name '"+ed.getPath()+"' on property "+definition.getPath()); - children = ProfileUtilities.getChildMap(sd, sd.getSnapshot().getElement().get(0)); + children = profileUtilities.getChildMap(sd, sd.getSnapshot().getElement().get(0)); } } List properties = new ArrayList(); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java index 2616da0f1..67b995299 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java @@ -152,6 +152,7 @@ public class FHIRPathEngine { private Map allTypes = new HashMap(); private boolean legacyMode; // some R2 and R3 constraints assume that != is valid for emptty sets, so when running for R2/R3, this is set ot true private ValidationOptions terminologyServiceOptions = new ValidationOptions(); + private ProfileUtilities profileUtilities; // if the fhir path expressions are allowed to use constants beyond those defined in the specification // the application can implement them by providing a constant resolver @@ -249,6 +250,7 @@ public class FHIRPathEngine { public FHIRPathEngine(IWorkerContext worker) { super(); this.worker = worker; + profileUtilities = new ProfileUtilities(worker, null, null); for (StructureDefinition sd : worker.getStructures()) { if (sd.getDerivation() == TypeDerivationRule.SPECIALIZATION && sd.getKind() != StructureDefinitionKind.LOGICAL) allTypes.put(sd.getName(), sd); @@ -4204,14 +4206,14 @@ public class FHIRPathEngine { focus = element; } else { List childDefinitions; - childDefinitions = ProfileUtilities.getChildMap(sd, element); + childDefinitions = profileUtilities.getChildMap(sd, element); // if that's empty, get the children of the type if (childDefinitions.isEmpty()) { sd = fetchStructureByType(element); if (sd == null) throw new DefinitionException("Problem with use of resolve() - profile '"+element.getType().get(0).getProfile()+"' on "+element.getId()+" could not be resolved"); - childDefinitions = ProfileUtilities.getChildMap(sd, sd.getSnapshot().getElementFirstRep()); + childDefinitions = profileUtilities.getChildMap(sd, sd.getSnapshot().getElementFirstRep()); } for (ElementDefinition t : childDefinitions) { if (tailMatches(t, expr.getName())) { @@ -4237,14 +4239,14 @@ public class FHIRPathEngine { } else if ("extension".equals(expr.getName())) { String targetUrl = expr.getParameters().get(0).getConstant().primitiveValue(); // targetUrl = targetUrl.substring(1,targetUrl.length()-1); - List childDefinitions = ProfileUtilities.getChildMap(sd, element); + List childDefinitions = profileUtilities.getChildMap(sd, element); for (ElementDefinition t : childDefinitions) { if (t.getPath().endsWith(".extension") && t.hasSliceName()) { StructureDefinition exsd = worker.fetchResource(StructureDefinition.class, t.getType().get(0).getProfile().get(0).getValue()); while (exsd!=null && !exsd.getBaseDefinition().equals("http://hl7.org/fhir/StructureDefinition/Extension")) exsd = worker.fetchResource(StructureDefinition.class, exsd.getBaseDefinition()); if (exsd.getUrl().equals(targetUrl)) { - if (ProfileUtilities.getChildMap(sd, t).isEmpty()) + if (profileUtilities.getChildMap(sd, t).isEmpty()) sd = exsd; focus = t; break; @@ -4269,7 +4271,7 @@ public class FHIRPathEngine { } private ElementDefinition pickMandatorySlice(StructureDefinition sd, ElementDefinition element) throws DefinitionException { - List list = ProfileUtilities.getSliceList(sd, element); + List list = profileUtilities.getSliceList(sd, element); for (ElementDefinition ed : list) { if (ed.getMin() > 0) return ed; diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GraphQLSchemaGenerator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GraphQLSchemaGenerator.java index e1e80c49e..1512f5792 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GraphQLSchemaGenerator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GraphQLSchemaGenerator.java @@ -56,10 +56,12 @@ public class GraphQLSchemaGenerator { private static final String INNER_TYPE_NAME = "gql.type.name"; IWorkerContext context; + private ProfileUtilities profileUtilities; public GraphQLSchemaGenerator(IWorkerContext context) { super(); this.context = context; + profileUtilities = new ProfileUtilities(context, null, null); } public void generateTypes(OutputStream stream) throws IOException, FHIRException { @@ -265,7 +267,7 @@ public class GraphQLSchemaGenerator { } private void generateProperties(List list, StringBuilder b, String typeName, StructureDefinition sd, ElementDefinition ed, String mode, String suffix) throws IOException { - List children = ProfileUtilities.getChildList(sd, ed); + List children = profileUtilities.getChildList(sd, ed); for (ElementDefinition child : children) { if (child.hasContentReference()) { ElementDefinition ref = resolveContentReference(sd, child.getContentReference()); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/NarrativeGenerator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/NarrativeGenerator.java index 117451d19..93e2f0a44 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/NarrativeGenerator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/NarrativeGenerator.java @@ -482,7 +482,7 @@ public class NarrativeGenerator implements INarrativeGenerator { @Override public List children() { if (list == null) { - children = ProfileUtilities.getChildList(structure, definition); + children = profileUtilities.getChildList(structure, definition); list = new ArrayList(); for (ElementDefinition child : children) { List elements = new ArrayList(); @@ -632,7 +632,7 @@ public class NarrativeGenerator implements INarrativeGenerator { @Override public List children() { if (list == null) { - children = ProfileUtilities.getChildList(structure, definition); + children = profileUtilities.getChildList(structure, definition); list = new ArrayList(); for (ElementDefinition child : children) { List elements = new ArrayList(); @@ -703,7 +703,7 @@ public class NarrativeGenerator implements INarrativeGenerator { @Override public List children() { if (list2 == null) { - List children = ProfileUtilities.getChildList(definition, definition.getSnapshot().getElement().get(0)); + List children = profileUtilities.getChildList(definition, definition.getSnapshot().getElement().get(0)); list2 = new ArrayList(); for (ElementDefinition child : children) { List elements = new ArrayList(); @@ -841,7 +841,7 @@ public class NarrativeGenerator implements INarrativeGenerator { @Override public List children() { if (list2 == null) { - List children = ProfileUtilities.getChildList(definition, definition.getSnapshot().getElement().get(0)); + List children = profileUtilities.getChildList(definition, definition.getSnapshot().getElement().get(0)); list2 = new ArrayList(); for (ElementDefinition child : children) { List elements = new ArrayList(); @@ -1044,6 +1044,7 @@ public class NarrativeGenerator implements INarrativeGenerator { private ValidationOptions terminologyServiceOptions = new ValidationOptions(); private boolean noSlowLookup; private List codeSystemPropList = new ArrayList<>(); + private ProfileUtilities profileUtilities; public NarrativeGenerator(String prefix, String basePath, IWorkerContext context) { super(); @@ -1077,6 +1078,7 @@ public class NarrativeGenerator implements INarrativeGenerator { private void init() { + profileUtilities = new ProfileUtilities(context, null, null); renderingMaps.add(new ConceptMapRenderInstructions("Canonical Status", "http://hl7.org/fhir/ValueSet/resource-status", false)); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/QuestionnaireBuilder.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/QuestionnaireBuilder.java index c70ccaf5a..6b4c1c29b 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/QuestionnaireBuilder.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/QuestionnaireBuilder.java @@ -136,10 +136,12 @@ public class QuestionnaireBuilder { // processing the response. for technical reasons, we still go through the process, but // we don't do the intensive parts of the work (save time) private Questionnaire prebuiltQuestionnaire; + private ProfileUtilities profileUtilities; public QuestionnaireBuilder(IWorkerContext context) { super(); this.context = context; + profileUtilities = new ProfileUtilities(context, null, null); } public Resource getReference() { @@ -291,7 +293,7 @@ public class QuestionnaireBuilder { } // now, we iterate the children - List list = ProfileUtilities.getChildList(profile, element); + List list = profileUtilities.getChildList(profile, element); for (ElementDefinition child : list) { if (!isExempt(element, child) && !parents.contains(child)) { diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/StructureMapUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/StructureMapUtilities.java index a9ca48523..9d518844d 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/StructureMapUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/StructureMapUtilities.java @@ -229,7 +229,8 @@ public class StructureMapUtilities { private ITransformerServices services; private ProfileKnowledgeProvider pkp; private Map ids = new HashMap(); - private ValidationOptions terminologyServiceOptions = new ValidationOptions(); + private ValidationOptions terminologyServiceOptions = new ValidationOptions(); + private ProfileUtilities profileUtilities; public StructureMapUtilities(IWorkerContext worker, ITransformerServices services, ProfileKnowledgeProvider pkp) { super(); @@ -238,6 +239,7 @@ public class StructureMapUtilities { this.pkp = pkp; fpe = new FHIRPathEngine(worker); fpe.setHostServices(new FFHIRPathHostServices()); + profileUtilities = new ProfileUtilities(worker, null, null); } public StructureMapUtilities(IWorkerContext worker, ITransformerServices services) { @@ -246,6 +248,7 @@ public class StructureMapUtilities { this.services = services; fpe = new FHIRPathEngine(worker); fpe.setHostServices(new FFHIRPathHostServices()); + profileUtilities = new ProfileUtilities(worker, null, null); } public StructureMapUtilities(IWorkerContext worker) { @@ -253,6 +256,8 @@ public class StructureMapUtilities { this.worker = worker; fpe = new FHIRPathEngine(worker); fpe.setHostServices(new FFHIRPathHostServices()); + profileUtilities = new ProfileUtilities(worker, null, null); + } public static String render(StructureMap map) { @@ -2934,7 +2939,7 @@ public class StructureMapUtilities { private void addChildMappings(StringBuilder b, String id, String indent, StructureDefinition sd, ElementDefinition ed, boolean inner) throws DefinitionException { boolean first = true; - List children = ProfileUtilities.getChildMap(sd, ed); + List children = profileUtilities.getChildMap(sd, ed); for (ElementDefinition child : children) { if (first && inner) { b.append(" then {\r\n"); 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 b0343a234..f6a1dd599 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 @@ -369,11 +369,13 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat private ValidatorHostServices validatorServices; private boolean assumeValidRestReferences; private boolean allowExamples; + private ProfileUtilities profileUtilities; public InstanceValidator(IWorkerContext theContext, IEvaluationContext hostServices) { super(theContext); this.context = theContext; this.externalHostServices = hostServices; + this.profileUtilities = new ProfileUtilities(theContext, null, null); fpe = new FHIRPathEngine(context); validatorServices = new ValidatorHostServices(); fpe.setHostServices(validatorServices); @@ -4570,7 +4572,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat checkFixedValue(errors, stack.getLiteralPath(), element, definition.getFixed(), profile.getUrl(), definition.getSliceName(), null); // get the list of direct defined children, including slices - List childDefinitions = ProfileUtilities.getChildMap(profile, definition); + List childDefinitions = profileUtilities.getChildMap(profile, definition); if (childDefinitions.isEmpty()) { if (actualType == null) return; // there'll be an error elsewhere in this case, and we're going to stop. @@ -4625,7 +4627,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat throw new DefinitionException(formatMessage(I18nConstants.UNABLE_TO_RESOLVE_ACTUAL_TYPE_, actualType)); trackUsage(dt, hostContext, element); - childDefinitions = ProfileUtilities.getChildMap(dt, dt.getSnapshot().getElement().get(0)); + childDefinitions = profileUtilities.getChildMap(dt, dt.getSnapshot().getElement().get(0)); return childDefinitions; } @@ -4926,7 +4928,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat int count = 0; List slices = null; if (ed.hasSlicing()) - slices = ProfileUtilities.getSliceList(profile, ed); + slices = profileUtilities.getSliceList(profile, ed); for (ElementInfo ei : children) if (ei.definition == ed) count++;