public class XMLFragmentCollectionMappingNodeValue extends NodeValue implements ContainerValue
Purpose: This is how the XML Fragment Collection Mapping is handled when used with the TreeObjectBuilder.
Constructor and Description |
---|
XMLFragmentCollectionMappingNodeValue(FragmentCollectionMapping xmlFragmentCollectionMapping) |
Modifier and Type | Method and Description |
---|---|
void |
endElement(XPathFragment xPathFragment,
UnmarshalRecord unmarshalRecord)
INTERNAL:
|
java.lang.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 initialization
|
FragmentCollectionMapping |
getMapping() |
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 |
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,
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.
|
boolean |
marshalSingleValue(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.
|
void |
setContainerInstance(java.lang.Object object,
java.lang.Object containerInstance) |
void |
setIndex(int index)
INTERNAL:
Used to track the index of the corresponding containerInstance in the containerInstances Object[] on UnmarshalRecord
|
boolean |
startElement(XPathFragment xPathFragment,
UnmarshalRecord unmarshalRecord,
org.xml.sax.Attributes atts)
INTERNAL:
|
attribute, buildSelfRecord, endElement, endSelfNodeValue, getXPathNode, isAnyMappingNodeValue, isMappingNodeValue, isMarshalNodeValue, isMarshalOnlyNodeValue, isMixedContentNodeValue, isNullCapableValue, isOwningNode, isUnmarshalNodeValue, isWhitespaceAware, isWrapperNodeValue, marshal, marshal, marshal, marshalSelfAttributes, marshalSingleValue, setXPathNode
public XMLFragmentCollectionMappingNodeValue(FragmentCollectionMapping xmlFragmentCollectionMapping)
public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver)
public boolean startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, org.xml.sax.Attributes atts)
NodeValue
startElement
in class NodeValue
public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord)
NodeValue
endElement
in class NodeValue
public java.lang.Object getContainerInstance()
getContainerInstance
in interface ContainerValue
public void setContainerInstance(java.lang.Object object, java.lang.Object containerInstance)
setContainerInstance
in interface ContainerValue
public CoreContainerPolicy getContainerPolicy()
getContainerPolicy
in interface ContainerValue
public boolean isContainerValue()
NodeValue
isContainerValue
in class NodeValue
ContainerValue
public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, java.lang.Object value, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext)
NodeValue
marshalSingleValue
in interface ContainerValue
marshalSingleValue
in class NodeValue
public FragmentCollectionMapping getMapping()
getMapping
in interface ContainerValue
public boolean getReuseContainer()
ContainerValue
getReuseContainer
in interface ContainerValue
public void setIndex(int index)
setIndex
in interface ContainerValue
public int getIndex()
getIndex
in interface ContainerValue
public boolean isDefaultEmptyContainer()
isDefaultEmptyContainer
in interface ContainerValue
public boolean isWrapperAllowedAsCollectionName()
ContainerValue
isWrapperAllowedAsCollectionName
in interface ContainerValue
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference