Top Fields Constructors Methods
org.eclipse.persistence.oxm.record

public Class XMLEventWriterRecord

extends MarshalRecord
Class Inheritance
Imports
java.util.ArrayList, .HashMap, .Iterator, .List, .Map, javax.xml.stream.XMLEventFactory, .XMLEventWriter, .XMLStreamException, javax.xml.stream.events.XMLEvent, org.eclipse.persistence.exceptions.XMLMarshalException, org.eclipse.persistence.internal.oxm.Constants, .NamespaceResolver, .XPathFragment, org.eclipse.persistence.internal.oxm.record.DomToXMLEventWriter, org.w3c.dom.Document, .Node

Field Summary

Modifier and TypeField and Description
private List<E>
private DomToXMLEventWriter
private boolean
private List<E>
private NamespaceResolver
private Map<String, String>
private XMLEventFactory
private XMLEventWriter
private XPathFragment<XML_FIELD extends Field>
Inherited from org.eclipse.persistence.oxm.record.MarshalRecord:
COLON_W_SCHEMA_NIL_ATTRIBUTEtextWrapperFragmentTRUE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public 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
)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.attribute.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.attribute.

Receive notification of an attribute.
public 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.
name
,
String
This is the complete value for the attribute.
value
)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.attribute.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.attribute, org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord.attribute.

Receive notification of an attribute.
public void
cdata(String
This is the value of the text to be wrapped
value
)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.cdata.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.cdata.

Receive notification of character data to be wrapped in a CDATA node.
public void
characters(String
This is the entire value of the text node.
value
)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.characters.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.characters.

Receive notification of character data.
public void
closeStartElement()

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.closeStartElement.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.closeStartElement.

Receive notification that all of the attribute events have occurred for the most recent element that has been started.
public void
element(XPathFragment<XML_FIELD extends Field>
The XPathFragment of the element
frag
)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.element.

Receive notification of an element.
public void
endDocument()

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.endDocument.

Recieve notification that a document is being ended.
public void
endElement(XPathFragment<XML_FIELD extends Field>
The XPathFragment contains the name and prefix information about the XML element being ended.
pathFragment
,
NamespaceResolver
The NamespaceResolver can be used to resolve the namespace URI for the namespace prefix held by the XPathFragment (if required).
namespaceResolver
)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.endElement.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.endElement.

Receive notification that an element is being ended.
public XMLEventWriter
public void
namespaceDeclarations(NamespaceResolver
The NamespaceResolver contains the namespace prefix and URI pairings that need to be declared.
namespaceResolver
)

Overrides org.eclipse.persistence.oxm.record.MarshalRecord.namespaceDeclarations.

INTERNAL: Add the namespace declarations to the XML document.
public 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
uri
,
String
replacement root namespace for the node namespace URI/prefix of the node
name
)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.node.

Receive notification of a node.
private void
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
)

Overrides org.eclipse.persistence.oxm.record.MarshalRecord.openStartElement.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.openStartElement.

Receive notification that an element is being started.
public void
public void
startDocument(String
The XML document will be encoded using this encoding.
encoding
,
String
This specifies the version of XML.
version
)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.startDocument.

Receive notification that a document is being started.
public void
startPrefixMapping(String
The namespace prefix.
prefix
,
String
The namespace URI.
namespaceUri
)

Overrides org.eclipse.persistence.oxm.record.MarshalRecord.startPrefixMapping.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.startPrefixMapping.

