Interface Field<CONVERSION_MANAGER extends ConversionManager,NAMESPACE_RESOLVER extends NamespaceResolver>
-
- All Superinterfaces:
CoreField
- All Known Subinterfaces:
UnionField<CONVERSION_MANAGER,NAMESPACE_RESOLVER>
- All Known Implementing Classes:
XMLField,XMLUnionField
public interface Field<CONVERSION_MANAGER extends ConversionManager,NAMESPACE_RESOLVER extends NamespaceResolver> extends CoreField
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectconvertValueBasedOnSchemaType(java.lang.Object value, CONVERSION_MANAGER xmlConversionManager, AbstractUnmarshalRecord record)INTERNAL: Called from DOMRecord and XMLReader.java.lang.ClassgetJavaClass(javax.xml.namespace.QName qname, ConversionManager conversionManager)Return the class for a given qualified XML Schema typeXPathFragmentgetLastXPathFragment()INTERNAL: Return the last XPathFragment.javax.xml.namespace.QNamegetLeafElementType()java.lang.StringgetName()Return the unqualified name of the field.NAMESPACE_RESOLVERgetNamespaceResolver()Get the NamespaceResolver associated with this XMLFieldjavax.xml.namespace.QNamegetSchemaType()Return the schema type associated with this fieldjavax.xml.namespace.QNamegetSchemaTypeForValue(java.lang.Object value, CoreAbstractSession session)INTERNAL:java.lang.ClassgetType()javax.xml.namespace.QNamegetXMLType(java.lang.Class javaClass, ConversionManager conversionManager)Return the qualified XML Schema type for a given classjava.lang.StringgetXPath()Returns the xpath statement associated with this XMLFieldXPathFragmentgetXPathFragment()INTERNAL: Maintain a direct pointer to the first XPathFragment.booleanhasLastXPathFragment()INTERNAL:voidinitialize()booleanisCDATA()INTERNAL:booleanisNestedArray()INTERNAL:booleanisRequired()Indicates if this XMLField represents a "required" XML element or attribute ([minOccurs="1"] for elements, [use="required"] for attributes).booleanisSchemaType(javax.xml.namespace.QName schemaType)INTERNALbooleanisSelfField()INTERNAL: Indicates if the xpath for this field is "."booleanisTypedTextField()Returns if the field is a typed text field True when we should base conversions on the "type" attribute on elementsbooleanisUnionField()INTERNAL: Returns false since this is a union field The subclass XMLUnionField returns true for thisvoidsetIsCDATA(boolean CDATA)INTERNAL:voidsetIsTypedTextField(boolean value)Set if the field is a typed text field True when we should base conversions on the "type" attribute on elementsvoidsetNamespaceResolver(NAMESPACE_RESOLVER newNamespaceResolver)Set the NamespaceResolver associated with this XMLFieldvoidsetNestedArray(boolean nestedArray)Set nested array flag.voidsetRequired(boolean isRequired)Set whether this XMLField represents a "required" XML element or attribute ([minOccurs="1"] for elements, [use="required"] for attributes).voidsetSchemaType(javax.xml.namespace.QName value)Sets the schematype associated with this XMLField This is an optional setting; when set the schema type will be used to format the XML appropriatelyvoidsetUsesSingleNode(boolean usesSingleNode)Sets whether the mapping uses a single node.voidsetXPath(java.lang.String xPath)Set the xpath statment for this XMLField.booleanusesSingleNode()Checks whether the mapping uses a single node.
-
-
-
Method Detail
-
convertValueBasedOnSchemaType
java.lang.Object convertValueBasedOnSchemaType(java.lang.Object value, CONVERSION_MANAGER xmlConversionManager, AbstractUnmarshalRecord record)INTERNAL: Called from DOMRecord and XMLReader. MappingNodeValues call XMLReader which calls this method so that other XMLReader subclasses can override.
-
getJavaClass
java.lang.Class getJavaClass(javax.xml.namespace.QName qname, ConversionManager conversionManager)Return the class for a given qualified XML Schema type- Parameters:
qname- The qualified name of the XML Schema type to use as a key in the lookup- Returns:
- The class corresponding to the specified schema type, if no corresponding match found returns null
-
getLastXPathFragment
XPathFragment getLastXPathFragment()
INTERNAL: Return the last XPathFragment.
-
getLeafElementType
javax.xml.namespace.QName getLeafElementType()
-
getName
java.lang.String getName()
Return the unqualified name of the field.
-
getNamespaceResolver
NAMESPACE_RESOLVER getNamespaceResolver()
Get the NamespaceResolver associated with this XMLField- Returns:
- The NamespaceResolver associated with this XMLField
-
getSchemaType
javax.xml.namespace.QName getSchemaType()
Return the schema type associated with this field- Returns:
- the schema type
-
getSchemaTypeForValue
javax.xml.namespace.QName getSchemaTypeForValue(java.lang.Object value, CoreAbstractSession session)INTERNAL:
-
getXMLType
javax.xml.namespace.QName getXMLType(java.lang.Class javaClass, ConversionManager conversionManager)Return the qualified XML Schema type for a given class- Parameters:
javaClass- The class to use as a key in the lookup- Returns:
- QName The qualified XML Schema type, if no corresponding match found returns null
-
getXPath
java.lang.String getXPath()
Returns the xpath statement associated with this XMLField- Returns:
- The xpath statement associated with this XMLField
-
getXPathFragment
XPathFragment getXPathFragment()
INTERNAL: Maintain a direct pointer to the first XPathFragment. For example given the following XPath first/middle/@last, first is the first XPathFragment.
-
hasLastXPathFragment
boolean hasLastXPathFragment()
INTERNAL:- Returns:
-
initialize
void initialize()
-
isCDATA
boolean isCDATA()
INTERNAL:- Returns:
-
isRequired
boolean isRequired()
Indicates if this XMLField represents a "required" XML element or attribute ([minOccurs="1"] for elements, [use="required"] for attributes). NOTE: This API is used only for Schema Generation.- See Also:
SchemaModelGenerator
-
isSchemaType
boolean isSchemaType(javax.xml.namespace.QName schemaType)
INTERNAL
-
isSelfField
boolean isSelfField()
INTERNAL: Indicates if the xpath for this field is "."- Returns:
- true if the xpath is ".", false otherwise
-
isTypedTextField
boolean isTypedTextField()
Returns if the field is a typed text field True when we should base conversions on the "type" attribute on elements- Returns:
- True when we should base conversions on the "type" attribute on elements, otherwise false
-
isUnionField
boolean isUnionField()
INTERNAL: Returns false since this is a union field The subclass XMLUnionField returns true for this
-
setIsCDATA
void setIsCDATA(boolean CDATA)
INTERNAL:- Parameters:
CDATA-
-
setIsTypedTextField
void setIsTypedTextField(boolean value)
Set if the field is a typed text field True when we should base conversions on the "type" attribute on elements- Parameters:
value- The boolean value specifiy if this is a typed text field
-
setNamespaceResolver
void setNamespaceResolver(NAMESPACE_RESOLVER newNamespaceResolver)
Set the NamespaceResolver associated with this XMLField- Parameters:
newNamespaceResolver- The namespaceResolver to be associated with this XMLField
-
setRequired
void setRequired(boolean isRequired)
Set whether this XMLField represents a "required" XML element or attribute ([minOccurs="1"] for elements, [use="required"] for attributes). NOTE: This API is used only for Schema Generation.- See Also:
SchemaModelGenerator
-
setSchemaType
void setSchemaType(javax.xml.namespace.QName value)
Sets the schematype associated with this XMLField This is an optional setting; when set the schema type will be used to format the XML appropriately- Parameters:
value- QName to be added to the list of schema types
-
setUsesSingleNode
void setUsesSingleNode(boolean usesSingleNode)
Sets whether the mapping uses a single node.- Parameters:
usesSingleNode- True if the items in the collection are in a single node or false if each of the items in the collection is in its own node
-
setXPath
void setXPath(java.lang.String xPath)
Set the xpath statment for this XMLField.- Parameters:
xPath- The xpath statement to be associated with this XMLField
-
usesSingleNode
boolean usesSingleNode()
Checks whether the mapping uses a single node.- Returns:
- True if the items in the collection are in a single node or false if each of the items in the collection is in its own node.
-
setNestedArray
void setNestedArray(boolean nestedArray)
Set nested array flag. Used in JSON marshalling.- Parameters:
nestedArray- flag.
-
isNestedArray
boolean isNestedArray()
INTERNAL:- Returns:
- True if content is nested array.
-
-