refactor UserDataNames round 2

This commit is contained in:
Grahame Grieve 2024-11-16 21:16:36 +11:00
parent 3873d56764
commit ce06b3f9c5
4 changed files with 41 additions and 19 deletions

View File

@ -430,7 +430,7 @@ public class Validator {
}
private boolean isSimpleType(String type) {
return Utilities.existsInList(type, "dateTime", "boolean", "integer", "decimal", "string", "base64Binary", "id", "code", "date", "time", "canonical");
return Utilities.existsInList(type, "dateTime", "boolean", "integer", "decimal", "string", "base64Binary", "id", "code", "date", "time", "canonical", "uri", "url");
}
private String simpleType(String type) {

View File

@ -1,5 +1,12 @@
package org.hl7.fhir.r5.utils;
// other than render_src_package, all these are intended to be made consistent in format, using
// the standard format scope-name-name where scope is one of
// lib - core library (most of them)
// validator - validator CLI or web functionality
// pub - IG publisher functionality
// kindling - kindling related functionality
public class UserDataNames {
public static final String loader_urls_patched = "old.load.mode";
public static final String loader_custom_resource = "loader-custom-resource";
@ -34,7 +41,7 @@ public class UserDataNames {
public static final String render_external_link = "External.Link";
public static final String render_dict_generator_anchors = "dict.generator.anchors";
public static final String render_presentation = "presentation";
public static final String render_src_package = "package";
public static final String render_src_package = "package"; // <--- this value is reused by HAPI and can't change without consultation
public static final String renderer_is_generated = "renderer.generated";
public static final String keyview_elementSupported = "elementSupported";

View File

@ -1126,20 +1126,20 @@ public class I18nConstants {
public static final String SD_PATH_SLICING_DEPRECATED = "SD_PATH_SLICING_DEPRECATED";
public static final String SD_PATH_NOT_VALID = "SD_PATH_NOT_VALID";
public static final String SD_PATH_ERROR = "SD_PATH_ERROR";
public static final String VIEWDEFINITION_SHOULD_HAVE_NAME = null;
public static final String VIEWDEFINITION_NAME_INVALID = null;
public static final String VIEWDEFINITION_CONSTANT_NAME_INVALID = null;
public static final String VIEWDEFINITION_PATH_ERROR = null;
public static final String VIEWDEFINITION_PATH_WRONG_RETURN = null;
public static final String VIEWDEFINITION_PATH_WARNING = null;
public static final String VIEWDEFINITION_UNKNOWN_RESOURCE = null;
public static final String VIEWDEFINITION_DUPL_COL_NAME = null;
public static final String VIEWDEFINITION_NAME_ILLEGAL = null;
public static final String VIEWDEFINITION_NAME_REQUIRED = null;
public static final String VIEWDEFINITION_COLLECTION_NOT_NEEDED = null;
public static final String VIEWDEFINITION_COLLECTION_NOT_ALWAYS = null;
public static final String VIEWDEFINITION_COLLECTION_NEEDED = null;
public static final String VIEWDEFINITION_TYPE_MISMATCH = null;
public static final String VIEWDEFINITION_UNABLE_TO_TYPE = null;
public static final String VIEWDEFINITION_COMPLEX_TYPE = null;
public static final String VIEWDEFINITION_SHOULD_HAVE_NAME = "VIEWDEFINITION_SHOULD_HAVE_NAME";
public static final String VIEWDEFINITION_NAME_INVALID = "VIEWDEFINITION_NAME_INVALID";
public static final String VIEWDEFINITION_PATH_ERROR = "VIEWDEFINITION_PATH_ERROR";
public static final String VIEWDEFINITION_PATH_WRONG_RETURN = "VIEWDEFINITION_PATH_WRONG_RETURN";
public static final String VIEWDEFINITION_PATH_WARNING = "VIEWDEFINITION_PATH_WARNING";
public static final String VIEWDEFINITION_UNKNOWN_RESOURCE = "VIEWDEFINITION_UNKNOWN_RESOURCE";
public static final String VIEWDEFINITION_DUPL_COL_NAME = "VIEWDEFINITION_DUPL_COL_NAME";
public static final String VIEWDEFINITION_NAME_REQUIRED = "VIEWDEFINITION_NAME_REQUIRED";
public static final String VIEWDEFINITION_NAME_REQUIRED_HINT = "VIEWDEFINITION_NAME_REQUIRED_HINT";
public static final String VIEWDEFINITION_COLLECTION_NOT_NEEDED = "VIEWDEFINITION_COLLECTION_NOT_NEEDED";
public static final String VIEWDEFINITION_COLLECTION_NOT_ALWAYS = "VIEWDEFINITION_COLLECTION_NOT_ALWAYS";
public static final String VIEWDEFINITION_COLLECTION_NEEDED1 = "VIEWDEFINITION_COLLECTION_NEEDED1";
public static final String VIEWDEFINITION_COLLECTION_NEEDED2 = "VIEWDEFINITION_COLLECTION_NEEDED2";
public static final String VIEWDEFINITION_TYPE_MISMATCH = "VIEWDEFINITION_TYPE_MISMATCH";
public static final String VIEWDEFINITION_UNABLE_TO_TYPE = "VIEWDEFINITION_UNABLE_TO_TYPE";
public static final String VIEWDEFINITION_COMPLEX_TYPE = "VIEWDEFINITION_COMPLEX_TYPE";
}

View File

@ -1156,4 +1156,19 @@ CANONICAL_MULTIPLE_VERSIONS_KNOWN = The version {2} for the {0} {1} is not known
SD_PATH_SLICING_DEPRECATED = The discriminator type ''{0}'' has been deprecated. Use type=fixed with a pattern[x] instead
SD_PATH_NOT_VALID = The discriminator path ''{0}'' does not appear to be valid for the element that is being sliced ''{1}''
SD_PATH_ERROR = The discriminator path ''{0}'' does not appear to be valid for the element that is being sliced ''{1}'': {2}
VIEWDEFINITION_SHOULD_HAVE_NAME = No name provided. A name is required in many contexts where a ViewDefinition is used
VIEWDEFINITION_NAME_INVALID = The {0} name ''{1}'' is not valid
VIEWDEFINITION_PATH_ERROR = Expression Error: {0}{1}
VIEWDEFINITION_PATH_WRONG_RETURN = A where path must return a boolean, but the expression ''{0}'' returns a ''{1}''
VIEWDEFINITION_PATH_WARNING = Expression Warning: {0}
VIEWDEFINITION_UNKNOWN_RESOURCE = The name ''{0}'' is not a valid resource{1}
VIEWDEFINITION_DUPL_COL_NAME = Duplicate Column Name ''{0}''
VIEWDEFINITION_NAME_REQUIRED = A column name is required
VIEWDEFINITION_NAME_REQUIRED_HINT = A column name is required. The natural name to chose is ''{0}'' (from the path)
VIEWDEFINITION_COLLECTION_NOT_NEEDED = collection is true, but the path statement ''{0}'' can only return single values for the column ''{1}''{2}
VIEWDEFINITION_COLLECTION_NOT_ALWAYS = The column ''{0}'' is defined as a collection, but collections are not supported in all execution contexts
VIEWDEFINITION_COLLECTION_NEEDED1 = This column is not defined as a collection, but the path statement ''{0}'' might return multiple values for the column ''{1}'' for some inputs{2}
VIEWDEFINITION_COLLECTION_NEEDED2 = This column is defined to be not a collection, but the path statement ''{0}'' might return multiple values for the column ''{1}'' for some inputs{2}
VIEWDEFINITION_TYPE_MISMATCH = The path expression ''{0}'' does not return a value of the type ''{1}'' - found ''{2}''{3}
VIEWDEFINITION_UNABLE_TO_TYPE = Unable to determine a type (found ''{0}''){1}
VIEWDEFINITION_COMPLEX_TYPE = Column from path ''{0}'' is a complex type (''{1}''){2}. This is not supported in some Runners