fix more issues with type characteristics

This commit is contained in:
Grahame Grieve 2022-09-07 17:31:27 +10:00
parent dad979641e
commit fffe96c765
1 changed files with 5 additions and 2 deletions

View File

@ -228,7 +228,6 @@ public class StructureDefinitionValidator extends BaseValidator {
} }
} }
private boolean addCharacteristics(Set<String> set, String tc) { private boolean addCharacteristics(Set<String> set, String tc) {
switch (tc) { switch (tc) {
case "boolean" : return addCharacteristicsForType(set); case "boolean" : return addCharacteristicsForType(set);
@ -251,6 +250,7 @@ public class StructureDefinitionValidator extends BaseValidator {
case "unsignedInt" :return addCharacteristicsForType(set, "has-range", "has-length"); case "unsignedInt" :return addCharacteristicsForType(set, "has-range", "has-length");
case "url" :return addCharacteristicsForType(set, "has-length", "can-bind"); case "url" :return addCharacteristicsForType(set, "has-length", "can-bind");
case "uuid" :return addCharacteristicsForType(set, "has-length", "can-bind"); case "uuid" :return addCharacteristicsForType(set, "has-length", "can-bind");
case "xhtml" :return addCharacteristicsForType(set);
case "Address" :return addCharacteristicsForType(set, "do-translations"); case "Address" :return addCharacteristicsForType(set, "do-translations");
case "Age" : return addCharacteristicsForType(set, "has-range", "is-continuous"); case "Age" : return addCharacteristicsForType(set, "has-range", "is-continuous");
case "Annotation" :return addCharacteristicsForType(set); case "Annotation" :return addCharacteristicsForType(set);
@ -290,7 +290,10 @@ public class StructureDefinitionValidator extends BaseValidator {
case "Element" :return addCharacteristicsForType(set); case "Element" :return addCharacteristicsForType(set);
case "BackboneElement" :return addCharacteristicsForType(set); case "BackboneElement" :return addCharacteristicsForType(set);
default: default:
throw new Error("Unhandled data type in addCharacterstics: "+tc); if (context.getResourceNames().contains(tc))
return addCharacteristicsForType(set);
else
throw new Error("Unhandled data type in addCharacterstics: "+tc);
} }
} }