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 Details

    • convertValueBasedOnSchemaType

      Object convertValueBasedOnSchemaType(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

      Class<?> getJavaClass(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

      QName getLeafElementType()
    • getName

      String getName()
      Return the unqualified name of the field.
      Specified by:
      getName in interface CoreField
    • getNamespaceResolver

      NAMESPACE_RESOLVER getNamespaceResolver()
      Get the NamespaceResolver associated with this XMLField
      Returns:
      The NamespaceResolver associated with this XMLField
    • getSchemaType

      QName getSchemaType()
      Return the schema type associated with this field
      Returns:
      the schema type
    • getSchemaTypeForValue

      QName getSchemaTypeForValue(Object value, CoreAbstractSession session)
      INTERNAL:
    • getType

      Class<?> getType()
      Specified by:
      getType in interface CoreField
    • getXMLType

      QName getXMLType(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

      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:
    • initialize

      void initialize()
    • isCDATA

      boolean isCDATA()
      INTERNAL:
    • 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:
    • isSchemaType

      boolean isSchemaType(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:
    • 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:
    • setSchemaType

      void setSchemaType(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(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.