Skip navigation links

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

B32476-02


oracle.toplink.ox.record
Class ContentHandlerRecord

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.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 Class Summary

 

Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>

 

Constructor Summary
ContentHandlerRecord()
           

 

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.ox.record.MarshalRecord
clear, closeStartGroupingElements, endPrefixMappings, getDocument, getDOM, getLocalName, getNamespaceURI, getPositionalNodes, startPrefixMappings, transformToXML

 

Methods inherited from class oracle.toplink.ox.record.XMLRecord
contains, getDocPresPolicy, getNamespaceResolver, 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

 

Constructor Detail

ContentHandlerRecord

public ContentHandlerRecord()

Method Detail

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

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