public class UnmarshalRecord extends XMLRecord implements ContentHandler, LexicalHandler
Purpose:Provide an implementation of ContentHandler that is used by TopLink OXM to build mapped Java Objects from SAX events.
Responsibilities:
XPathNode,
NodeValue,
TreeObjectBuilder,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static UnmappedContentHandler |
DEFAULT_UNMAPPED_CONTENT_HANDLER |
| Constructor and Description |
|---|
UnmarshalRecord(org.eclipse.persistence.internal.oxm.TreeObjectBuilder treeObjectBuilder) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributeValue(org.eclipse.persistence.internal.oxm.ContainerValue containerValue,
Object value) |
void |
addAttributeValue(org.eclipse.persistence.internal.oxm.ContainerValue containerValue,
Object value,
Object collection) |
void |
characters(char[] ch,
int start,
int length) |
void |
clear()
PUBLIC:
Clear the sub-nodes of the DOM.
|
void |
comment(char[] data,
int start,
int length) |
void |
endCDATA() |
void |
endDocument() |
void |
endDTD() |
void |
endElement(String namespaceURI,
String localName,
String qName) |
void |
endEntity(String entity) |
void |
endPrefixMapping(String prefix) |
void |
endUnmappedElement(String namespaceURI,
String localName,
String qName) |
Object |
get(org.eclipse.persistence.internal.helper.DatabaseField key)
INTERNAL:
Retrieve the value for the field.
|
org.eclipse.persistence.internal.oxm.NodeValue |
getAttributeChildNodeValue(String namespace,
String localName) |
Attributes |
getAttributes() |
UnmarshalRecord |
getChildRecord() |
UnmarshalRecord |
getChildUnmarshalRecord(org.eclipse.persistence.internal.oxm.TreeObjectBuilder treeObjectBuilder) |
Object |
getContainerInstance(org.eclipse.persistence.internal.oxm.ContainerValue containerValue) |
XMLDescriptor |
getDescriptor() |
Document |
getDocument()
PUBLIC:
Return the document.
|
Element |
getDOM()
PUBLIC:
Return the DOM.
|
String |
getEncoding()
PUBLIC:
Gets the encoding for this document.
|
org.eclipse.persistence.internal.oxm.SAXFragmentBuilder |
getFragmentBuilder() |
int |
getLevelIndex() |
String |
getLocalName()
PUBLIC:
Get the local name of the context root element.
|
String |
getNamespaceURI()
PUBLIC:
Get the namespace URI for the context root element.
|
String |
getNoNamespaceSchemaLocation() |
List |
getNullCapableValues() |
UnmarshalRecord |
getParentRecord() |
String |
getRootElementName()
Return the root element's prefix qualified name
|
String |
getRootElementNamespaceUri()
Return the root element's namespace URI
|
String |
getSchemaLocation() |
org.eclipse.persistence.internal.oxm.NodeValue |
getSelfNodeValueForAttribute(String namespace,
String localName) |
org.eclipse.persistence.internal.oxm.StrBuffer |
getStringBuffer() |
DOMRecord |
getTransformationRecord() |
QName |
getTypeQName() |
org.eclipse.persistence.internal.oxm.record.UnmarshalContext |
getUnmarshalContext() |
org.eclipse.persistence.internal.oxm.record.namespaces.UnmarshalNamespaceResolver |
getUnmarshalNamespaceResolver() |
String |
getVersion()
PUBLIC:
Gets the XML Version for this document.
|
org.eclipse.persistence.internal.oxm.record.XMLReader |
getXMLReader() |
org.eclipse.persistence.internal.oxm.XPathNode |
getXPathNode() |
void |
ignorableWhitespace(char[] ch,
int start,
int length) |
void |
initializeRecord(XMLMapping selfRecordMapping) |
boolean |
isBufferCDATA() |
boolean |
isNil() |
boolean |
isSelfRecord()
Indicates if this UnmarshalRecord represents a 'self' record
|
void |
processingInstruction(String target,
String data) |
void |
reference(org.eclipse.persistence.internal.oxm.Reference reference) |
void |
removeNullCapableValue(org.eclipse.persistence.internal.oxm.NullCapableValue nullCapableValue) |
void |
resetStringBuffer() |
String |
resolveNamespacePrefix(String prefix) |
String |
resolveNamespaceUri(String uri) |
void |
setAttributes(Attributes attributes) |
void |
setAttributeValue(Object value,
DatabaseMapping mapping) |
void |
setChildRecord(UnmarshalRecord childRecord) |
void |
setDocumentLocator(Locator locator) |
void |
setEncoding(String enc)
INTERNAL:
|
void |
setFragmentBuilder(org.eclipse.persistence.internal.oxm.SAXFragmentBuilder builder) |
void |
setLocalName(String localName) |
void |
setNil(boolean nil) |
void |
setNoNamespaceSchemaLocation(String location) |
void |
setParentRecord(UnmarshalRecord parentRecord) |
void |
setRootElementName(String qName) |
void |
setRootElementNamespaceUri(String uri) |
void |
setSchemaLocation(String schemaLocation) |
void |
setSelfRecord(boolean isSelfRecord)
Sets the flag which indicates if this UnmarshalRecord
represents a 'self' record
|
void |
setTransformationRecord(DOMRecord transformationRecord) |
void |
setTypeQName(QName typeQName) |
void |
setUnmarshalContext(org.eclipse.persistence.internal.oxm.record.UnmarshalContext unmarshalContext) |
void |
setUnmarshalNamespaceResolver(org.eclipse.persistence.internal.oxm.record.namespaces.UnmarshalNamespaceResolver anUnmarshalNamespaceResolver) |
void |
setVersion(String version)
INTERNAL:
|
void |
setXMLReader(org.eclipse.persistence.internal.oxm.record.XMLReader xmlReader) |
void |
skippedEntity(String name) |
void |
startCDATA() |
void |
startDocument() |
void |
startDTD(String a,
String b,
String c) |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts) |
void |
startEntity(String entity) |
void |
startPrefixMapping(String prefix,
String uri) |
void |
startUnmappedElement(String namespaceURI,
String localName,
String qName,
Attributes atts) |
String |
toString()
INTERNAL:
|
String |
transformToXML()
Return the XML string representation of the DOM.
|
void |
unmappedContent() |
contains, getCurrentObject, getDocPresPolicy, getIndicatingNoEntry, getLeafElementType, getMarshaller, getNamespaceResolver, getOwningObject, getSession, getUnmarshaller, isXOPPackage, setCurrentObject, setDocPresPolicy, setLeafElementType, setMarshaller, setNamespaceResolver, setOwningObject, setSession, setUnmarshaller, setXOPPackageadd, clone, containsKey, containsKey, containsKey, containsValue, elements, entrySet, get, get, getField, getFields, getIndicatingNoEntry, getValues, getValues, getValues, isEmpty, keys, keySet, mergeFrom, put, put, put, putAll, remove, remove, remove, replaceAt, size, valuespublic static final UnmappedContentHandler DEFAULT_UNMAPPED_CONTENT_HANDLER
public UnmarshalRecord(org.eclipse.persistence.internal.oxm.TreeObjectBuilder treeObjectBuilder)
public String getLocalName()
XMLRecordgetLocalName in class XMLRecordpublic void setLocalName(String localName)
public String getNamespaceURI()
XMLRecordgetNamespaceURI in class XMLRecordpublic void clear()
XMLRecordpublic Document getDocument()
XMLRecordgetDocument in class XMLRecordpublic String transformToXML()
XMLRecordtransformToXML in class XMLRecordpublic org.eclipse.persistence.internal.oxm.record.XMLReader getXMLReader()
public void setXMLReader(org.eclipse.persistence.internal.oxm.record.XMLReader xmlReader)
public UnmarshalRecord getChildRecord()
public void setChildRecord(UnmarshalRecord childRecord)
public UnmarshalRecord getParentRecord()
public String getRootElementName()
public void setRootElementName(String qName)
public String getRootElementNamespaceUri()
public void setRootElementNamespaceUri(String uri)
public void setParentRecord(UnmarshalRecord parentRecord)
public DOMRecord getTransformationRecord()
public void setTransformationRecord(DOMRecord transformationRecord)
public org.eclipse.persistence.internal.oxm.record.namespaces.UnmarshalNamespaceResolver getUnmarshalNamespaceResolver()
public void setUnmarshalNamespaceResolver(org.eclipse.persistence.internal.oxm.record.namespaces.UnmarshalNamespaceResolver anUnmarshalNamespaceResolver)
public List getNullCapableValues()
public void removeNullCapableValue(org.eclipse.persistence.internal.oxm.NullCapableValue nullCapableValue)
public Object getContainerInstance(org.eclipse.persistence.internal.oxm.ContainerValue containerValue)
public String getEncoding()
public void setEncoding(String enc)
public String getVersion()
public void setVersion(String version)
public String getSchemaLocation()
public void setSchemaLocation(String schemaLocation)
public String getNoNamespaceSchemaLocation()
public void setNoNamespaceSchemaLocation(String location)
public org.eclipse.persistence.internal.oxm.StrBuffer getStringBuffer()
public Attributes getAttributes()
public void setAttributes(Attributes attributes)
public QName getTypeQName()
public void setTypeQName(QName typeQName)
public void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlerpublic Object get(org.eclipse.persistence.internal.helper.DatabaseField key)
XMLRecordpublic org.eclipse.persistence.internal.oxm.XPathNode getXPathNode()
public XMLDescriptor getDescriptor()
public org.eclipse.persistence.internal.oxm.record.UnmarshalContext getUnmarshalContext()
public void setUnmarshalContext(org.eclipse.persistence.internal.oxm.record.UnmarshalContext unmarshalContext)
public boolean isNil()
public void setNil(boolean nil)
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXExceptionpublic void initializeRecord(XMLMapping selfRecordMapping) throws SAXException
SAXExceptionpublic void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerSAXExceptionpublic void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping in interface ContentHandlerSAXExceptionpublic void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement in interface ContentHandlerSAXExceptionpublic void startUnmappedElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
SAXExceptionpublic void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement in interface ContentHandlerSAXExceptionpublic void endUnmappedElement(String namespaceURI, String localName, String qName) throws SAXException
SAXExceptionpublic void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlerSAXExceptionpublic void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerSAXExceptionpublic void processingInstruction(String target, String data) throws SAXException
processingInstruction in interface ContentHandlerSAXExceptionpublic void skippedEntity(String name) throws SAXException
skippedEntity in interface ContentHandlerSAXExceptionpublic String resolveNamespacePrefix(String prefix)
resolveNamespacePrefix in class XMLRecordpublic String toString()
org.eclipse.persistence.internal.sessions.AbstractRecordtoString in class org.eclipse.persistence.internal.sessions.AbstractRecordpublic org.eclipse.persistence.internal.oxm.NodeValue getSelfNodeValueForAttribute(String namespace, String localName)
public org.eclipse.persistence.internal.oxm.NodeValue getAttributeChildNodeValue(String namespace, String localName)
public org.eclipse.persistence.internal.oxm.SAXFragmentBuilder getFragmentBuilder()
public void setFragmentBuilder(org.eclipse.persistence.internal.oxm.SAXFragmentBuilder builder)
public void resetStringBuffer()
public boolean isBufferCDATA()
public void comment(char[] data,
int start,
int length)
comment in interface LexicalHandlerpublic void startCDATA()
startCDATA in interface LexicalHandlerpublic void endCDATA()
endCDATA in interface LexicalHandlerpublic void startEntity(String entity)
startEntity in interface LexicalHandlerpublic void endEntity(String entity)
endEntity in interface LexicalHandlerpublic void startDTD(String a, String b, String c)
startDTD in interface LexicalHandlerpublic void endDTD()
endDTD in interface LexicalHandlerpublic void setSelfRecord(boolean isSelfRecord)
isSelfRecord - true if this record represents
'self', false otherwisepublic boolean isSelfRecord()
public int getLevelIndex()
public void setAttributeValue(Object value, DatabaseMapping mapping)
public void addAttributeValue(org.eclipse.persistence.internal.oxm.ContainerValue containerValue,
Object value)
public void addAttributeValue(org.eclipse.persistence.internal.oxm.ContainerValue containerValue,
Object value,
Object collection)
public void reference(org.eclipse.persistence.internal.oxm.Reference reference)
public void unmappedContent()
public UnmarshalRecord getChildUnmarshalRecord(org.eclipse.persistence.internal.oxm.TreeObjectBuilder treeObjectBuilder)