Class NodeValue
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.NodeValue
-
- Direct Known Subclasses:
CollectionGroupingElementNodeValue,FieldTransformerNodeValue,MappingNodeValue,TypeNodeValue,XMLBinaryDataMappingNodeValue,XMLFragmentCollectionMappingNodeValue
public abstract class NodeValue extends java.lang.ObjectINTERNAL:Purpose: A NodeValue is responsible for performing the unmarshal and marshal operation at a mapping or policy level. The operations are based on a SAX ContextHandler.
Responsibilities:
- Maintain a reference to the owning XPathNode.
- Given a XPathFragment recognize the node to which the mapping should be applied.
- Perform the unmarshal and marshal operation for the given mapping or policy.
-
-
Constructor Summary
Constructors Constructor Description NodeValue()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidattribute(UnmarshalRecord unmarshalRecord, java.lang.String URI, java.lang.String localName, java.lang.String value)INTERNAL:UnmarshalRecordbuildSelfRecord(UnmarshalRecord unmarshalRecord, org.xml.sax.Attributes atts)INTERNAL:voidendElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord)INTERNAL:voidendElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, java.lang.Object collection)voidendSelfNodeValue(UnmarshalRecord unmarshalRecord, UnmarshalRecord selfRecord, org.xml.sax.Attributes atts)XPathNodegetXPathNode()booleanisAnyMappingNodeValue()booleanisContainerValue()INTERNAL:booleanisMappingNodeValue()booleanisMarshalNodeValue()booleanisMarshalOnlyNodeValue()INTERNAL: Return whether we ignore this node value when marshalling its parentbooleanisMixedContentNodeValue()INTERNAL: Return true if this is the node value representing mixed content.booleanisNullCapableValue()INTERNAL:booleanisOwningNode(XPathFragment xPathFragment)INTERNAL:booleanisUnmarshalNodeValue()booleanisWhitespaceAware()booleanisWrapperNodeValue()abstract booleanmarshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver)INTERNAL:booleanmarshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, Marshaller marshaller)INTERNAL: This method is no longer required as now MarshalRecord maintains a reference to the XMLMarshaller.booleanmarshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext)INTERNAL: Override this method if the NodeValue is applicable to sequenced objects.booleanmarshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext, XPathFragment rootFragment)INTERNAL:booleanmarshalSelfAttributes(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, Marshaller marshaller)INTERNAL: Marshal any 'self' mapped attributes.abstract booleanmarshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, java.lang.Object objectValue, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext)INTERNAL: This method provides an optimization in cases where the value has already been calculated.booleanmarshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, java.lang.Object objectValue, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext, XPathFragment rootFragment)INTERNAL: This method provides an optimization in cases where the value has already been calculated.voidsetXPathNode(XPathNode xPathNode)booleanstartElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, org.xml.sax.Attributes atts)INTERNAL:
-
-
-
Field Detail
-
xPathNode
protected XPathNode xPathNode
-
-
Method Detail
-
getXPathNode
public XPathNode getXPathNode()
-
setXPathNode
public void setXPathNode(XPathNode xPathNode)
-
isMarshalOnlyNodeValue
public boolean isMarshalOnlyNodeValue()
INTERNAL: Return whether we ignore this node value when marshalling its parent- Returns:
-
isOwningNode
public boolean isOwningNode(XPathFragment xPathFragment)
INTERNAL:- Parameters:
xPathFragment-- Returns:
-
marshal
public abstract boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver)
INTERNAL:- Parameters:
xPathFragment-marshalRecord-object-session-namespaceResolver-- Returns:
-
marshal
public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, Marshaller marshaller)
INTERNAL: This method is no longer required as now MarshalRecord maintains a reference to the XMLMarshaller.- Parameters:
xPathFragment-marshalRecord-object-session-namespaceResolver-marshaller-- Returns:
-
marshal
public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext, XPathFragment rootFragment)
INTERNAL:- Parameters:
xPathFragment-marshalRecord-object-session-namespaceResolver-- Returns:
-
marshalSingleValue
public abstract boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, java.lang.Object objectValue, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext)
INTERNAL: This method provides an optimization in cases where the value has already been calculated.- Parameters:
xPathFragment-marshalRecord-object-objectValue-session-namespaceResolver-marshalContext-- Returns:
-
marshalSingleValue
public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, java.lang.Object objectValue, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext, XPathFragment rootFragment)
INTERNAL: This method provides an optimization in cases where the value has already been calculated.- Parameters:
xPathFragment-marshalRecord-object-objectValue-session-namespaceResolver-marshalContext-- Returns:
-
marshal
public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext)
INTERNAL: Override this method if the NodeValue is applicable to sequenced objects.- Parameters:
xPathFragment-marshalRecord-object-session-namespaceResolver-xPathNodeWalker-- Returns:
-
startElement
public boolean startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, org.xml.sax.Attributes atts)
INTERNAL:- Parameters:
xPathFragment-unmarshalRecord-atts-- Returns:
-
attribute
public void attribute(UnmarshalRecord unmarshalRecord, java.lang.String URI, java.lang.String localName, java.lang.String value)
INTERNAL:- Parameters:
unmarshalRecord-URI-localName-value-
-
endElement
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord)
INTERNAL:- Parameters:
xPathFragment-unmarshalRecord-
-
buildSelfRecord
public UnmarshalRecord buildSelfRecord(UnmarshalRecord unmarshalRecord, org.xml.sax.Attributes atts)
INTERNAL:- Parameters:
unmarshalRecord-atts-- Returns:
-
endSelfNodeValue
public void endSelfNodeValue(UnmarshalRecord unmarshalRecord, UnmarshalRecord selfRecord, org.xml.sax.Attributes atts)
-
isContainerValue
public boolean isContainerValue()
INTERNAL:- Returns:
- Returns true if the NodeValue implements ContainerValue.
- See Also:
ContainerValue
-
isNullCapableValue
public boolean isNullCapableValue()
INTERNAL:- Returns:
- Returns true if the NodeValue implements NullCapableValue.
- See Also:
NullCapableValue
-
endElement
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, java.lang.Object collection)
-
isUnmarshalNodeValue
public boolean isUnmarshalNodeValue()
-
isMarshalNodeValue
public boolean isMarshalNodeValue()
-
marshalSelfAttributes
public boolean marshalSelfAttributes(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver, Marshaller marshaller)
INTERNAL: Marshal any 'self' mapped attributes.- Parameters:
xPathFragment-marshalRecord-object-session-namespaceResolver-marshaller-- Returns:
-
isMappingNodeValue
public boolean isMappingNodeValue()
-
isWhitespaceAware
public boolean isWhitespaceAware()
-
isAnyMappingNodeValue
public boolean isAnyMappingNodeValue()
-
isMixedContentNodeValue
public boolean isMixedContentNodeValue()
INTERNAL: Return true if this is the node value representing mixed content.- Returns:
-
isWrapperNodeValue
public boolean isWrapperNodeValue()
-
-