improve extension representation
This commit is contained in:
parent
2860a7186f
commit
43253e8d10
|
@ -3906,5 +3906,13 @@ public class ProfileUtilities extends TranslatingUtilities {
|
||||||
this.allowUnknownProfile = allowUnknownProfile;
|
this.allowUnknownProfile = allowUnknownProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isSimpleExtension(StructureDefinition sd) {
|
||||||
|
if (!isExtensionDefinition(sd)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ElementDefinition value = sd.getSnapshot().getElementByPath("Extension.value");
|
||||||
|
return value != null && !value.isProhibited();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1234,8 +1234,11 @@ public class StructureDefinition extends CanonicalResource {
|
||||||
// added from java-adornments.txt:
|
// added from java-adornments.txt:
|
||||||
|
|
||||||
public ElementDefinition getElementByPath(String path) {
|
public ElementDefinition getElementByPath(String path) {
|
||||||
|
if (path == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
for (ElementDefinition ed : getElement()) {
|
for (ElementDefinition ed : getElement()) {
|
||||||
if (path.equals(ed.getPath())) {
|
if (path.equals(ed.getPath()) || (path+"[x]").equals(ed.getPath())) {
|
||||||
return ed;
|
return ed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue