- java.lang.Object
-
- org.eclipse.persistence.internal.core.sessions.CoreAbstractRecord
-
- org.eclipse.persistence.internal.sessions.AbstractRecord
-
- org.eclipse.persistence.oxm.record.XMLRecord
-
- All Implemented Interfaces:
Serializable,Cloneable,Map,AbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>,AbstractUnmarshalRecord<AbstractSession,DatabaseField,XMLUnmarshaller>,XMLRecord<AbstractSession>,DataRecord
- Direct Known Subclasses:
DOMRecord,UnmarshalRecord
public abstract class XMLRecord extends AbstractRecord implements AbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>, AbstractUnmarshalRecord<AbstractSession,DatabaseField,XMLUnmarshaller>
PUBLIC: Provides a Record/Map API on an XML DOM element.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
AbstractRecord.EntrySet, AbstractRecord.KeySet, AbstractRecord.NoEntry, AbstractRecord.RecordEntry, AbstractRecord.RecordEntryIterator, AbstractRecord.RecordKeyIterator, AbstractRecord.RecordValuesIterator, AbstractRecord.ValuesSet
-
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K extends Object,V extends Object>
-
Nested classes/interfaces inherited from interface org.eclipse.persistence.internal.oxm.record.XMLRecord
XMLRecord.Nil
-
-
Field Summary
Fields Modifier and Type Field Description protected ObjectcurrentObjectprotected booleanequalNamespaceResolversprotected booleanhasCustomNamespaceMapperstatic XMLRecord.NilNILINTERNAL: Nil: This is used to indicate that this field represents xsi:nil="true"protected AbstractSessionsessionprotected XMLUnmarshallerunmarshaller-
Fields inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
fields, lookupField, noEntry, nullValueInFields, size, sopObject, values
-
Fields inherited from interface org.eclipse.persistence.internal.oxm.record.XMLRecord
DEFAULT_ATTRIBUTE_GROUP
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedXMLRecord()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description List<Namespace>addExtraNamespacesToNamespaceResolver(Descriptor descriptor, CoreAbstractSession session, boolean allowOverride, boolean ignoreEqualResolvers)INTERNALbooleanaddXsiTypeAndClassIndicatorIfRequired(Descriptor descriptor, Descriptor referenceDescriptor, Field xmlField, boolean isRootElement)INTERNALbooleanaddXsiTypeAndClassIndicatorIfRequired(Descriptor descriptor, Descriptor referenceDescriptor, Field xmlField, Object originalObject, Object obj, boolean wasXMLRoot, boolean isRootElement)INTERNALvoidattribute(String namespaceURI, String localName, String qName, String value)Marshal an attribute for the give namespaceURI, localName, qualifiedName and valuevoidattributeWithoutQName(String namespaceURI, String localName, String prefix, String value)Marshal an attribute for the give namespaceURI, localName, preifx and valueabstract voidclear()PUBLIC: Clear the sub-nodes of the DOM.booleancontains(Object value)PUBLIC: Check if the value is contained in the row.protected List<XMLField>convertToXMLField(List<DatabaseField> databaseFields)protected XMLFieldconvertToXMLField(DatabaseField databaseField)INTERNAL: Convert a DatabaseField to an XMLFieldObjectget(String key)PUBLIC: Add the field-value pair to the row.Objectget(DatabaseField key)INTERNAL: Retrieve the value for the field.ConversionManagergetConversionManager()INTERNALObjectgetCurrentObject()INTERNAL:DocumentPreservationPolicygetDocPresPolicy()abstract DocumentgetDocument()PUBLIC: Return the document.abstract NodegetDOM()PUBLIC: Return the DOM.ObjectgetIndicatingNoEntry(String fieldName)INTERNAL: Retrieve the value for the field name.XPathQNamegetLeafElementType()INTERNAL:abstract StringgetLocalName()PUBLIC: Get the local name of the context root element.XMLMarshallergetMarshaller()INTERNAL:NamespaceResolvergetNamespaceResolver()chargetNamespaceSeparator()INTERNAL: The character used to separate the prefix and uri portions when namespaces are presentabstract StringgetNamespaceURI()PUBLIC: Get the namespace URI for the context root element.ObjectgetOwningObject()INTERNAL:AbstractSessiongetSession()XMLUnmarshallergetUnmarshaller()INTERNAL:booleanhasCustomNamespaceMapper()booleanhasEqualNamespaceResolvers()booleanisNamespaceAware()INTERNAL: Determine if namespaces will be considered during marshal/unmarshal operations.booleanisXOPPackage()voidnamespaceDeclaration(String prefix, String namespaceURI)Marshal a namespace declaration for the given prefix and urlObjectput(String key, Object value)PUBLIC: Add the field-value pair to the row.voidremoveExtraNamespacesFromNamespaceResolver(List<Namespace> extraNamespaces, CoreAbstractSession session)INTERNALStringresolveNamespacePrefix(String prefix)voidsetCurrentObject(Object obj)INTERNAL:voidsetCustomNamespaceMapper(boolean customNamespaceMapper)voidsetDocPresPolicy(DocumentPreservationPolicy policy)voidsetEqualNamespaceResolvers(boolean equalNRs)voidsetLeafElementType(QName leafElementType)INTERNAL:voidsetLeafElementType(XPathQName leafElementType)INTERNAL:voidsetMarshaller(XMLMarshaller marshaller)INTERNAL:voidsetNamespaceResolver(NamespaceResolver nr)voidsetOwningObject(Object owningObject)INTERNAL:voidsetSession(AbstractSession session)voidsetUnmarshaller(XMLUnmarshaller unmarshaller)INTERNAL:voidsetXOPPackage(boolean isXOPPackage)abstract StringtransformToXML()Return the XML string representation of the DOM.voidwriteXsiTypeAttribute(Descriptor descriptor, String typeUri, String typeLocal, String typePrefix, boolean addToNamespaceResolver)INTERNALvoidwriteXsiTypeAttribute(Descriptor xmlDescriptor, XMLSchemaReference xmlRef, boolean addToNamespaceResolver)INTERNAL-
Methods inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
add, clone, containsKey, containsKey, containsKey, containsValue, elements, entrySet, get, getField, getFields, getIndicatingNoEntry, getLookupField, getSopObject, getValues, getValues, getValues, hasNullValueInFields, hasSopObject, isEmpty, keys, keySet, mergeFrom, put, put, putAll, remove, remove, remove, replaceAt, replaceAt, resetSize, setFields, setNullValueInFields, setSopObject, setValues, size, toString, values
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord
put
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Field Detail
-
unmarshaller
protected XMLUnmarshaller unmarshaller
-
currentObject
protected Object currentObject
-
session
protected AbstractSession session
-
hasCustomNamespaceMapper
protected boolean hasCustomNamespaceMapper
-
equalNamespaceResolvers
protected boolean equalNamespaceResolvers
-
NIL
public static final XMLRecord.Nil NIL
INTERNAL: Nil: This is used to indicate that this field represents xsi:nil="true"
-
-
Method Detail
-
get
public Object get(String key)
PUBLIC: Add the field-value pair to the row.- Overrides:
getin classAbstractRecord
-
put
public Object put(String key, Object value)
PUBLIC: Add the field-value pair to the row.- Overrides:
putin classAbstractRecord
-
attributeWithoutQName
public void attributeWithoutQName(String namespaceURI, String localName, String prefix, String value)
Marshal an attribute for the give namespaceURI, localName, preifx and value- Specified by:
attributeWithoutQNamein interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
attribute
public void attribute(String namespaceURI, String localName, String qName, String value)
Marshal an attribute for the give namespaceURI, localName, qualifiedName and value- Specified by:
attributein interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
namespaceDeclaration
public void namespaceDeclaration(String prefix, String namespaceURI)
Marshal a namespace declaration for the given prefix and url- Specified by:
namespaceDeclarationin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
getLocalName
public abstract String getLocalName()
PUBLIC: Get the local name of the context root element.
-
getNamespaceURI
public abstract String getNamespaceURI()
PUBLIC: Get the namespace URI for the context root element.
-
clear
public abstract void clear()
PUBLIC: Clear the sub-nodes of the DOM.- Specified by:
clearin interfaceMap- Overrides:
clearin classAbstractRecord
-
getDocument
public abstract Document getDocument()
PUBLIC: Return the document.
-
contains
public boolean contains(Object value)
PUBLIC: Check if the value is contained in the row.- Overrides:
containsin classAbstractRecord
-
getDOM
public abstract Node getDOM()
PUBLIC: Return the DOM.- Specified by:
getDOMin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
transformToXML
public abstract String transformToXML()
Return the XML string representation of the DOM.
-
convertToXMLField
protected XMLField convertToXMLField(DatabaseField databaseField)
INTERNAL: Convert a DatabaseField to an XMLField
-
convertToXMLField
protected List<XMLField> convertToXMLField(List<DatabaseField> databaseFields)
-
get
public Object get(DatabaseField key)
INTERNAL: Retrieve the value for the field. If missing null is returned.- Specified by:
getin interfaceAbstractUnmarshalRecord<AbstractSession,DatabaseField,XMLUnmarshaller>- Overrides:
getin classAbstractRecord
-
getIndicatingNoEntry
public Object getIndicatingNoEntry(String fieldName)
INTERNAL: Retrieve the value for the field name.- Overrides:
getIndicatingNoEntryin classAbstractRecord
-
resolveNamespacePrefix
public String resolveNamespacePrefix(String prefix)
- Specified by:
resolveNamespacePrefixin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>- Specified by:
resolveNamespacePrefixin interfaceAbstractUnmarshalRecord<AbstractSession,DatabaseField,XMLUnmarshaller>
-
getMarshaller
public XMLMarshaller getMarshaller()
INTERNAL:- Specified by:
getMarshallerin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
setMarshaller
public void setMarshaller(XMLMarshaller marshaller)
INTERNAL:- Specified by:
setMarshallerin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
getUnmarshaller
public XMLUnmarshaller getUnmarshaller()
INTERNAL:- Specified by:
getUnmarshallerin interfaceAbstractUnmarshalRecord<AbstractSession,DatabaseField,XMLUnmarshaller>
-
setUnmarshaller
public void setUnmarshaller(XMLUnmarshaller unmarshaller)
INTERNAL:
-
setDocPresPolicy
public void setDocPresPolicy(DocumentPreservationPolicy policy)
-
getDocPresPolicy
public DocumentPreservationPolicy getDocPresPolicy()
-
getOwningObject
public Object getOwningObject()
INTERNAL:- Specified by:
getOwningObjectin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
setOwningObject
public void setOwningObject(Object owningObject)
INTERNAL:- Specified by:
setOwningObjectin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
getCurrentObject
public Object getCurrentObject()
INTERNAL:
-
setCurrentObject
public void setCurrentObject(Object obj)
INTERNAL:
-
getLeafElementType
public XPathQName getLeafElementType()
INTERNAL:- Specified by:
getLeafElementTypein interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
setLeafElementType
public void setLeafElementType(XPathQName leafElementType)
INTERNAL:- Specified by:
setLeafElementTypein interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
setLeafElementType
public void setLeafElementType(QName leafElementType)
INTERNAL:- Specified by:
setLeafElementTypein interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
setNamespaceResolver
public void setNamespaceResolver(NamespaceResolver nr)
- Specified by:
setNamespaceResolverin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
getNamespaceResolver
public NamespaceResolver getNamespaceResolver()
- Specified by:
getNamespaceResolverin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
getSession
public AbstractSession getSession()
- Specified by:
getSessionin interfaceXMLRecord<AbstractSession>
-
setSession
public void setSession(AbstractSession session)
- Specified by:
setSessionin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
setEqualNamespaceResolvers
public void setEqualNamespaceResolvers(boolean equalNRs)
- Specified by:
setEqualNamespaceResolversin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
hasEqualNamespaceResolvers
public boolean hasEqualNamespaceResolvers()
- Specified by:
hasEqualNamespaceResolversin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
isXOPPackage
public boolean isXOPPackage()
- Specified by:
isXOPPackagein interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
setXOPPackage
public void setXOPPackage(boolean isXOPPackage)
- Specified by:
setXOPPackagein interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
isNamespaceAware
public boolean isNamespaceAware()
INTERNAL: Determine if namespaces will be considered during marshal/unmarshal operations.- Specified by:
isNamespaceAwarein interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>- Specified by:
isNamespaceAwarein interfaceXMLRecord<AbstractSession>- Since:
- 2.4
-
getNamespaceSeparator
public char getNamespaceSeparator()
INTERNAL: The character used to separate the prefix and uri portions when namespaces are present- Specified by:
getNamespaceSeparatorin interfaceXMLRecord<AbstractSession>- Since:
- 2.4
-
hasCustomNamespaceMapper
public boolean hasCustomNamespaceMapper()
- Specified by:
hasCustomNamespaceMapperin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
setCustomNamespaceMapper
public void setCustomNamespaceMapper(boolean customNamespaceMapper)
- Specified by:
setCustomNamespaceMapperin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>
-
addExtraNamespacesToNamespaceResolver
public List<Namespace> addExtraNamespacesToNamespaceResolver(Descriptor descriptor, CoreAbstractSession session, boolean allowOverride, boolean ignoreEqualResolvers)
INTERNAL- Specified by:
addExtraNamespacesToNamespaceResolverin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>- Since:
- EclipseLink 2.5.0
-
addXsiTypeAndClassIndicatorIfRequired
public boolean addXsiTypeAndClassIndicatorIfRequired(Descriptor descriptor, Descriptor referenceDescriptor, Field xmlField, boolean isRootElement)
INTERNAL- Specified by:
addXsiTypeAndClassIndicatorIfRequiredin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>- Since:
- EclipseLink 2.5.0
-
addXsiTypeAndClassIndicatorIfRequired
public boolean addXsiTypeAndClassIndicatorIfRequired(Descriptor descriptor, Descriptor referenceDescriptor, Field xmlField, Object originalObject, Object obj, boolean wasXMLRoot, boolean isRootElement)
INTERNAL- Specified by:
addXsiTypeAndClassIndicatorIfRequiredin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>- Since:
- EclipseLink 2.5.0
-
removeExtraNamespacesFromNamespaceResolver
public void removeExtraNamespacesFromNamespaceResolver(List<Namespace> extraNamespaces, CoreAbstractSession session)
INTERNAL- Specified by:
removeExtraNamespacesFromNamespaceResolverin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>- Since:
- EclipseLink 2.5.0
-
writeXsiTypeAttribute
public void writeXsiTypeAttribute(Descriptor descriptor, String typeUri, String typeLocal, String typePrefix, boolean addToNamespaceResolver)
INTERNAL- Specified by:
writeXsiTypeAttributein interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>- Since:
- EclipseLink 2.5.0
-
writeXsiTypeAttribute
public void writeXsiTypeAttribute(Descriptor xmlDescriptor, XMLSchemaReference xmlRef, boolean addToNamespaceResolver)
INTERNAL- Specified by:
writeXsiTypeAttributein interfaceAbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>- Since:
- EclipseLink 2.5.0
-
getConversionManager
public ConversionManager getConversionManager()
INTERNAL- Specified by:
getConversionManagerin interfaceXMLRecord<AbstractSession>- Since:
- EclipseLink 2.6.0
-
-