Interface Field<CONVERSION_MANAGER extends ConversionManager,​NAMESPACE_RESOLVER extends NamespaceResolver>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object convertValueBasedOnSchemaType​(java.lang.Object value, CONVERSION_MANAGER xmlConversionManager, AbstractUnmarshalRecord record)
      INTERNAL: Called from DOMRecord and XMLReader.
      java.lang.Class getJavaClass​(javax.xml.namespace.QName qname, ConversionManager conversionManager)
      Return the class for a given qualified XML Schema type
      XPathFragment getLastXPathFragment()
      INTERNAL: Return the last XPathFragment.
      javax.xml.namespace.QName getLeafElementType()  
      java.lang.String getName()
      Return the unqualified name of the field.
      NAMESPACE_RESOLVER getNamespaceResolver()
      Get the NamespaceResolver associated with this XMLField
      javax.xml.namespace.QName getSchemaType()
      Return the schema type associated with this field
      javax.xml.namespace.QName getSchemaTypeForValue​(java.lang.Object value, CoreAbstractSession session)
      INTERNAL:
      java.lang.Class getType()  
      javax.xml.namespace.QName getXMLType​(java.lang.Class javaClass, ConversionManager conversionManager)
      Return the qualified XML Schema type for a given class
      java.lang.String getXPath()
      Returns the xpath statement associated with this XMLField
      XPathFragment getXPathFragment()
      INTERNAL: Maintain a direct pointer to the first XPathFragment.
      boolean hasLastXPathFragment()
      INTERNAL:
      void initialize()  
      boolean isCDATA()
      INTERNAL:
      boolean isNestedArray()
      INTERNAL:
      boolean isRequired()
      Indicates if this XMLField represents a "required" XML element or attribute ([minOccurs="1"] for elements, [use="required"] for attributes).
      boolean isSchemaType​(javax.xml.namespace.QName schemaType)
      INTERNAL
      boolean isSelfField()
      INTERNAL: Indicates if the xpath for this field is "."
      boolean isTypedTextField()
      Returns if the field is a typed text field True when we should base conversions on the "type" attribute on elements
      boolean isUnionField()
      INTERNAL: Returns false since this is a union field The subclass XMLUnionField returns true for this
      void setIsCDATA​(boolean CDATA)
      INTERNAL:
      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
      void setNamespaceResolver​(NAMESPACE_RESOLVER newNamespaceResolver)
      Set the NamespaceResolver associated with this XMLField
      void setNestedArray​(boolean nestedArray)
      Set nested array flag.
      void setRequired​(boolean isRequired)
      Set whether this XMLField represents a "required" XML element or attribute ([minOccurs="1"] for elements, [use="required"] for attributes).
      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
      void setUsesSingleNode​(boolean usesSingleNode)
      Sets whether the mapping uses a single node.
      void setXPath​(java.lang.String xPath)
      Set the xpath statment for this XMLField.
      boolean usesSingleNode()
      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.
        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

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

        java.lang.Class getType()
        Specified by:
        getType in interface CoreField
      • 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.