Class AbstractStringAdapter<ITEM_TYPE extends IStringItem>
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.datatype.AbstractDataTypeAdapter<String,ITEM_TYPE>
-
- gov.nist.secauto.metaschema.core.datatype.adapter.AbstractStringAdapter<ITEM_TYPE>
-
- Type Parameters:
ITEM_TYPE
- the Metapath item type supported by the adapter
- All Implemented Interfaces:
IDataTypeAdapter<String>
- Direct Known Subclasses:
EmailAddressAdapter
,HostnameAdapter
,NcNameAdapter
,StringAdapter
,TokenAdapter
public abstract class AbstractStringAdapter<ITEM_TYPE extends IStringItem> extends AbstractDataTypeAdapter<String,ITEM_TYPE>
Provides a common base class for string-based data types.
-
-
Field Summary
-
Fields inherited from class gov.nist.secauto.metaschema.core.datatype.AbstractDataTypeAdapter
DEFAULT_JSON_FIELD_NAME
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractStringAdapter()
Construct a new string-based adapter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
copy(Object obj)
Create a copy of the provided value.com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes
getJsonRawType()
The JSON primative type of the data type.String
parse(String value)
Parses a provided string.-
Methods inherited from class gov.nist.secauto.metaschema.core.datatype.AbstractDataTypeAdapter
asString, canHandleQName, cast, castInternal, getDefaultJsonValueKey, getItemClass, getJavaClass, isParsingStartElement, isUnrappedValueAllowedInXml, isXmlMixed, newItem, parse, parse, toValue, writeJsonValue, writeXmlValue, writeXmlValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nist.secauto.metaschema.core.datatype.IDataTypeAdapter
getNames, getPreferredName, isAtomic, parseAndSupply, parseAndSupply, parseAndSupply
-
-
-
-
Constructor Detail
-
AbstractStringAdapter
protected AbstractStringAdapter()
Construct a new string-based adapter.
-
-
Method Detail
-
getJsonRawType
public com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatTypes getJsonRawType()
Description copied from interface:IDataTypeAdapter
The JSON primative type of the data type.- Returns:
- the JSON data type
-
parse
public String parse(String value)
Description copied from interface:IDataTypeAdapter
Parses a provided string. Used to parse XML attributes, simple XML character data, and JSON/YAML property values.- Parameters:
value
- the string value to parse- Returns:
- the parsed data as the adapter's type
-
copy
public String copy(Object obj)
Description copied from interface:IDataTypeAdapter
Create a copy of the provided value.- Parameters:
obj
- the value to copy- Returns:
- the copy
-
-