Receive notification that a namespace has been declared.
public void
private void
Inherited from org.eclipse.persistence.oxm.record.MarshalRecord:
addaddGroupingElementaddPositionalNodesafterContainmentMarshalattributebeforeContainmentMarshalcharactersclearcloseStartGroupingElementsdefaultNamespaceDeclarationemptyAttributeemptyCollectionemptyComplexemptySimpleendCollectionendPrefixMappingendPrefixMappingsflushforceValueWrappergetCurrentAttributeGroupgetCycleDetectionStackgetDocumentgetDOMgetGroupingElementsgetLocalNamegetNameForFragmentgetNamespaceURIgetPositionalNodesgetPrefixBytesgetPrefixForFragmentgetStringForQNamegetTextWrapperFragmentgetValueToWriteisWrapperAsCollectionNamemarshalWithoutRootElementnamespaceDeclarationnilComplexnilSimplenodeopenStartGroupingElementspopAttributeGrouppredicateAttributeprocessNamespaceResolverForXSIPrefixpushAttributeGroupputremoveGroupingElementsetGroupingElementsetSessionsplitCDatastartCollectiontransformToXMLwriteHeader

Field Detail

attributesback to summary
private List<E> attributes
domToXMLEventWriterback to summary
private DomToXMLEventWriter domToXMLEventWriter
isStartElementOpenback to summary
private boolean isStartElementOpen
namespaceDeclarationsback to summary
private List<E> namespaceDeclarations
namespaceResolverback to summary
private NamespaceResolver namespaceResolver

Hides org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecordImpl.namespaceResolver.

prefixMappingback to summary
private Map<String, String> prefixMapping
xmlEventFactoryback to summary
private XMLEventFactory xmlEventFactory
xmlEventWriterback to summary
private XMLEventWriter xmlEventWriter
xPathFragmentback to summary
private XPathFragment<XML_FIELD extends Field> xPathFragment

Constructor Detail

XMLEventWriterRecordback to summary
public XMLEventWriterRecord(XMLEventWriter xmlEventWriter)

Method Detail

attributeback to summary
public void attribute(XPathFragment<XML_FIELD extends Field> xPathFragment, NamespaceResolver namespaceResolver, String value)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.attribute.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.attribute.

Doc from org.eclipse.persistence.oxm.record.MarshalRecord.attribute.

Receive notification of an attribute.

Parameters
xPathFragment:XPathFragment<XML_FIELD extends Field>

The XPathFragment contains the name and prefix information about the XML element being ended.

namespaceResolver:NamespaceResolver

The NamespaceResolver can be used to resolve the namespace URI for the namespace prefix held by the XPathFragment (if required).

value:String

This is the complete value for the attribute.

Annotations
@Override
attributeback to summary
public void attribute(String namespaceURI, String localName, String name, String value)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.attribute.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.attribute, org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord.attribute.

Doc from org.eclipse.persistence.oxm.record.MarshalRecord.attribute.

Receive notification of an attribute.

Parameters
namespaceURI:String

The namespace URI, if the attribute is not namespace qualified the value of this parameter wil be null.

localName:String

The local name of the attribute.

name:String

The qualified name of the attribute.

value:String

This is the complete value for the attribute.

Annotations
@Override
cdataback to summary
public void cdata(String value)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.cdata.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.cdata.

Doc from org.eclipse.persistence.oxm.record.MarshalRecord.cdata.

Receive notification of character data to be wrapped in a CDATA node.

Parameters
value:String

This is the value of the text to be wrapped

Annotations
@Override
charactersback to summary
public void characters(String value)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.characters.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.characters.

Doc from org.eclipse.persistence.oxm.record.MarshalRecord.characters.

Receive notification of character data.

Parameters
value:String

This is the entire value of the text node.

Annotations
@Override
closeStartElementback to summary
public void closeStartElement()

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.closeStartElement.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.closeStartElement.

Doc from org.eclipse.persistence.oxm.record.MarshalRecord.closeStartElement.

Receive notification that all of the attribute events have occurred for the most recent element that has been started.

Annotations
@Override
elementback to summary
public void element(XPathFragment<XML_FIELD extends Field> frag)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.element.

Doc from org.eclipse.persistence.oxm.record.MarshalRecord.element.

Receive notification of an element.

Parameters
frag:XPathFragment<XML_FIELD extends Field>

The XPathFragment of the element

Annotations
@Override
endDocumentback to summary
public void endDocument()

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.endDocument.

