Class ModelUtil
- java.lang.Object
-
- gov.nist.secauto.metaschema.databind.model.ModelUtil
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IDataTypeAdapter<?>getDataTypeAdapter(Class<? extends IDataTypeAdapter<?>> adapterClass, IBindingContext bindingContext)static ObjectresolveDefaultValue(String defaultValue, IDataTypeAdapter<?> adapter)static StringresolveLocalName(String value, String defaultValue)Resolves a provided local name value.static StringresolveNamespace(String annotationValue, IClassBinding classBinding)static StringresolveOptionalNamespace(String annotationValue, IClassBinding classBinding)static MarkupLineresolveToMarkupLine(String annotationValue)Get the markup value of a markdown string.static MarkupMultilineresolveToMarkupMultiline(String annotationValue)Get the markup value of a markdown string.static StringresolveToString(String annotationValue)Get the string value of a string.
-
-
-
Method Detail
-
resolveLocalName
public static String resolveLocalName(String value, String defaultValue)
Resolves a provided local name value. If the value isnullor "##default", then the provided default value will be used instead. If the value is "##none", then the value will benull. Otherwise, the value is returned.- Parameters:
value- the requested valuedefaultValue- the default value- Returns:
- the resolved value
-
resolveOptionalNamespace
@Nullable public static String resolveOptionalNamespace(String annotationValue, IClassBinding classBinding)
-
resolveNamespace
@NonNull public static String resolveNamespace(String annotationValue, IClassBinding classBinding)
-
resolveToMarkupLine
@Nullable public static MarkupLine resolveToMarkupLine(@NonNull String annotationValue)
Get the markup value of a markdown string.- Parameters:
annotationValue- markdown text or"##none"if no text is provided- Returns:
- the markup line content or
nullif no markup content was provided
-
resolveToMarkupMultiline
@Nullable public static MarkupMultiline resolveToMarkupMultiline(@NonNull String annotationValue)
Get the markup value of a markdown string.- Parameters:
annotationValue- markdown text or"##none"if no text is provided- Returns:
- the markup line content or
nullif no markup content was provided
-
resolveToString
@Nullable public static String resolveToString(@NonNull String annotationValue)
Get the string value of a string.- Parameters:
annotationValue- text or"##none"if no text is provided- Returns:
- the string content or
nullif no string content was provided
-
getDataTypeAdapter
@NonNull public static IDataTypeAdapter<?> getDataTypeAdapter(@NonNull Class<? extends IDataTypeAdapter<?>> adapterClass, IBindingContext bindingContext)
-
resolveDefaultValue
@Nullable public static Object resolveDefaultValue(@NonNull String defaultValue, IDataTypeAdapter<?> adapter)
-
-