oracle.toplink.ox.record
Class ContentHandlerRecord
java.lang.Object
oracle.toplink.publicinterface.DatabaseRow
oracle.toplink.ox.record.XMLRecord
oracle.toplink.ox.record.MarshalRecord
oracle.toplink.ox.record.ContentHandlerRecord
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Map, Record, java.io.Serializable
- 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 inherited from class java.util.Map |
java.util.Map.Entry |
| 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 |
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.
resolveNamespacePrefix
public java.lang.String resolveNamespacePrefix(XPathFragment frag,
NamespaceResolver resolver)
-
- Parameters:
frag - The XPathFragment contains the name and prefix information about the XML element being ended.
resolver - The NamespaceResolver can be used to resolve the namespace URI for the namespace prefix held by the XPathFragment (if required).
- Returns:
- A namespace URI.
resolveNamespacePrefix
public java.lang.String resolveNamespacePrefix(java.lang.String s)
-
- Overrides:
resolveNamespacePrefix in class XMLRecord