Class XMLChoiceCollectionMappingUnmarshalNodeValue
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.NodeValue
-
- org.eclipse.persistence.internal.oxm.MappingNodeValue
-
- org.eclipse.persistence.internal.oxm.XMLChoiceCollectionMappingUnmarshalNodeValue
-
- All Implemented Interfaces:
ContainerValue
public class XMLChoiceCollectionMappingUnmarshalNodeValue extends MappingNodeValue implements ContainerValue
INTERNAL:Purpose: This is how the XML Choice Collection Mapping is handled when used with the TreeObjectBuilder.
- Author:
- mmacivor
-
-
Constructor Summary
Constructors Constructor Description XMLChoiceCollectionMappingUnmarshalNodeValue(ChoiceCollectionMapping mapping, Field xmlField)
XMLChoiceCollectionMappingUnmarshalNodeValue(ChoiceCollectionMapping mapping, Field xmlField, Mapping nestedMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attribute(UnmarshalRecord unmarshalRecord, String URI, String localName, String value)
The underlying choice element node value will handle attributes.void
endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord)
INTERNAL:Collection<NodeValue>
getAllNodeValues()
NodeValue
getChoiceElementMarshalNodeValue()
NodeValue
getChoiceElementNodeValue()
Object
getContainerInstance()
CoreContainerPolicy
getContainerPolicy()
int
getIndex()
INTERNAL: Set to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecord Set during TreeObjectBuilder initializationChoiceCollectionMapping
getMapping()
Return the mapping associated with this node value.boolean
getReuseContainer()
Return true if the original container on the object should be used if present.boolean
isContainerValue()
INTERNAL:boolean
isDefaultEmptyContainer()
INTERNAL Return true if an empty container should be set on the object if there is no presence of the collection in the XML document.boolean
isMarshalNodeValue()
boolean
isMixedContentNodeValue()
INTERNAL: Return true if this is the node value representing mixed content.boolean
isOwningNode(XPathFragment xPathFragment)
INTERNAL:boolean
isUnmarshalNodeValue()
boolean
isWrapperAllowedAsCollectionName()
For media types that provide a native representation of collections (such as JSON arrays), can the representation be simplified so that the grouping element can be used as the collection name.boolean
marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver)
INTERNAL:boolean
marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object value, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext)
INTERNAL: This method provides an optimization in cases where the value has already been calculated.void
setContainerInstance(Object object, Object containerInstance)
void
setContainerNodeValue(XMLChoiceCollectionMappingUnmarshalNodeValue nodeValue)
void
setFieldToNodeValues(Map<Field,NodeValue> fieldToNodeValues)
void
setIndex(int index)
INTERNAL: Used to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecordvoid
setIsMixedNodeValue(boolean isMixed)
INTERNAL: Indicates that this is the choice mapping node value that represents the mixed content.void
setNullValue(Object object, CoreSession session)
void
setXPathNode(XPathNode xPathNode)
boolean
startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts)
INTERNAL:-
Methods inherited from class org.eclipse.persistence.internal.oxm.MappingNodeValue
addTypeAttribute, isMappingNodeValue, updateNamespaces
-
Methods inherited from class org.eclipse.persistence.internal.oxm.NodeValue
buildSelfRecord, endElement, endSelfNodeValue, getXPathNode, isAnyMappingNodeValue, isMarshalOnlyNodeValue, isNullCapableValue, isWhitespaceAware, isWrapperNodeValue, marshal, marshal, marshal, marshalSelfAttributes, marshalSingleValue
-
-
-
-
Constructor Detail
-
XMLChoiceCollectionMappingUnmarshalNodeValue
public XMLChoiceCollectionMappingUnmarshalNodeValue(ChoiceCollectionMapping mapping, Field xmlField)
-
XMLChoiceCollectionMappingUnmarshalNodeValue
public XMLChoiceCollectionMappingUnmarshalNodeValue(ChoiceCollectionMapping mapping, Field xmlField, Mapping nestedMapping)
-
-
Method Detail
-
isOwningNode
public boolean isOwningNode(XPathFragment xPathFragment)
Description copied from class:NodeValue
INTERNAL:- Overrides:
isOwningNode
in classNodeValue
- Returns:
-
setContainerNodeValue
public void setContainerNodeValue(XMLChoiceCollectionMappingUnmarshalNodeValue nodeValue)
-
setNullValue
public void setNullValue(Object object, CoreSession session)
-
endElement
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord)
Description copied from class:NodeValue
INTERNAL:- Overrides:
endElement
in classNodeValue
-
startElement
public boolean startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts)
Description copied from class:NodeValue
INTERNAL:- Overrides:
startElement
in classNodeValue
- Returns:
-
setXPathNode
public void setXPathNode(XPathNode xPathNode)
- Overrides:
setXPathNode
in classNodeValue
-
getContainerInstance
public Object getContainerInstance()
- Specified by:
getContainerInstance
in interfaceContainerValue
-
setContainerInstance
public void setContainerInstance(Object object, Object containerInstance)
- Specified by:
setContainerInstance
in interfaceContainerValue
-
getContainerPolicy
public CoreContainerPolicy getContainerPolicy()
- Specified by:
getContainerPolicy
in interfaceContainerValue
-
isContainerValue
public boolean isContainerValue()
Description copied from class:NodeValue
INTERNAL:- Overrides:
isContainerValue
in classNodeValue
- Returns:
- Returns true if the NodeValue implements ContainerValue.
- See Also:
ContainerValue
-
marshalSingleValue
public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object value, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext)
Description copied from class:NodeValue
INTERNAL: This method provides an optimization in cases where the value has already been calculated.- Specified by:
marshalSingleValue
in interfaceContainerValue
- Specified by:
marshalSingleValue
in classNodeValue
-
marshal
public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver)
Description copied from class:NodeValue
INTERNAL:
-
getChoiceElementNodeValue
public NodeValue getChoiceElementNodeValue()
-
getChoiceElementMarshalNodeValue
public NodeValue getChoiceElementMarshalNodeValue()
-
isUnmarshalNodeValue
public boolean isUnmarshalNodeValue()
- Overrides:
isUnmarshalNodeValue
in classNodeValue
-
isWrapperAllowedAsCollectionName
public boolean isWrapperAllowedAsCollectionName()
Description copied from interface:ContainerValue
For media types that provide a native representation of collections (such as JSON arrays), can the representation be simplified so that the grouping element can be used as the collection name.- Specified by:
isWrapperAllowedAsCollectionName
in interfaceContainerValue
-
isMarshalNodeValue
public boolean isMarshalNodeValue()
- Overrides:
isMarshalNodeValue
in classNodeValue
-
getMapping
public ChoiceCollectionMapping getMapping()
Description copied from class:MappingNodeValue
Return the mapping associated with this node value.- Specified by:
getMapping
in interfaceContainerValue
- Specified by:
getMapping
in classMappingNodeValue
-
getReuseContainer
public boolean getReuseContainer()
Description copied from interface:ContainerValue
Return true if the original container on the object should be used if present. If it is not present then the container policy will be used to create the container.- Specified by:
getReuseContainer
in interfaceContainerValue
-
getAllNodeValues
public Collection<NodeValue> getAllNodeValues()
-
attribute
public void attribute(UnmarshalRecord unmarshalRecord, String URI, String localName, String value)
The underlying choice element node value will handle attributes.
-
setIsMixedNodeValue
public void setIsMixedNodeValue(boolean isMixed)
INTERNAL: Indicates that this is the choice mapping node value that represents the mixed content.
-
isMixedContentNodeValue
public boolean isMixedContentNodeValue()
INTERNAL: Return true if this is the node value representing mixed content.- Overrides:
isMixedContentNodeValue
in classNodeValue
- Returns:
-
setIndex
public void setIndex(int index)
INTERNAL: Used to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecord- Specified by:
setIndex
in interfaceContainerValue
-
getIndex
public int getIndex()
INTERNAL: Set to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecord Set during TreeObjectBuilder initialization- Specified by:
getIndex
in interfaceContainerValue
-
isDefaultEmptyContainer
public boolean isDefaultEmptyContainer()
INTERNAL Return true if an empty container should be set on the object if there is no presence of the collection in the XML document.- Specified by:
isDefaultEmptyContainer
in interfaceContainerValue
- Since:
- EclipseLink 2.3.3
-
-