minor fixes for extension rendering
This commit is contained in:
parent
2628f6fac1
commit
e4925ea762
|
@ -3864,5 +3864,9 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static boolean isExtensionDefinition(StructureDefinition sd) {
|
||||
return sd.getDerivation() == TypeDerivationRule.CONSTRAINT && sd.getType().equals("Extension");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -136,12 +136,24 @@ public class ContextUtilities implements ProfileKnowledgeProvider {
|
|||
* @return a list of the resource and type names defined for this version
|
||||
*/
|
||||
public List<String> getTypeNames() {
|
||||
List<String> result = new ArrayList<String>();
|
||||
Set<String> result = new HashSet<String>();
|
||||
for (StructureDefinition sd : context.fetchResourcesByType(StructureDefinition.class)) {
|
||||
if (sd.getKind() != StructureDefinitionKind.LOGICAL && sd.getDerivation() == TypeDerivationRule.SPECIALIZATION)
|
||||
result.add(sd.getName());
|
||||
}
|
||||
return Utilities.sorted(result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return a set of the resource and type names defined for this version
|
||||
*/
|
||||
public Set<String> getTypeNameSet() {
|
||||
Set<String> result = new HashSet<String>();
|
||||
for (StructureDefinition sd : context.fetchResourcesByType(StructureDefinition.class)) {
|
||||
if (sd.getKind() != StructureDefinitionKind.LOGICAL && sd.getDerivation() == TypeDerivationRule.SPECIALIZATION)
|
||||
result.add(sd.getName());
|
||||
}
|
||||
Collections.sort(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue