Top Description Fields Constructors Methods
org.eclipse.persistence.oxm.record

public Class DOMRecord

extends XMLRecord
implements TransformationRecord
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.internal.oxm.record.TransformationRecord
Known Direct Subclasses
org.eclipse.persistence.internal.oxm.record.XMLTransformationRecord, org.eclipse.persistence.eis.EISDOMRecord
Imports
java.io.Reader, .StringReader, .StringWriter, .Writer, java.util.Collection, .HashMap, .HashSet, .List, .Map, .Set, .StringTokenizer, .Vector, javax.xml.namespace.QName, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.helper.DatabaseField, .Helper, org.eclipse.persistence.internal.oxm.ReferenceResolver, .UnmarshalXPathEngine, .XMLConversionManager, .XPathEngine, org.eclipse.persistence.oxm.IDResolver, .XMLField, .XMLConstants, .XMLLogin, .NamespaceResolver, org.eclipse.persistence.internal.oxm.mappings.Field, org.eclipse.persistence.internal.oxm.record.TransformationRecord, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, org.eclipse.persistence.oxm.mappings.nullpolicy.AbstractNullPolicy, org.eclipse.persistence.platform.xml.XMLParser, .XMLPlatform, .XMLPlatformFactory, .XMLTransformer, org.eclipse.persistence.exceptions.ValidationException, .XMLMarshalException, org.w3c.dom.Attr, .Document, .DocumentFragment, .Element, .Node, .NodeList

PUBLIC: Provides a Record/Map API on an XML DOM element.

Field Summary

Modifier and TypeField and Description
private Node
private Node
private XMLField
private ReferenceResolver
Inherited from org.eclipse.persistence.oxm.record.XMLRecord:
currentObjectequalNamespaceResolvershasCustomNamespaceMapperNILsessionunmarshaller

Constructor Summary

AccessConstructor and Description
public
DOMRecord()

INTERNAL: Default constructor.

public
DOMRecord(String rootElementName)

INTERNAL: Create a record with the root element name.

public
DOMRecord(String rootElementName, NamespaceResolver namespaceResolver)

INTERNAL: Create a record with the root element name get the namespace URI from the namespaceResolver.

public
DOMRecord(String rootElementName, String rootElementNamespaceURI)

INTERNAL: Create a record with the root element name get the namespace URI from the namespaceResolver.

public
DOMRecord(String localRootElementName, Node parent)

INTERNAL: Create a record with the local root element name, that is a child of the parent.

public
DOMRecord(String localRootElementName, NamespaceResolver namespaceResolver, Node parent)

INTERNAL: Create a record with the local root element name, that is a child of the parent.

public
DOMRecord(Element element)

INTERNAL: Create a record with the element.

public
public
DOMRecord(Document document)

INTERNAL: Create a record with the element.

Method Summary

Modifier and TypeMethod and Description
public void
add(DatabaseField key, Object value)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.add.

INTERNAL: Add the field-value pair to the document.
public XMLRecord
buildNestedRow(Element element)

INTERNAL: Build the nested record, this can be overwriten by subclasses to use their subclass instance.

public void
clear()

Implements abstract org.eclipse.persistence.oxm.record.XMLRecord.clear.

Implements java.util.Map.clear.

PUBLIC: Clear the sub-nodes of the DOM.
public DOMRecord
clone()

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.clone.

INTERNAL: Clone the row and its values.
public boolean
contains(Object value)

Overrides org.eclipse.persistence.oxm.record.XMLRecord.contains.

PUBLIC: Check if the value is contained in the row.
public boolean
containsKey(DatabaseField key)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.containsKey.

INTERNAL: Check if the field is contained in the row.
private Object
convertToNodeValue(Object value)

INTERNAL: Convert the value which may be a direct value, nested record, or set of nested records, to a node value usable with the XPathEngine.

private Object
convertValue(Element node, Field<CONVERSION_MANAGER extends ConversionManager, NAMESPACE_RESOLVER extends NamespaceResolver> key, Object value)

public Node
createNewDocument(String defaultRootElementName)

INTERNAL: Creates a new Document and returns the root element of that document

public Node
createNewDocument(String defaultRootElementName, String namespaceURI)

INTERNAL: Creates a new Document and returns the root element of that document

public Set<E>
public Object
public Document
getDocument()

Implements abstract org.eclipse.persistence.oxm.record.XMLRecord.getDocument.

PUBLIC: Return the document.
public Node
public Vector<E>
getFields()

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.getFields.

INTERNAL: This should not be used, but added some support for it as is called from some places such as sdk call used in the descriptor to define operation not supported, may also be called from toplin in some places.
public Object
getIndicatingNoEntry(DatabaseField key)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.getIndicatingNoEntry.

INTERNAL: Given a DatabaseField return the corresponding value from the document
public Object
getIndicatingNoEntry(DatabaseField key, boolean shouldReturnNode)

public Object
getIndicatingNoEntry(DatabaseField key, boolean shouldReturnNode, boolean checkForXsiNil)

public String
getLocalName()

Implements abstract org.eclipse.persistence.oxm.record.XMLRecord.getLocalName.

PUBLIC: Get the local name of the context root element.
public String
getNamespaceURI()

Implements abstract org.eclipse.persistence.oxm.record.XMLRecord.getNamespaceURI.

PUBLIC: Get the namespace URI for the context root element.
public ReferenceResolver
getReferenceResolver()

INTERNAL: The ReferenceResolver that is leveraged by key based mappings.

private Object
private Object
getValueFromElement(Element node, Node textChild, Field<CONVERSION_MANAGER extends ConversionManager, NAMESPACE_RESOLVER extends NamespaceResolver> key)

public Object
getValues(String key)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.getValues.

INTERNAL: Retrieve the value for the field name.
public Object
getValues(DatabaseField key)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.getValues.

INTERNAL: Given a DatabaseField, return the corresponding values from the document
public Object
public Vector<E>
getValues()

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.getValues.

INTERNAL: This should not be used, but added some support for it as is called from some places such as sdk call used in the descriptor to define operation not supported, may also be called from TopLink in some places.
public Object
public Object
public List<XMLEntry>
public List<XMLEntry>
getValuesIndicatingNoEntry(List<DatabaseField> keys, boolean shouldReturnNodes)

public Object
getValuesIndicatingNoEntry(DatabaseField key, boolean shouldReturnNodes)

INTERNAL: Given a DatabaseField, return the corresponding values from the document

public Object
getValuesIndicatingNoEntry(DatabaseField key, boolean shouldReturnNodes, AbstractNullPolicy nullPolicy)

public Set<E>
keySet()

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.keySet.

Implements java.util.Map.keySet.

PUBLIC: Return the set of element names from the DOM.
public Object
put(DatabaseField
key with which the specified value is to be associated
key
,
Object
value to be associated with the specified key
value
)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.put.

Implements org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord.put, java.util.Map.put.

INTERNAL: Set the field value into the DOM.
public Object
put(List<XMLField>
key with which the specified value is to be associated
xmlFields
,
List<XMLEntry>
value to be associated with the specified key
values
)

Implements java.util.Map.put.

Associates the specified value with the specified key in this map (optional operation).
public Object
put(Object
key with which the specified value is to be associated
key
,
Object
value to be associated with the specified key
value
)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.put.

Implements org.eclipse.persistence.internal.oxm.record.TransformationRecord.put, org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord.put, java.util.Map.put.

PUBLIC: Add the field-value pair to the row.
public Object
remove(DatabaseField key)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.remove.

INTERNAL: Remove the field key from the row.
public void
replaceAt(Object value, int index)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.replaceAt.

INTERNAL: replaces the value at index with value
private String
resolveNamespace(NamespaceResolver namespaceResolver, String localName)

INTERNAL: Return the namespace uri for the prefix of the given local name

public String
public void
resolveReferences(CoreAbstractSession<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, PLATFORM extends CorePlatform<CONVERSION_MANAGER extends CoreConversionManager>, PROJECT extends CoreProject<DESCRIPTOR extends CoreDescriptor<ATTRIBUTE_GROUP extends CoreAttributeGroup, DESCRIPTOR_EVENT_MANAGER extends CoreDescriptorEventManager, FIELD extends CoreField, INHERITANCE_POLICY extends CoreInheritancePolicy, INSTANTIATION_POLICY extends CoreInstantiationPolicy, LIST extends List<E>, OBJECT_BUILDER extends CoreObjectBuilder>, LOGIN extends CoreLogin<PLATFORM extends CorePlatform>, SESSION extends CoreSession>, SESSION_EVENT_MANAGER extends CoreSessionEventManager<SESSION_EVENT_LISTENER extends CoreSessionEventListener>> abstractSession, IDResolver idResolver)

INTERNAL: If the UnmarshalRecord has a ReferenceResolver, tell it to resolve its references.

public void
setDOM(Node element)

INTERNAL: Sets the dom and updated document to be the owner document of the given element

public void
setDOM(Element element)

protected void
setFields(Vector<E> fields)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.setFields.

INTERNAL: Setting fields vector will not update the document so this is not supported
public void
setReferenceResolver(ReferenceResolver referenceResolver)

INTERNAL: Set the ReferenceResolver that will be leveraged by key based mappings.

public void
protected void
setValues(Vector<E> values)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.setValues.

INTERNAL: Setting values vector will not update the document so this is not supported
public int
size()

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.size.

Implements java.util.Map.size.

Return the number of elements in the DOM.
public String
toString()

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.toString.

INTERNAL: Print the dom XML string.
public void
transformFromXML(String xml)

Set the XML from an XML string.

public void
transformFromXML(Reader reader)

Set the XML from an XML reader.

public void
transformToWriter(Writer writer)

Write the XML string representation of the DOM.

public String
transformToXML()

Implements abstract org.eclipse.persistence.oxm.record.XMLRecord.transformToXML.

Return the XML string representation of the DOM.
public Collection<E>
values()

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.values.

Implements java.util.Map.values.

PUBLIC: Return the collection of element values from the DOM.
Inherited from org.eclipse.persistence.oxm.record.XMLRecord:
addExtraNamespacesToNamespaceResolveraddXsiTypeAndClassIndicatorIfRequiredaddXsiTypeAndClassIndicatorIfRequiredattributeattributeWithoutQNameconvertToXMLFieldconvertToXMLFieldgetgetConversionManagergetCurrentObjectgetDocPresPolicygetIndicatingNoEntrygetLeafElementTypegetMarshallergetNamespaceResolvergetNamespaceSeparatorgetOwningObjectgetSessiongetUnmarshallerhasCustomNamespaceMapperhasEqualNamespaceResolversisNamespaceAwareisXOPPackagenamespaceDeclarationputremoveExtraNamespacesFromNamespaceResolversetCurrentObjectsetCustomNamespaceMappersetDocPresPolicysetEqualNamespaceResolverssetLeafElementTypesetLeafElementTypesetMarshallersetNamespaceResolversetOwningObjectsetUnmarshallersetXOPPackagewriteXsiTypeAttributewriteXsiTypeAttribute