Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-03

oracle.toplink.ox.record
Class NodeRecord

java.lang.Object
  extended by oracle.toplink.internal.sessions.AbstractRecord
      extended by oracle.toplink.ox.record.XMLRecord
          extended by oracle.toplink.ox.record.MarshalRecord
              extended by oracle.toplink.ox.record.NodeRecord
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map, Record

public class NodeRecord
extends MarshalRecord

Use this type of MarshalRecord when the marshal target is a Node.

XMLContext xmlContext = new XMLContext("session-name");
XMLMarshaller xmlMarshaller = xmlContext.createMarshaller();
NodeRecord nodeRecord = new NodeRecord();
nodeRecord.setDOM(myNode);
xmlMarshaller.marshal(myObject, nodeRecord);

If the marshal(Node) method is called on XMLMarshaller, then the Writer is automatically wrapped in a NodeRecord.

XMLContext xmlContext = new XMLContext("session-name");
XMLMarshaller xmlMarshaller = xmlContext.createMarshaller();
xmlMarshaller.marshal(myObject, myNode);

See Also:
XMLMarshaller, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Method Summary
 void cdata(java.lang.String value)
          Receive notification of character data to be wrapped in a CDATA node.
 void clear()
          Clear the sub-nodes of the DOM.
 org.w3c.dom.Document getDocument()
          Return the document.
 org.w3c.dom.Element getDOM()
          Return the Node that the object will be marshalled to.
 java.lang.String getLocalName()
          Get the local name of the context root element.
 java.lang.String getNamespaceURI()
          Get the namespace URI for the context root element.
 void node(org.w3c.dom.Node node, NamespaceResolver namespaceResolver)
          Receive notification of a node.
 void setDOM(org.w3c.dom.Node dom)
          Set the Node that the object will be marshalled to.
 java.lang.String transformToXML()
          Return the XML string representation of the DOM.
 
Methods inherited from class oracle.toplink.ox.record.MarshalRecord
closeStartGroupingElements, endPrefixMapping, endPrefixMappings, getPositionalNodes, startPrefixMapping, startPrefixMappings
 
Methods inherited from class oracle.toplink.ox.record.XMLRecord
contains, getDocPresPolicy, getNamespaceResolver, resolveNamespacePrefix, setDocPresPolicy, setNamespaceResolver
 
Methods inherited from class oracle.toplink.internal.sessions.AbstractRecord
containsKey, containsKey, containsValue, elements, entrySet, get, get, getValues, getValues, isEmpty, keys, keySet, put, put, putAll, size, values
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Method Detail

getLocalName

public java.lang.String getLocalName()
Description copied from class: oracle.toplink.ox.record.XMLRecord
Get the local name of the context root element.

Overrides:
getLocalName in class MarshalRecord

getNamespaceURI

public java.lang.String getNamespaceURI()
Description copied from class: oracle.toplink.ox.record.XMLRecord
Get the namespace URI for the context root element.

Overrides:
getNamespaceURI in class MarshalRecord

clear

public void clear()
Description copied from class: oracle.toplink.ox.record.XMLRecord
Clear the sub-nodes of the DOM.

Specified by:
clear in interface java.util.Map
Overrides:
clear in class MarshalRecord

getDocument

public org.w3c.dom.Document getDocument()
Description copied from class: oracle.toplink.ox.record.XMLRecord
Return the document.

Overrides:
getDocument in class MarshalRecord

getDOM

public org.w3c.dom.Element getDOM()
Return the Node that the object will be marshalled to.

Overrides:
getDOM in class MarshalRecord
Returns:
The marshal target.

setDOM

public void setDOM(org.w3c.dom.Node dom)
Set the Node that the object will be marshalled to.

Parameters:
writer - The marshal target.

transformToXML

public java.lang.String transformToXML()
Description copied from class: oracle.toplink.ox.record.XMLRecord
Return the XML string representation of the DOM.

Overrides:
transformToXML in class MarshalRecord

node

public void node(org.w3c.dom.Node node,
                 NamespaceResolver namespaceResolver)
Description copied from class: oracle.toplink.ox.record.MarshalRecord
Receive notification of a node.

Specified by:
node in class MarshalRecord
Parameters:
node - The Node to be added to the document

cdata

public void cdata(java.lang.String value)
Description copied from class: oracle.toplink.ox.record.MarshalRecord
Receive notification of character data to be wrapped in a CDATA node.

Specified by:
cdata in class MarshalRecord
Parameters:
value - This is the value of the text to be wrapped

Copyright © 1998, 2010, Oracle. All Rights Reserved.