Class XMLFragmentCollectionMappingNodeValue
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.NodeValue
-
- org.eclipse.persistence.internal.oxm.XMLFragmentCollectionMappingNodeValue
-
- All Implemented Interfaces:
ContainerValue
public class XMLFragmentCollectionMappingNodeValue extends NodeValue implements ContainerValue
INTERNAL:Purpose: This is how the XML Fragment Collection Mapping is handled when used with the TreeObjectBuilder.
- Author:
- mmacivor
-
-
Constructor Summary
Constructors Constructor Description XMLFragmentCollectionMappingNodeValue(FragmentCollectionMapping xmlFragmentCollectionMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord)INTERNAL:java.lang.ObjectgetContainerInstance()CoreContainerPolicygetContainerPolicy()intgetIndex()INTERNAL: Set to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecord Set during TreeObjectBuilder initializationFragmentCollectionMappinggetMapping()booleangetReuseContainer()Return true if the original container on the object should be used if present.booleanisContainerValue()INTERNAL:booleanisDefaultEmptyContainer()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.booleanisWrapperAllowedAsCollectionName()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.booleanmarshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver)Override the method in XPathNode such that the marshaller can be set on the marshalRecord - this is required for XMLConverter usage.booleanmarshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, java.lang.Object value, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext)INTERNAL: This method provides an optimization in cases where the value has already been calculated.voidsetContainerInstance(java.lang.Object object, java.lang.Object containerInstance)voidsetIndex(int index)INTERNAL: Used to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecordbooleanstartElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, org.xml.sax.Attributes atts)INTERNAL:-
Methods inherited from class org.eclipse.persistence.internal.oxm.NodeValue
attribute, buildSelfRecord, endElement, endSelfNodeValue, getXPathNode, isAnyMappingNodeValue, isMappingNodeValue, isMarshalNodeValue, isMarshalOnlyNodeValue, isMixedContentNodeValue, isNullCapableValue, isOwningNode, isUnmarshalNodeValue, isWhitespaceAware, isWrapperNodeValue, marshal, marshal, marshal, marshalSelfAttributes, marshalSingleValue, setXPathNode
-
-
-
-
Constructor Detail
-
XMLFragmentCollectionMappingNodeValue
public XMLFragmentCollectionMappingNodeValue(FragmentCollectionMapping xmlFragmentCollectionMapping)
-
-
Method Detail
-
marshal
public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver)
Override the method in XPathNode such that the marshaller can be set on the marshalRecord - this is required for XMLConverter usage.
-
startElement
public boolean startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, org.xml.sax.Attributes atts)
Description copied from class:NodeValueINTERNAL:- Overrides:
startElementin classNodeValue- Returns:
-
endElement
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord)
Description copied from class:NodeValueINTERNAL:- Overrides:
endElementin classNodeValue
-
getContainerInstance
public java.lang.Object getContainerInstance()
- Specified by:
getContainerInstancein interfaceContainerValue
-
setContainerInstance
public void setContainerInstance(java.lang.Object object, java.lang.Object containerInstance)- Specified by:
setContainerInstancein interfaceContainerValue
-
getContainerPolicy
public CoreContainerPolicy getContainerPolicy()
- Specified by:
getContainerPolicyin interfaceContainerValue
-
isContainerValue
public boolean isContainerValue()
Description copied from class:NodeValueINTERNAL:- Overrides:
isContainerValuein classNodeValue- Returns:
- Returns true if the NodeValue implements ContainerValue.
- See Also:
ContainerValue
-
marshalSingleValue
public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, java.lang.Object value, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext)
Description copied from class:NodeValueINTERNAL: This method provides an optimization in cases where the value has already been calculated.- Specified by:
marshalSingleValuein interfaceContainerValue- Specified by:
marshalSingleValuein classNodeValue
-
getMapping
public FragmentCollectionMapping getMapping()
- Specified by:
getMappingin interfaceContainerValue
-
getReuseContainer
public boolean getReuseContainer()
Description copied from interface:ContainerValueReturn 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:
getReuseContainerin interfaceContainerValue
-
setIndex
public void setIndex(int index)
INTERNAL: Used to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecord- Specified by:
setIndexin 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:
getIndexin 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:
isDefaultEmptyContainerin interfaceContainerValue- Since:
- EclipseLink 2.3.3
-
isWrapperAllowedAsCollectionName
public boolean isWrapperAllowedAsCollectionName()
Description copied from interface:ContainerValueFor 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:
isWrapperAllowedAsCollectionNamein interfaceContainerValue
-
-