Class MarshalRecord<MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller>

  • All Implemented Interfaces:
    org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER,​org.eclipse.persistence.internal.oxm.NamespaceResolver>, org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER,​org.eclipse.persistence.internal.oxm.NamespaceResolver>, org.eclipse.persistence.internal.oxm.record.XMLRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession>
    Direct Known Subclasses:
    ContentHandlerRecord, JsonRecord, JSONWriterRecord, NodeRecord, OutputStreamRecord, ValidatingMarshalRecord, WriterRecord, XMLEventWriterRecord, XMLStreamWriterRecord

    public abstract class MarshalRecord<MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller>
    extends org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecordImpl<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
    implements org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER,​org.eclipse.persistence.internal.oxm.NamespaceResolver>

    A MarshalRecord encapsulates the marshal target.

    MarshalRecords are stateful and state changes are triggered by different event notifications, therefore this class is not thread safe.

    XML document creation will differ depending on the subclass of MarshalRecord used. For example when NodeRecord is used a child element is created on the openStartElement event, and when the ContentHandlerRecord is used a child element is not created until the closeStartMethod event.

    See Also:
    XMLMarshaller
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.eclipse.persistence.internal.oxm.record.MarshalRecord

        org.eclipse.persistence.internal.oxm.record.MarshalRecord.CycleDetectionStack<E extends java.lang.Object>
      • Nested classes/interfaces inherited from interface org.eclipse.persistence.internal.oxm.record.XMLRecord

        org.eclipse.persistence.internal.oxm.record.XMLRecord.Nil
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.String COLON_W_SCHEMA_NIL_ATTRIBUTE  
      protected org.eclipse.persistence.internal.oxm.XPathFragment textWrapperFragment  
      protected static java.lang.String TRUE  
      • Fields inherited from class org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecordImpl

        equalNamespaceResolvers, hasCustomNamespaceMapper, marshaller, namespaceAware, namespaceResolver, session
      • Fields inherited from interface org.eclipse.persistence.internal.oxm.record.XMLRecord

        DEFAULT_ATTRIBUTE_GROUP, NIL
    • Constructor Summary

      Constructors 
      Constructor Description
      MarshalRecord()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(org.eclipse.persistence.internal.core.helper.CoreField key, java.lang.Object value)
      INTERNAL: Add the field-value pair to the document.
      void addGroupingElement​(org.eclipse.persistence.internal.oxm.XPathNode xPathNode)
      INTERNAL: If an XPathNode does not have an associated NodeValue then add it to the MarshalRecord as a grouping element.
      protected void addPositionalNodes​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment, org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)  
      void afterContainmentMarshal​(java.lang.Object parent, java.lang.Object child)  
      abstract void attribute​(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, java.lang.String value)
      Receive notification of an attribute.
      void attribute​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment, org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver, java.lang.Object value, javax.xml.namespace.QName schemaType)
      Convert the value if necessary and write out the attribute and converted value.
      abstract void attribute​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment, org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver, java.lang.String value)
      Receive notification of an attribute.
      void beforeContainmentMarshal​(java.lang.Object child)  
      abstract void cdata​(java.lang.String value)
      Receive notification of character data to be wrapped in a CDATA node.
      abstract void characters​(java.lang.String value)
      Receive notification of character data.
      void characters​(javax.xml.namespace.QName schemaType, java.lang.Object value, java.lang.String mimeType, boolean isCDATA)
      Convert the value if necessary and write out the converted value.
      void clear()  
      abstract void closeStartElement()
      Receive notification that all of the attribute events have occurred for the most recent element that has been started.
      void closeStartGroupingElements​(org.eclipse.persistence.internal.oxm.XPathFragment groupingFragment)  
      void defaultNamespaceDeclaration​(java.lang.String defaultNamespace)
      Add the defaultNamespace declaration
      abstract void element​(org.eclipse.persistence.internal.oxm.XPathFragment frag)
      Receive notification of an element.
      void emptyAttribute​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment, org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      Used when an nil attribute should be written
      boolean emptyCollection​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment, org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver, boolean openGrouping)
      Handle marshal of an empty collection.
      void emptyComplex​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment, org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      Used when an nil attribute should be written
      void emptySimple​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      Used when an nil attribute should be written
      void endCollection()
      This method is used to inform the MarshalRecord that it is done receiving element events that are part of a collection.
      abstract void endDocument()
      Recieve notification that a document is being ended.
      abstract void endElement​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment, org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      Receive notification that an element is being ended.
      void endPrefixMapping​(java.lang.String prefix)
      Receive notification that the scope of this namespace declaration has ended.
      void endPrefixMappings​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)  
      void flush()  
      void forceValueWrapper()  
      CoreAttributeGroup getCurrentAttributeGroup()  
      org.eclipse.persistence.internal.oxm.record.MarshalRecord.CycleDetectionStack<java.lang.Object> getCycleDetectionStack()
      INTERNAL
      org.w3c.dom.Document getDocument()  
      org.w3c.dom.Node getDOM()  
      java.util.ArrayList<org.eclipse.persistence.internal.oxm.XPathNode> getGroupingElements()
      INTERNAL: Returns the list of grouping elements currently stored on the MarshalRecord
      java.lang.String getLocalName()  
      protected java.lang.String getNameForFragment​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment)  
      java.lang.String getNamespaceURI()  
      java.util.HashMap getPositionalNodes()  
      protected byte[] getPrefixBytes​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment)  
      protected java.lang.String getPrefixForFragment​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment)  
      protected java.lang.String getStringForQName​(javax.xml.namespace.QName qName)  
      org.eclipse.persistence.internal.oxm.XPathFragment getTextWrapperFragment()
      INTERNAL: The optional fragment used to wrap the text() mappings
      java.lang.String getValueToWrite​(javax.xml.namespace.QName schemaType, java.lang.Object value, org.eclipse.persistence.internal.oxm.ConversionManager conversionManager)  
      boolean isWrapperAsCollectionName()  
      void marshalWithoutRootElement​(org.eclipse.persistence.internal.oxm.ObjectBuilder treeObjectBuilder, java.lang.Object object, org.eclipse.persistence.internal.oxm.mappings.Descriptor descriptor, org.eclipse.persistence.internal.oxm.Root root, boolean isXMLRoot)
      INTERNAL
      void namespaceDeclaration​(java.lang.String prefix, java.lang.String namespaceURI)
      Add the specified namespace declaration
      void namespaceDeclarations​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      INTERNAL: Add the namespace declarations to the XML document.
      void nilComplex​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment, org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      Used when an nil attribute should be written
      void nilSimple​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      Used when an nil attribute should be written
      void node​(org.w3c.dom.Node node, org.eclipse.persistence.internal.oxm.NamespaceResolver resolver)
      Receive notification of a node.
      abstract void node​(org.w3c.dom.Node node, org.eclipse.persistence.internal.oxm.NamespaceResolver resolver, java.lang.String qualifiedName, java.lang.String rootUri)
      Receive notification of a node.
      void openStartElement​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment, org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      Receive notification that an element is being started.
      org.eclipse.persistence.internal.oxm.XPathFragment openStartGroupingElements​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      INTERNAL: Trigger that the grouping elements should be written.
      void popAttributeGroup()  
      void predicateAttribute​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment, org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      Marshal the attribute for the predicate if one was specified.
      protected java.lang.String processNamespaceResolverForXSIPrefix​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      INTERNAL: Private function to process or create an entry in the NamespaceResolver for the xsi prefix.
      void pushAttributeGroup​(CoreAttributeGroup group)  
      java.lang.Object put​(org.eclipse.persistence.internal.core.helper.CoreField key, java.lang.Object value)
      INTERNAL: Add the field-value pair to the document.
      void removeGroupingElement​(org.eclipse.persistence.internal.oxm.XPathNode xPathNode)
      INTERNAL:
      void setGroupingElement​(java.util.ArrayList<org.eclipse.persistence.internal.oxm.XPathNode> elements)
      INTERNAL: Sets the list of grouping elements to be marshalled on this record.
      void setSession​(org.eclipse.persistence.internal.core.sessions.CoreAbstractSession session)  
      void startCollection()
      This method is used to inform the MarshalRecord that the element events it is about to receive are part of a collection.
      abstract void startDocument​(java.lang.String encoding, java.lang.String version)
      Receive notification that a document is being started.
      void startPrefixMapping​(java.lang.String prefix, java.lang.String namespaceURI)
      Receive notification that a namespace has been declared.
      void startPrefixMappings​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)  
      java.lang.String transformToXML()  
      void writeHeader()
      INTERNAL Writes the header, if appropriate.
      • Methods inherited from class org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecordImpl

        addExtraNamespacesToNamespaceResolver, addXsiTypeAndClassIndicatorIfRequired, addXsiTypeAndClassIndicatorIfRequired, attributeWithoutQName, getConversionManager, getLeafElementType, getMarshaller, getNamespaceResolver, getNamespaceSeparator, getOwningObject, getSession, hasCustomNamespaceMapper, hasEqualNamespaceResolvers, isNamespaceAware, isXOPPackage, removeExtraNamespacesFromNamespaceResolver, resolveNamespacePrefix, setCustomNamespaceMapper, setEqualNamespaceResolvers, setLeafElementType, setLeafElementType, setMarshaller, setNamespaceResolver, setOwningObject, setXOPPackage, writeXsiTypeAttribute, writeXsiTypeAttribute
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord

        addExtraNamespacesToNamespaceResolver, addXsiTypeAndClassIndicatorIfRequired, addXsiTypeAndClassIndicatorIfRequired, getLeafElementType, getMarshaller, getNamespaceResolver, getOwningObject, hasEqualNamespaceResolvers, isNamespaceAware, resolveNamespacePrefix, setCustomNamespaceMapper, setEqualNamespaceResolvers, setLeafElementType, setNamespaceResolver, setOwningObject, setXOPPackage, writeXsiTypeAttribute, writeXsiTypeAttribute
      • Methods inherited from interface org.eclipse.persistence.internal.oxm.record.MarshalRecord

        attributeWithoutQName, hasCustomNamespaceMapper, isXOPPackage, removeExtraNamespacesFromNamespaceResolver, setLeafElementType, setMarshaller
      • Methods inherited from interface org.eclipse.persistence.internal.oxm.record.XMLRecord

        getConversionManager, getNamespaceSeparator, getSession
    • Field Detail

      • textWrapperFragment

        protected org.eclipse.persistence.internal.oxm.XPathFragment textWrapperFragment
      • COLON_W_SCHEMA_NIL_ATTRIBUTE

        protected static final java.lang.String COLON_W_SCHEMA_NIL_ATTRIBUTE
        See Also:
        Constant Field Values
    • Constructor Detail

      • MarshalRecord

        public MarshalRecord()
    • Method Detail

      • forceValueWrapper

        public void forceValueWrapper()
        Specified by:
        forceValueWrapper in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • getPositionalNodes

        public java.util.HashMap getPositionalNodes()
      • getLocalName

        public java.lang.String getLocalName()
      • getNamespaceURI

        public java.lang.String getNamespaceURI()
      • clear

        public void clear()
      • getDocument

        public org.w3c.dom.Document getDocument()
      • getDOM

        public org.w3c.dom.Node getDOM()
        Specified by:
        getDOM in interface org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Overrides:
        getDOM in class org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecordImpl<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • addGroupingElement

        public void addGroupingElement​(org.eclipse.persistence.internal.oxm.XPathNode xPathNode)
        INTERNAL: If an XPathNode does not have an associated NodeValue then add it to the MarshalRecord as a grouping element.
        Specified by:
        addGroupingElement in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        xPathNode -
      • removeGroupingElement

        public void removeGroupingElement​(org.eclipse.persistence.internal.oxm.XPathNode xPathNode)
        INTERNAL:
        Specified by:
        removeGroupingElement in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        xPathNode -
      • transformToXML

        public java.lang.String transformToXML()
      • setSession

        public void setSession​(org.eclipse.persistence.internal.core.sessions.CoreAbstractSession session)
        Specified by:
        setSession in interface org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Overrides:
        setSession in class org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecordImpl<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • add

        public void add​(org.eclipse.persistence.internal.core.helper.CoreField key,
                        java.lang.Object value)
        INTERNAL: Add the field-value pair to the document.
        Specified by:
        add in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • put

        public java.lang.Object put​(org.eclipse.persistence.internal.core.helper.CoreField key,
                                    java.lang.Object value)
        INTERNAL: Add the field-value pair to the document.
        Specified by:
        put in interface org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Overrides:
        put in class org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecordImpl<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • namespaceDeclarations

        public void namespaceDeclarations​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
        INTERNAL: Add the namespace declarations to the XML document.
        Parameters:
        namespaceResolver - The NamespaceResolver contains the namespace prefix and URI pairings that need to be declared.
      • emptyCollection

        public boolean emptyCollection​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
                                       org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver,
                                       boolean openGrouping)
        Handle marshal of an empty collection.
        Specified by:
        emptyCollection in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        xPathFragment -
        namespaceResolver -
        openGrouping - if grouping elements should be marshalled for empty collections
        Returns:
      • namespaceDeclaration

        public void namespaceDeclaration​(java.lang.String prefix,
                                         java.lang.String namespaceURI)
        Add the specified namespace declaration
        Specified by:
        namespaceDeclaration in interface org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Specified by:
        namespaceDeclaration in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Overrides:
        namespaceDeclaration in class org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecordImpl<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        prefix -
        namespaceURI -
      • defaultNamespaceDeclaration

        public void defaultNamespaceDeclaration​(java.lang.String defaultNamespace)
        Add the defaultNamespace declaration
        Parameters:
        defaultNamespace -
      • startDocument

        public abstract void startDocument​(java.lang.String encoding,
                                           java.lang.String version)
        Receive notification that a document is being started.
        Parameters:
        encoding - The XML document will be encoded using this encoding.
        version - This specifies the version of XML.
      • writeHeader

        public void writeHeader()
        INTERNAL Writes the header, if appropriate.
      • endDocument

        public abstract void endDocument()
        Recieve notification that a document is being ended.
      • marshalWithoutRootElement

        public void marshalWithoutRootElement​(org.eclipse.persistence.internal.oxm.ObjectBuilder treeObjectBuilder,
                                              java.lang.Object object,
                                              org.eclipse.persistence.internal.oxm.mappings.Descriptor descriptor,
                                              org.eclipse.persistence.internal.oxm.Root root,
                                              boolean isXMLRoot)
        INTERNAL
      • startPrefixMapping

        public void startPrefixMapping​(java.lang.String prefix,
                                       java.lang.String namespaceURI)
        Receive notification that a namespace has been declared.
        Specified by:
        startPrefixMapping in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        prefix - The namespace prefix.
        namespaceURI - The namespace URI.
      • startPrefixMappings

        public void startPrefixMappings​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      • endPrefixMapping

        public void endPrefixMapping​(java.lang.String prefix)
        Receive notification that the scope of this namespace declaration has ended.
        Specified by:
        endPrefixMapping in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        prefix - The namespace prefix.
      • endPrefixMappings

        public void endPrefixMappings​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      • openStartElement

        public void openStartElement​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
                                     org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
        Receive notification that an element is being started.
        Specified by:
        openStartElement in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        xPathFragment - The XPathFragment contains the name and prefix information about the XML element being ended.
        namespaceResolver - The NamespaceResolver can be used to resolve the namespace URI for the namespace prefix held by the XPathFragment (if required).
      • element

        public abstract void element​(org.eclipse.persistence.internal.oxm.XPathFragment frag)
        Receive notification of an element.
        Parameters:
        frag - The XPathFragment of the element
      • attribute

        public abstract void attribute​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
                                       org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver,
                                       java.lang.String value)
        Receive notification of an attribute.
        Specified by:
        attribute in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        xPathFragment - The XPathFragment contains the name and prefix information about the XML element being ended.
        namespaceResolver - The NamespaceResolver can be used to resolve the namespace URI for the namespace prefix held by the XPathFragment (if required).
        value - This is the complete value for the attribute.
      • attribute

        public abstract void attribute​(java.lang.String namespaceURI,
                                       java.lang.String localName,
                                       java.lang.String qName,
                                       java.lang.String value)
        Receive notification of an attribute.
        Specified by:
        attribute in interface org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Specified by:
        attribute in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Overrides:
        attribute in class org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecordImpl<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        namespaceURI - The namespace URI, if the attribute is not namespace qualified the value of this parameter wil be null.
        localName - The local name of the attribute.
        qName - The qualified name of the attribute.
        value - This is the complete value for the attribute.
      • closeStartElement

        public abstract void closeStartElement()
        Receive notification that all of the attribute events have occurred for the most recent element that has been started.
        Specified by:
        closeStartElement in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • endElement

        public abstract void endElement​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
                                        org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
        Receive notification that an element is being ended.
        Specified by:
        endElement in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        xPathFragment - The XPathFragment contains the name and prefix information about the XML element being ended.
        namespaceResolver - The NamespaceResolver can be used to resolve the namespace URI for the namespace prefix held by the XPathFragment (if required).
      • characters

        public abstract void characters​(java.lang.String value)
        Receive notification of character data.
        Specified by:
        characters in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        value - This is the entire value of the text node.
      • attribute

        public void attribute​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
                              org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver,
                              java.lang.Object value,
                              javax.xml.namespace.QName schemaType)
        Convert the value if necessary and write out the attribute and converted value.
        Specified by:
        attribute in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Since:
        EclipseLink 2.4
      • characters

        public void characters​(javax.xml.namespace.QName schemaType,
                               java.lang.Object value,
                               java.lang.String mimeType,
                               boolean isCDATA)
        Convert the value if necessary and write out the converted value.
        Specified by:
        characters in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Since:
        EclipseLink 2.4
      • getValueToWrite

        public java.lang.String getValueToWrite​(javax.xml.namespace.QName schemaType,
                                                java.lang.Object value,
                                                org.eclipse.persistence.internal.oxm.ConversionManager conversionManager)
        Specified by:
        getValueToWrite in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • getStringForQName

        protected java.lang.String getStringForQName​(javax.xml.namespace.QName qName)
      • cdata

        public abstract void cdata​(java.lang.String value)
        Receive notification of character data to be wrapped in a CDATA node.
        Specified by:
        cdata in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        value - This is the value of the text to be wrapped
      • node

        public void node​(org.w3c.dom.Node node,
                         org.eclipse.persistence.internal.oxm.NamespaceResolver resolver)
        Receive notification of a node.
        Specified by:
        node in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        node - The Node to be added to the document
        resolver - The NamespaceResolver can be used to resolve the namespace URI/prefix of the node
      • node

        public abstract void node​(org.w3c.dom.Node node,
                                  org.eclipse.persistence.internal.oxm.NamespaceResolver resolver,
                                  java.lang.String qualifiedName,
                                  java.lang.String rootUri)
        Receive notification of a node.
        Parameters:
        node - The Node to be added to the document
        resolver - The NamespaceResolver can be used to resolve the
        qualifiedName - replacement root name for the node
        rootUri - replacement root namespace for the node namespace URI/prefix of the node
      • openStartGroupingElements

        public org.eclipse.persistence.internal.oxm.XPathFragment openStartGroupingElements​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
        INTERNAL: Trigger that the grouping elements should be written. This is normally done when something like a mapping has a non-null value that is marshalled.
        Specified by:
        openStartGroupingElements in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Parameters:
        namespaceResolver - The NamespaceResolver can be used to resolve the namespace URI for the namespace prefix held by the XPathFragment (if required).
      • closeStartGroupingElements

        public void closeStartGroupingElements​(org.eclipse.persistence.internal.oxm.XPathFragment groupingFragment)
        Specified by:
        closeStartGroupingElements in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • addPositionalNodes

        protected void addPositionalNodes​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
                                          org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
      • beforeContainmentMarshal

        public void beforeContainmentMarshal​(java.lang.Object child)
        Specified by:
        beforeContainmentMarshal in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • afterContainmentMarshal

        public void afterContainmentMarshal​(java.lang.Object parent,
                                            java.lang.Object child)
        Specified by:
        afterContainmentMarshal in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • getGroupingElements

        public java.util.ArrayList<org.eclipse.persistence.internal.oxm.XPathNode> getGroupingElements()
        INTERNAL: Returns the list of grouping elements currently stored on the MarshalRecord
        Specified by:
        getGroupingElements in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • setGroupingElement

        public void setGroupingElement​(java.util.ArrayList<org.eclipse.persistence.internal.oxm.XPathNode> elements)
        INTERNAL: Sets the list of grouping elements to be marshalled on this record.
        Specified by:
        setGroupingElement in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • predicateAttribute

        public void predicateAttribute​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
                                       org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
        Marshal the attribute for the predicate if one was specified.
        Specified by:
        predicateAttribute in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • startCollection

        public void startCollection()
        This method is used to inform the MarshalRecord that the element events it is about to receive are part of a collection.
        Specified by:
        startCollection in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        See Also:
        endCollection()
        Since:
        EclipseLink 2.4
      • emptyAttribute

        public void emptyAttribute​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
                                   org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
        Used when an nil attribute should be written
        Specified by:
        emptyAttribute in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Since:
        EclipseLink 2.4
      • emptyComplex

        public void emptyComplex​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
                                 org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
        Used when an nil attribute should be written
        Specified by:
        emptyComplex in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Since:
        EclipseLink 2.4
      • emptySimple

        public void emptySimple​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
        Used when an nil attribute should be written
        Specified by:
        emptySimple in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Since:
        EclipseLink 2.4
      • nilSimple

        public void nilSimple​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
        Used when an nil attribute should be written
        Specified by:
        nilSimple in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Since:
        EclipseLink 2.4
      • nilComplex

        public void nilComplex​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
                               org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
        Used when an nil attribute should be written
        Specified by:
        nilComplex in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Since:
        EclipseLink 2.4
      • endCollection

        public void endCollection()
        This method is used to inform the MarshalRecord that it is done receiving element events that are part of a collection.
        Specified by:
        endCollection in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        See Also:
        startCollection()
        Since:
        EclipseLink 2.4
      • processNamespaceResolverForXSIPrefix

        protected java.lang.String processNamespaceResolverForXSIPrefix​(org.eclipse.persistence.internal.oxm.NamespaceResolver namespaceResolver)
        INTERNAL: Private function to process or create an entry in the NamespaceResolver for the xsi prefix.
        Parameters:
        namespaceResolver -
        Returns:
        xsi prefix
        Since:
        EclipseLink 2.4
      • getTextWrapperFragment

        public org.eclipse.persistence.internal.oxm.XPathFragment getTextWrapperFragment()
        INTERNAL: The optional fragment used to wrap the text() mappings
        Specified by:
        getTextWrapperFragment in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
        Since:
        2.4
      • getNameForFragment

        protected java.lang.String getNameForFragment​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment)
      • getPrefixBytes

        protected byte[] getPrefixBytes​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment)
      • getPrefixForFragment

        protected java.lang.String getPrefixForFragment​(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment)
      • getCycleDetectionStack

        public org.eclipse.persistence.internal.oxm.record.MarshalRecord.CycleDetectionStack<java.lang.Object> getCycleDetectionStack()
        INTERNAL
        Specified by:
        getCycleDetectionStack in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • isWrapperAsCollectionName

        public boolean isWrapperAsCollectionName()
        Specified by:
        isWrapperAsCollectionName in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • getCurrentAttributeGroup

        public CoreAttributeGroup getCurrentAttributeGroup()
        Specified by:
        getCurrentAttributeGroup in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • pushAttributeGroup

        public void pushAttributeGroup​(CoreAttributeGroup group)
        Specified by:
        pushAttributeGroup in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • popAttributeGroup

        public void popAttributeGroup()
        Specified by:
        popAttributeGroup in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>
      • flush

        public void flush()
        Specified by:
        flush in interface org.eclipse.persistence.internal.oxm.record.MarshalRecord<org.eclipse.persistence.internal.core.sessions.CoreAbstractSession,​org.eclipse.persistence.internal.core.helper.CoreField,​MARSHALLER extends org.eclipse.persistence.internal.oxm.Marshaller,​org.eclipse.persistence.internal.oxm.NamespaceResolver>