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.
org.eclipse.persistence.oxm.XMLMarshaller
| Modifier and Type | Field and Description |
|---|---|
| private Stack | |
| protected static final String | |
| private MarshalRecord. | |
| private ArrayList | |
| private HashMap | |
| protected XPathFragment | |
| protected static final String |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(CoreField key, Object value)
Implements org. |
| public void | addGroupingElement(XPathNode xPathNode)
Implements org. |
| protected void | addPositionalNodes(XPathFragment<XML_FIELD extends Field> xPathFragment, NamespaceResolver namespaceResolver)
|
| public void | afterContainmentMarshal(Object parent, Object child)
Implements org. |
| public abstract void | attribute(XPathFragment<XML_FIELD extends Field>
The XPathFragment contains the name and prefix
information about the XML element being ended. xPathFragment, NamespaceResolver The NamespaceResolver can be used to resolve the
namespace URI for the namespace prefix held by the XPathFragment (if
required). namespaceResolver, String This is the complete value for the attribute. value)Redeclares org. |
| public abstract void | attribute(String
The namespace URI, if the attribute is not namespace
qualified the value of this parameter wil be null. namespaceURI, String The local name of the attribute. localName, String The qualified name of the attribute. qName, String This is the complete value for the attribute. value)Redeclares org. Overrides org. |
| public void | attribute(XPathFragment<XML_FIELD extends Field> xPathFragment, NamespaceResolver namespaceResolver, Object value, QName schemaType)
Implements org. |
| public void | |
| public abstract void | cdata(String
This is the value of the text to be wrapped value)Redeclares org. |
| public abstract void | characters(String
This is the entire value of the text node. value)Redeclares org. |
| public void | characters(QName schemaType, Object value, String mimeType, boolean isCDATA)
Implements org. |
| public void | |
| public abstract void | closeStartElement()
Redeclares org. |
| public void | closeStartGroupingElements(XPathFragment<XML_FIELD extends Field> groupingFragment)
Implements org. |
| private Field | |
| public void | |
| public abstract void | element(XPathFragment<XML_FIELD extends Field>
The XPathFragment of the element frag)Receive notification of an element. |
| public void | emptyAttribute(XPathFragment<XML_FIELD extends Field> xPathFragment, NamespaceResolver namespaceResolver)
Implements org. |
| public boolean | emptyCollection(XPathFragment<XML_FIELD extends Field> xPathFragment, NamespaceResolver namespaceResolver, boolean
if grouping elements should be marshalled for empty collections openGrouping)Implements org. |
| public void | emptyComplex(XPathFragment<XML_FIELD extends Field> xPathFragment, NamespaceResolver namespaceResolver)
Implements org. |
| public void | emptySimple(NamespaceResolver namespaceResolver)
Implements org. |
| public void | endCollection()
Implements org. |
| public abstract void | |
| public abstract void | endElement(XPathFragment<XML_FIELD extends Field>
The XPathFragment contains the name and prefix
information about the XML element being ended. xPathFragment, NamespaceResolver The NamespaceResolver can be used to resolve the
namespace URI for the namespace prefix held by the XPathFragment (if
required). namespaceResolver)Redeclares org. |
| public void | endPrefixMapping(String
The namespace prefix. prefix)Implements org. |
| public void | |
| public void | |
| public void | |
| public CoreAttributeGroup | |
| public MarshalRecord. | |
| public Document | |
| public Node | |
| public ArrayList | getGroupingElements()
Implements org. |
| public String | |
| protected String | |
| public String | |
| public HashMap | |
| protected byte[] | |
| protected String | |
| protected String | |
| public XPathFragment | getTextWrapperFragment()
Implements org. |
| public String | getValueToWrite(QName schemaType, Object value, ConversionManager conversionManager)
Implements org. |
| public boolean | |
| public void | marshalWithoutRootElement(ObjectBuilder<ABSTRACT_RECORD extends CoreAbstractRecord, ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>, DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, MARSHALLER extends Marshaller<CHARACTER_ESCAPE_HANDLER extends CharacterEscapeHandler, CONTEXT extends Context<ABSTRACT_SESSION extends CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>>, DESCRIPTOR extends Descriptor<?, ?, ?, ?, ?, NAMESPACE_RESOLVER, ?, ?, ?, ?>, FIELD extends Field, NAMESPACE_RESOLVER extends NamespaceResolver, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION extends CoreSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager>, SESSION_EVENT_LISTENER extends CoreSessionEventListener>, MARSHALLER_LISTENER extends Marshaller.
INTERNAL |
| public void | namespaceDeclaration(String prefix, String namespaceURI)
Overrides org. Implements org. |
| public void | namespaceDeclarations(NamespaceResolver
The NamespaceResolver contains the namespace
prefix and URI pairings that need to be declared. namespaceResolver)INTERNAL: Add the namespace declarations to the XML document. |
| public void | nilComplex(XPathFragment<XML_FIELD extends Field> xPathFragment, NamespaceResolver namespaceResolver)
Implements org. |
| public void | nilSimple(NamespaceResolver namespaceResolver)
Implements org. |
| public void | node(Node
The Node to be added to the document node, NamespaceResolver The NamespaceResolver can be used to resolve the
namespace URI/prefix of the node resolver)Implements org. |
| public abstract void | node(Node
The Node to be added to the document node, NamespaceResolver The NamespaceResolver can be used to resolve the resolver, String replacement root name for the node qualifiedName, String replacement root namespace for the node
namespace URI/prefix of the node rootUri)Receive notification of a node. |
| public void | openStartElement(XPathFragment<XML_FIELD extends Field>
The XPathFragment contains the name and prefix
information about the XML element being ended. xPathFragment, NamespaceResolver The NamespaceResolver can be used to resolve the
namespace URI for the namespace prefix held by the XPathFragment (if
required). namespaceResolver)Implements org. |
| public XPathFragment | openStartGroupingElements(NamespaceResolver
The NamespaceResolver can be used to resolve the
namespace URI for the namespace prefix held by the XPathFragment (if
required). namespaceResolver)Implements org. |
| public void | |
| public void | predicateAttribute(XPathFragment<XML_FIELD extends Field> xPathFragment, NamespaceResolver namespaceResolver)
Implements org. |
| protected String | Returns: xsi prefixINTERNAL: Private function to process or create an entry in the NamespaceResolver for the xsi prefix. |
| public void | pushAttributeGroup(CoreAttributeGroup<ATTRIBUTE_ITEM extends CoreAttributeItem, DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>> group)
Implements org. |
| public Object | put(CoreField key, Object value)
Overrides org. Implements org. |
| public void | removeGroupingElement(XPathNode xPathNode)
Implements org. |
| public void | setGroupingElement(ArrayList<XPathNode> elements)
Implements org. |
| public void | setSession(CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>> session)
Overrides org. Implements org. |
| pack-priv static List | Returns: list of CDATA-valid chunks of the inputfor CDATA section possibly containing value)"]]>"INTERNAL:
Convenience method for splitting CDATA content to parts
so that |
| public void | startCollection()
Implements org. |
| public abstract void | startDocument(String
The XML document will be encoded using this encoding. encoding, String This specifies the version of XML. version)Receive notification that a document is being started. |
| public void | startPrefixMapping(String
The namespace prefix. prefix, String The namespace URI. namespaceURI)Implements org. |
| public void | |
| public String | |
| public void |