Oracle TopLink API Reference
10g Release 3 (10.1.3)

B13698-01


oracle.toplink.ox.record
Class NodeRecord

java.lang.Object
  extended byoracle.toplink.publicinterface.DatabaseRow
      extended byoracle.toplink.ox.record.XMLRecord
          extended byoracle.toplink.ox.record.MarshalRecord
              extended byoracle.toplink.ox.record.NodeRecord

All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, Record, java.io.Serializable

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 inherited from class java.util.Map
java.util.Map.Entry

 

Method Summary
 void clear()
          PUBLIC: Clear the sub-nodes of the DOM.
 org.w3c.dom.Document getDocument()
          PUBLIC: Return the document.
 org.w3c.dom.Element getDOM()
          Return the Node that the object will be marshalled to.
 java.lang.String getLocalName()
          PUBLIC: Get the local name of the context root element.
 java.lang.String getNamespaceURI()
          PUBLIC: Get the namespace URI for the context root element.
 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, getPositionalNodes, startPrefixMapping

 

Methods inherited from class oracle.toplink.ox.record.XMLRecord
contains, resolveNamespacePrefix

 

Methods inherited from class oracle.toplink.publicinterface.DatabaseRow
containsKey, containsKey, containsValue, elements, entrySet, get, get, 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: XMLRecord
PUBLIC: Get the local name of the context root element.
Overrides:
getLocalName in class MarshalRecord

getNamespaceURI

public java.lang.String getNamespaceURI()
Description copied from class: XMLRecord
PUBLIC: Get the namespace URI for the context root element.
Overrides:
getNamespaceURI in class MarshalRecord

clear

public void clear()
Description copied from class: XMLRecord
PUBLIC: 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: XMLRecord
PUBLIC: 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.

transformToXML

public java.lang.String transformToXML()
Description copied from class: XMLRecord
Return the XML string representation of the DOM.
Overrides:
transformToXML in class MarshalRecord

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