Doc from org.eclipse.persistence.oxm.record.MarshalRecord.endDocument.

Recieve notification that a document is being ended.

Annotations
@Override
endElementback to summary
public void endElement(XPathFragment<XML_FIELD extends Field> pathFragment, NamespaceResolver namespaceResolver)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.endElement.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.endElement.

Doc from org.eclipse.persistence.oxm.record.MarshalRecord.endElement.

Receive notification that an element is being ended.

Parameters
pathFragment:XPathFragment<XML_FIELD extends Field>

The XPathFragment contains the name and prefix information about the XML element being ended.

namespaceResolver:NamespaceResolver

The NamespaceResolver can be used to resolve the namespace URI for the namespace prefix held by the XPathFragment (if required).

Annotations
@Override
getXMLEventWriterback to summary
public XMLEventWriter getXMLEventWriter()
namespaceDeclarationsback to summary
public void namespaceDeclarations(NamespaceResolver namespaceResolver)

Overrides org.eclipse.persistence.oxm.record.MarshalRecord.namespaceDeclarations.

Doc from org.eclipse.persistence.oxm.record.MarshalRecord.namespaceDeclarations.

INTERNAL: Add the namespace declarations to the XML document.

Parameters
namespaceResolver:NamespaceResolver

The NamespaceResolver contains the namespace prefix and URI pairings that need to be declared.

Annotations
@Override
nodeback to summary
public void node(Node node, NamespaceResolver resolver, String uri, String name)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.node.

Doc from org.eclipse.persistence.oxm.record.MarshalRecord.node.

Receive notification of a node.

Parameters
node:Node

The Node to be added to the document

resolver:NamespaceResolver

The NamespaceResolver can be used to resolve the

uri:String

replacement root name for the node

name:String

replacement root namespace for the node namespace URI/prefix of the node

Annotations
@Override
openAndCloseStartElementback to summary
private void openAndCloseStartElement()
openStartElementback to summary
public void openStartElement(XPathFragment<XML_FIELD extends Field> xPathFragment, NamespaceResolver namespaceResolver)

Overrides org.eclipse.persistence.oxm.record.MarshalRecord.openStartElement.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.openStartElement.

Doc from org.eclipse.persistence.oxm.record.MarshalRecord.openStartElement.

Receive notification that an element is being started.

Parameters
xPathFragment:XPathFragment<XML_FIELD extends Field>

The XPathFragment contains the name and prefix information about the XML element being ended.

namespaceResolver:NamespaceResolver

The NamespaceResolver can be used to resolve the namespace URI for the namespace prefix held by the XPathFragment (if required).

Annotations
@Override
setXMLEventWriterback to summary
public void setXMLEventWriter(XMLEventWriter anXMLEventWriter)
startDocumentback to summary
public void startDocument(String encoding, String version)

Implements abstract org.eclipse.persistence.oxm.record.MarshalRecord.startDocument.

Doc from org.eclipse.persistence.oxm.record.MarshalRecord.startDocument.

Receive notification that a document is being started.

Parameters
encoding:String

The XML document will be encoded using this encoding.

version:String

This specifies the version of XML.

Annotations
@Override
startPrefixMappingback to summary
public void startPrefixMapping(String prefix, String namespaceUri)

Overrides org.eclipse.persistence.oxm.record.MarshalRecord.startPrefixMapping.

Implements org.eclipse.persistence.internal.oxm.record.MarshalRecord.startPrefixMapping.

Doc from org.eclipse.persistence.oxm.record.MarshalRecord.startPrefixMapping.

Receive notification that a namespace has been declared.

Parameters
prefix:String

The namespace prefix.

namespaceUri:String

The namespace URI.

Annotations
@Override
startPrefixMappingsback to summary
public void startPrefixMappings(NamespaceResolver namespaceResolver)

Overrides org.eclipse.persistence.oxm.record.MarshalRecord.startPrefixMappings.

Annotations
@Override
writePrefixMappingsback to summary
private void writePrefixMappings()