Skip navigation links
oracle.toplink.ox.record
Class ContentHandlerRecord
java.lang.Object
oracle.toplink.internal.sessions.AbstractRecord
oracle.toplink.ox.record.XMLRecord
oracle.toplink.ox.record.MarshalRecord
oracle.toplink.ox.record.ContentHandlerRecord
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map, Record
-
public class ContentHandlerRecord
- extends MarshalRecord
Use this type of MarshalRecord when the marshal target is a ContentHandler.
XMLContext xmlContext = new XMLContext("session-name");
XMLMarshaller xmlMarshaller = xmlContext.createMarshaller();
ContentHandlerRecord contentHandlerRecord = new ContentHandlerRecord();
marshalRecord.setContentHandler(myContentHandler);
xmlMarshaller.marshal(myObject, contentHandlerRecord);
If the marshal(ContentHandler) method is called on XMLMarshaller, then the ContentHanlder is automatically wrapped in a ContentHandlerRecord.
XMLContext xmlContext = new XMLContext("session-name");
XMLMarshaller xmlMarshaller = xmlContext.createMarshaller();
xmlMarshaller.marshal(myObject, contentHandler);
- See Also:
XMLMarshaller
, Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
Method Summary |
org.xml.sax.ContentHandler |
getContentHandler()
Return the ContentHandler that the object will be marshalled to. |
void |
node(org.w3c.dom.Node node, NamespaceResolver namespaceResolver)
Receive notification of a node. |
java.lang.String |
resolveNamespacePrefix(java.lang.String s)
|
void |
setContentHandler(org.xml.sax.ContentHandler contentHandler)
Set the ContentHandler that the object will be marshalled to. |
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler lexicalHandler)
Set the LexicalHandler to recieve CDATA related events |
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 |
ContentHandlerRecord
public ContentHandlerRecord()
getContentHandler
public org.xml.sax.ContentHandler getContentHandler()
- Return the ContentHandler that the object will be marshalled to.
-
- Returns:
- The marshal target.
setContentHandler
public void setContentHandler(org.xml.sax.ContentHandler contentHandler)
- Set the ContentHandler that the object will be marshalled to.
-
- Parameters:
contentHandler
- The marshal target.
setLexicalHandler
public void setLexicalHandler(org.xml.sax.ext.LexicalHandler lexicalHandler)
- Set the LexicalHandler to recieve CDATA related events
node
public void node(org.w3c.dom.Node node,
NamespaceResolver namespaceResolver)
- Receive notification of a node.
-
- Specified by:
node
in class MarshalRecord
-
- Parameters:
node
- The Node to be added to the document
namespaceResolver
- The NamespaceResolver can be used to resolve the namespace URI/prefix of the node
resolveNamespacePrefix
public java.lang.String resolveNamespacePrefix(java.lang.String s)
-
- Overrides:
resolveNamespacePrefix
in class XMLRecord
Skip navigation links