|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.internal.sessions.AbstractRecord
org.eclipse.persistence.oxm.record.XMLRecord
org.eclipse.persistence.oxm.record.UnmarshalRecord
public class UnmarshalRecord
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 FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord |
---|
org.eclipse.persistence.internal.sessions.AbstractRecord.EntrySet, org.eclipse.persistence.internal.sessions.AbstractRecord.KeySet, org.eclipse.persistence.internal.sessions.AbstractRecord.NoEntry, org.eclipse.persistence.internal.sessions.AbstractRecord.RecordEntry, org.eclipse.persistence.internal.sessions.AbstractRecord.RecordEntryIterator, org.eclipse.persistence.internal.sessions.AbstractRecord.RecordKeyIterator, org.eclipse.persistence.internal.sessions.AbstractRecord.RecordValuesIterator, org.eclipse.persistence.internal.sessions.AbstractRecord.ValuesSet |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
static UnmappedContentHandler |
DEFAULT_UNMAPPED_CONTENT_HANDLER
|
protected UnmarshalRecord |
parentRecord
|
protected java.lang.String |
rootElementLocalName
|
protected java.lang.String |
rootElementName
|
protected java.lang.String |
rootElementNamespaceUri
|
protected org.eclipse.persistence.internal.oxm.XPathFragment |
textWrapperFragment
|
protected org.eclipse.persistence.internal.oxm.record.XMLReader |
xmlReader
|
Fields inherited from class org.eclipse.persistence.oxm.record.XMLRecord |
---|
currentObject, equalNamespaceResolvers, hasCustomNamespaceMapper, marshaller, namespaceAware, namespaceResolver, NIL, session, unmarshaller |
Fields inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord |
---|
fields, lookupField, noEntry, nullValueInFields, size, values |
Constructor Summary | |
---|---|
UnmarshalRecord(org.eclipse.persistence.internal.oxm.TreeObjectBuilder treeObjectBuilder)
|
Method Summary | |
---|---|
void |
addAttributeValue(org.eclipse.persistence.internal.oxm.ContainerValue containerValue,
java.lang.Object value)
|
void |
addAttributeValue(org.eclipse.persistence.internal.oxm.ContainerValue containerValue,
java.lang.Object value,
java.lang.Object collection)
|
void |
characters(char[] ch,
int start,
int length)
|
void |
characters(java.lang.CharSequence characters)
|
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(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
|
void |
endEntity(java.lang.String entity)
|
void |
endPrefixMapping(java.lang.String prefix)
|
void |
endUnmappedElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
|
java.lang.Object |
get(org.eclipse.persistence.internal.helper.DatabaseField key)
INTERNAL: Retrieve the value for the field. |
org.eclipse.persistence.internal.oxm.NodeValue |
getAttributeChildNodeValue(java.lang.String namespace,
java.lang.String localName)
|
org.xml.sax.Attributes |
getAttributes()
|
java.lang.CharSequence |
getCharacters()
|
UnmarshalRecord |
getChildRecord()
|
UnmarshalRecord |
getChildUnmarshalRecord(org.eclipse.persistence.internal.oxm.TreeObjectBuilder treeObjectBuilder)
|
java.lang.Object |
getContainerInstance(org.eclipse.persistence.internal.oxm.ContainerValue c)
|
java.lang.Object |
getContainerInstance(org.eclipse.persistence.internal.oxm.ContainerValue c,
boolean createContainerIfNecessary)
|
XMLDescriptor |
getDescriptor()
|
org.w3c.dom.Document |
getDocument()
PUBLIC: Return the document. |
org.xml.sax.Locator |
getDocumentLocator()
|
org.w3c.dom.Element |
getDOM()
PUBLIC: Return the DOM. |
java.lang.String |
getEncoding()
PUBLIC: Gets the encoding for this document. |
org.eclipse.persistence.internal.oxm.SAXFragmentBuilder |
getFragmentBuilder()
|
int |
getLevelIndex()
|
java.lang.String |
getLocalName()
PUBLIC: Get the local name of the context root element. |
char |
getNamespaceSeparator()
INTERNAL: The character used to separate the prefix and uri portions when namespaces are present |
java.lang.String |
getNamespaceURI()
PUBLIC: Get the namespace URI for the context root element. |
java.lang.String |
getNoNamespaceSchemaLocation()
|
org.eclipse.persistence.internal.oxm.XPathNode |
getNonAttributeXPathNode(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
INTERNAL: |
java.util.List |
getNullCapableValues()
|
UnmarshalRecord |
getParentRecord()
|
java.util.Map<java.lang.String,java.lang.String> |
getPrefixesForFragment()
INTERNAL Returns a Map of any prefix mappings that were made before the most recent start element event. |
org.eclipse.persistence.internal.oxm.ReferenceResolver |
getReferenceResolver()
INTERNAL: The ReferenceResolver that is leveraged by key based mappings. |
java.lang.String |
getRootElementName()
Return the root element's prefix qualified name |
java.lang.String |
getRootElementNamespaceUri()
Return the root element's namespace URI |
java.lang.String |
getSchemaLocation()
|
org.eclipse.persistence.internal.oxm.NodeValue |
getSelfNodeValueForAttribute(java.lang.String namespace,
java.lang.String localName)
|
protected org.eclipse.persistence.internal.oxm.StrBuffer |
getStringBuffer()
|
org.eclipse.persistence.internal.oxm.XPathFragment |
getTextWrapperFragment()
|
DOMRecord |
getTransformationRecord()
|
javax.xml.namespace.QName |
getTypeQName()
|
org.eclipse.persistence.internal.oxm.record.UnmarshalContext |
getUnmarshalContext()
|
org.eclipse.persistence.internal.oxm.record.namespaces.UnmarshalNamespaceResolver |
getUnmarshalNamespaceResolver()
|
java.lang.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)
|
protected UnmarshalRecord |
initialize(org.eclipse.persistence.internal.oxm.TreeObjectBuilder treeObjectBuilder)
|
void |
initializeRecord(XMLMapping selfRecordMapping)
|
boolean |
isBufferCDATA()
|
boolean |
isNil()
|
boolean |
isSelfRecord()
Indicates if this UnmarshalRecord represents a 'self' record |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
|
void |
reference(org.eclipse.persistence.internal.oxm.Reference reference)
|
void |
removeNullCapableValue(org.eclipse.persistence.internal.oxm.NullCapableValue nullCapableValue)
|
void |
resetStringBuffer()
|
java.lang.String |
resolveNamespacePrefix(java.lang.String prefix)
|
java.lang.String |
resolveNamespaceUri(java.lang.String uri)
|
void |
resolveReferences(org.eclipse.persistence.internal.sessions.AbstractSession abstractSession,
IDResolver idResolver)
INTERNAL: If the UnmarshalRecord has a ReferenceResolver, tell it to resolve its references. |
void |
setAttributes(org.xml.sax.Attributes attributes)
|
void |
setAttributeValue(java.lang.Object value,
DatabaseMapping mapping)
|
void |
setAttributeValueNull(org.eclipse.persistence.internal.oxm.ContainerValue containerValue)
|
void |
setChildRecord(UnmarshalRecord childRecord)
|
void |
setContainerInstance(int index,
java.lang.Object containerInstance)
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
|
void |
setEncoding(java.lang.String enc)
INTERNAL: |
void |
setFragmentBuilder(org.eclipse.persistence.internal.oxm.SAXFragmentBuilder builder)
|
void |
setLocalName(java.lang.String localName)
|
void |
setNil(boolean nil)
|
void |
setNoNamespaceSchemaLocation(java.lang.String location)
|
void |
setParentRecord(UnmarshalRecord parentRecord)
|
void |
setReferenceResolver(org.eclipse.persistence.internal.oxm.ReferenceResolver referenceResolver)
INTERNAL: Set the ReferenceResolver that will be leveraged by key based mappings. |
void |
setRootElementName(java.lang.String qName)
|
void |
setRootElementNamespaceUri(java.lang.String uri)
|
void |
setSchemaLocation(java.lang.String schemaLocation)
|
void |
setSelfRecord(boolean isSelfRecord)
Sets the flag which indicates if this UnmarshalRecord represents a 'self' record |
void |
setTransformationRecord(DOMRecord transformationRecord)
|
void |
setTypeQName(javax.xml.namespace.QName typeQName)
|
void |
setUnmarshalContext(org.eclipse.persistence.internal.oxm.record.UnmarshalContext unmarshalContext)
|
void |
setUnmarshaller(XMLUnmarshaller unmarshaller)
INTERNAL: |
void |
setUnmarshalNamespaceResolver(org.eclipse.persistence.internal.oxm.record.namespaces.UnmarshalNamespaceResolver anUnmarshalNamespaceResolver)
|
void |
setVersion(java.lang.String version)
INTERNAL: |
void |
setXMLReader(org.eclipse.persistence.internal.oxm.record.XMLReader xmlReader)
|
void |
skippedEntity(java.lang.String name)
|
void |
startCDATA()
|
void |
startDocument()
|
void |
startDTD(java.lang.String a,
java.lang.String b,
java.lang.String c)
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
|
void |
startEntity(java.lang.String entity)
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
|
void |
startUnmappedElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
|
java.lang.String |
toString()
|
java.lang.String |
transformToXML()
Return the XML string representation of the DOM. |
void |
unmappedContent()
|
Methods inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord |
---|
add, clone, containsKey, containsKey, containsKey, containsValue, elements, entrySet, get, getField, getFields, getIndicatingNoEntry, getLookupField, getValues, getValues, getValues, hasNullValueInFields, isEmpty, keys, keySet, mergeFrom, put, put, putAll, remove, remove, remove, replaceAt, resetSize, setFields, setNullValueInFields, setValues, size, values |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
public static final UnmappedContentHandler DEFAULT_UNMAPPED_CONTENT_HANDLER
protected org.eclipse.persistence.internal.oxm.record.XMLReader xmlReader
protected UnmarshalRecord parentRecord
protected java.lang.String rootElementLocalName
protected java.lang.String rootElementName
protected java.lang.String rootElementNamespaceUri
protected org.eclipse.persistence.internal.oxm.XPathFragment textWrapperFragment
Constructor Detail |
---|
public UnmarshalRecord(org.eclipse.persistence.internal.oxm.TreeObjectBuilder treeObjectBuilder)
Method Detail |
---|
protected UnmarshalRecord initialize(org.eclipse.persistence.internal.oxm.TreeObjectBuilder treeObjectBuilder)
public java.lang.String getLocalName()
XMLRecord
getLocalName
in class XMLRecord
public void setLocalName(java.lang.String localName)
public java.lang.String getNamespaceURI()
XMLRecord
getNamespaceURI
in class XMLRecord
public void clear()
XMLRecord
clear
in interface java.util.Map
clear
in class XMLRecord
public org.w3c.dom.Document getDocument()
XMLRecord
getDocument
in class XMLRecord
public org.w3c.dom.Element getDOM()
XMLRecord
getDOM
in class XMLRecord
public java.lang.String transformToXML()
XMLRecord
transformToXML
in class XMLRecord
public 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 org.eclipse.persistence.internal.oxm.ReferenceResolver getReferenceResolver()
public void setReferenceResolver(org.eclipse.persistence.internal.oxm.ReferenceResolver referenceResolver)
public java.lang.String getRootElementName()
public void setRootElementName(java.lang.String qName)
public java.lang.String getRootElementNamespaceUri()
public void setRootElementNamespaceUri(java.lang.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 java.util.List getNullCapableValues()
public void removeNullCapableValue(org.eclipse.persistence.internal.oxm.NullCapableValue nullCapableValue)
public java.lang.Object getContainerInstance(org.eclipse.persistence.internal.oxm.ContainerValue c)
public java.lang.Object getContainerInstance(org.eclipse.persistence.internal.oxm.ContainerValue c, boolean createContainerIfNecessary)
public void setContainerInstance(int index, java.lang.Object containerInstance)
public java.lang.String getEncoding()
public void setEncoding(java.lang.String enc)
public java.lang.String getVersion()
public void setVersion(java.lang.String version)
public java.lang.String getSchemaLocation()
public void setSchemaLocation(java.lang.String schemaLocation)
public java.lang.String getNoNamespaceSchemaLocation()
public void setNoNamespaceSchemaLocation(java.lang.String location)
protected org.eclipse.persistence.internal.oxm.StrBuffer getStringBuffer()
public java.lang.CharSequence getCharacters()
public org.xml.sax.Attributes getAttributes()
public void setAttributes(org.xml.sax.Attributes attributes)
public javax.xml.namespace.QName getTypeQName()
public void setTypeQName(javax.xml.namespace.QName typeQName)
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
public org.xml.sax.Locator getDocumentLocator()
public java.lang.Object get(org.eclipse.persistence.internal.helper.DatabaseField key)
XMLRecord
get
in class XMLRecord
public 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)
setNil
in interface org.eclipse.persistence.internal.oxm.record.ExtendedContentHandler
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void initializeRecord(XMLMapping selfRecordMapping) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException
endPrefixMapping
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void startUnmappedElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void endUnmappedElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void characters(java.lang.CharSequence characters) throws org.xml.sax.SAXException
characters
in interface org.eclipse.persistence.internal.oxm.record.ExtendedContentHandler
org.xml.sax.SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException
skippedEntity
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public org.eclipse.persistence.internal.oxm.XPathNode getNonAttributeXPathNode(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
public java.lang.String resolveNamespacePrefix(java.lang.String prefix)
resolveNamespacePrefix
in class XMLRecord
public java.lang.String resolveNamespaceUri(java.lang.String uri)
public java.lang.String toString()
toString
in class org.eclipse.persistence.internal.sessions.AbstractRecord
public org.eclipse.persistence.internal.oxm.NodeValue getSelfNodeValueForAttribute(java.lang.String namespace, java.lang.String localName)
public org.eclipse.persistence.internal.oxm.NodeValue getAttributeChildNodeValue(java.lang.String namespace, java.lang.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 org.xml.sax.ext.LexicalHandler
public void startCDATA()
startCDATA
in interface org.xml.sax.ext.LexicalHandler
public void endCDATA()
endCDATA
in interface org.xml.sax.ext.LexicalHandler
public void startEntity(java.lang.String entity)
startEntity
in interface org.xml.sax.ext.LexicalHandler
public void endEntity(java.lang.String entity)
endEntity
in interface org.xml.sax.ext.LexicalHandler
public void startDTD(java.lang.String a, java.lang.String b, java.lang.String c)
startDTD
in interface org.xml.sax.ext.LexicalHandler
public void endDTD()
endDTD
in interface org.xml.sax.ext.LexicalHandler
public void setSelfRecord(boolean isSelfRecord)
isSelfRecord
- true if this record represents
'self', false otherwisepublic boolean isSelfRecord()
public int getLevelIndex()
public void setAttributeValue(java.lang.Object value, DatabaseMapping mapping)
public void addAttributeValue(org.eclipse.persistence.internal.oxm.ContainerValue containerValue, java.lang.Object value)
public void addAttributeValue(org.eclipse.persistence.internal.oxm.ContainerValue containerValue, java.lang.Object value, java.lang.Object collection)
public void setAttributeValueNull(org.eclipse.persistence.internal.oxm.ContainerValue containerValue)
public void reference(org.eclipse.persistence.internal.oxm.Reference reference)
public void unmappedContent()
public UnmarshalRecord getChildUnmarshalRecord(org.eclipse.persistence.internal.oxm.TreeObjectBuilder treeObjectBuilder)
public void setUnmarshaller(XMLUnmarshaller unmarshaller)
setUnmarshaller
in class XMLRecord
public java.util.Map<java.lang.String,java.lang.String> getPrefixesForFragment()
public char getNamespaceSeparator()
XMLRecord
getNamespaceSeparator
in class XMLRecord
public org.eclipse.persistence.internal.oxm.XPathFragment getTextWrapperFragment()
public void resolveReferences(org.eclipse.persistence.internal.sessions.AbstractSession abstractSession, IDResolver idResolver)
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |