public abstract class Aggregation extends DelegatingParser implements Property, Iteration
Type | Property and Description |
---|---|
abstract boolean |
is
Gets the value of the property property.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
lazy |
protected Field |
occurs |
AGGREGATION_ARRAY, AGGREGATION_COLLECTION, AGGREGATION_MAP, COLLECTION, COMPLEX, MAP, SIMPLE
Constructor and Description |
---|
Aggregation()
Constructs a new Aggregation.
|
Modifier and Type | Method and Description |
---|---|
PropertyAccessor |
getAccessor() |
int |
getIterationIndex(ParsingContext context)
Returns the index of the current iteration relative to its parent.
|
int |
getMaxOccurs() |
int |
getMinOccurs() |
Field |
getOccurs() |
boolean |
isDynamicIteration()
Returns whether the iteration size is variable based on another field
in the record.
|
boolean |
isIdentifier()
Returns whether this parser or any descendant of this parser is used to identify
a record during unmarshalling.
|
boolean |
isLazy() |
boolean |
isOptional()
Returns whether this node must exist during unmarshalling.
|
abstract boolean |
isProperty()
Gets the value of the property property.
|
protected abstract int |
length(Object value)
Returns the length of aggregation.
|
boolean |
marshal(MarshallingContext context)
Marshals a record.
|
protected abstract boolean |
marshal(MarshallingContext context,
Parser delegate,
int minOccurs,
int maxOccurs) |
void |
registerLocals(Set<ParserLocal<? extends Object>> locals)
Called by a stream to register variables stored in the parsing context.
|
void |
setAccessor(PropertyAccessor accessor) |
void |
setIdentifier(boolean identifier) |
protected void |
setIterationIndex(ParsingContext context,
int index) |
void |
setLazy(boolean lazy) |
void |
setMaxOccurs(int maxOccurs) |
void |
setMinOccurs(int minOccurs) |
void |
setOccurs(Field occurs) |
void |
setValue(ParsingContext context,
Object value)
Sets the property value for marshaling.
|
protected void |
toParamString(StringBuilder s)
Called by
TreeNode.toString() to append node parameters to the output. |
boolean |
unmarshal(UnmarshallingContext context)
Unmarshals a record.
|
protected abstract boolean |
unmarshal(UnmarshallingContext context,
Parser delegate,
int minOccurs,
int maxOccurs) |
clearValue, getParser, getSize, getValue, hasContent, matches
isSupportedChild
add, clone, find, getChildren, getFirst, getName, isDescendant, iterator, print, print, setName, size, sort, toString, updateReferences
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clearValue, createValue, defines, getName, getType, getValue, setType, type
getIterationSize
forEach, spliterator
protected boolean lazy
protected Field occurs
public abstract boolean isProperty()
protected abstract int length(Object value)
value
- the aggregation valuepublic final boolean marshal(MarshallingContext context) throws IOException
Parser
marshal
in interface Parser
marshal
in class DelegatingParser
context
- the MarshallingContext
IOException
- if an I/O error occursprotected abstract boolean marshal(MarshallingContext context, Parser delegate, int minOccurs, int maxOccurs) throws IOException
IOException
public final boolean unmarshal(UnmarshallingContext context)
Parser
unmarshal
in interface Parser
unmarshal
in class DelegatingParser
context
- the UnmarshallingContext
protected abstract boolean unmarshal(UnmarshallingContext context, Parser delegate, int minOccurs, int maxOccurs)
public void setValue(ParsingContext context, Object value)
Parser
setValue
in interface Parser
setValue
in interface Property
setValue
in class DelegatingParser
context
- the ParsingContext
value
- the property valuepublic boolean isOptional()
Parser
isOptional
in interface Parser
isOptional
in class DelegatingParser
public boolean isIdentifier()
Parser
isIdentifier
in interface Parser
isIdentifier
in interface Property
isIdentifier
in class DelegatingParser
public void setIdentifier(boolean identifier)
setIdentifier
in interface Property
UnsupportedOperationException
public PropertyAccessor getAccessor()
getAccessor
in interface Property
public void setAccessor(PropertyAccessor accessor)
setAccessor
in interface Property
public final int getIterationIndex(ParsingContext context)
Iteration
getIterationIndex
in interface Iteration
protected final void setIterationIndex(ParsingContext context, int index)
public int getMinOccurs()
public void setMinOccurs(int minOccurs)
public int getMaxOccurs()
public void setMaxOccurs(int maxOccurs)
public Field getOccurs()
public void setOccurs(Field occurs)
public boolean isLazy()
public void setLazy(boolean lazy)
public boolean isDynamicIteration()
Iteration
isDynamicIteration
in interface Iteration
public void registerLocals(Set<ParserLocal<? extends Object>> locals)
Component
registerLocals
in class Component
locals
- set of local variablesprotected void toParamString(StringBuilder s)
TreeNode
TreeNode.toString()
to append node parameters to the output.toParamString
in class TreeNode<Component>
s
- the output to append