org.beanio.internal.parser
Class RecordMap
java.lang.Object
org.beanio.internal.util.TreeNode<Component>
org.beanio.internal.parser.Component
org.beanio.internal.parser.ParserComponent
org.beanio.internal.parser.DelegatingParser
org.beanio.internal.parser.RecordAggregation
org.beanio.internal.parser.RecordMap
- All Implemented Interfaces:
- Cloneable, Iterable<Component>, Parser, Property, Selector, Replicateable
public class RecordMap
- extends RecordAggregation
- Since:
- 2.0.1.
- Author:
- Kevin Seim
Constructor Summary |
RecordMap()
Constructs a new RecordMap. |
Methods inherited from class org.beanio.internal.parser.RecordAggregation |
clearValue, close, createAggregationType, createValue, getAccessor, getCount, getMaxOccurs, getMinOccurs, getNullValue, getOrder, getProperty, getSelector, getType, getValue, isIdentifier, isMaxOccursReached, isRecordGroup, isSupportedChild, matchAny, matchNext, matchNext, registerLocals, reset, restoreState, setAccessor, setCount, setIdentifier, setType, skip, updateState |
Methods inherited from class org.beanio.internal.util.TreeNode |
add, clone, find, getChildren, getFirst, getName, iterator, print, setName, size, sort, toParamString, toString, updateReferences |
Methods inherited from interface org.beanio.internal.parser.Property |
getName |
RecordMap
public RecordMap()
- Constructs a new RecordMap.
unmarshal
public boolean unmarshal(UnmarshallingContext context)
- Description copied from interface:
Parser
- Unmarshals a record.
- Specified by:
unmarshal
in interface Parser
- Overrides:
unmarshal
in class DelegatingParser
- Parameters:
context
- the UnmarshallingContext
- Returns:
- true if this component was present in the unmarshalled record,
or false otherwise
marshal
public boolean marshal(MarshallingContext context)
throws IOException
- Description copied from interface:
Parser
- Marshals a record.
- Specified by:
marshal
in interface Parser
- Overrides:
marshal
in class DelegatingParser
- Parameters:
context
- the MarshallingContext
- Returns:
- whether a value was marshalled
- Throws:
IOException
- if an I/O error occurs
setValue
public void setValue(ParsingContext context,
Object value)
- Description copied from interface:
Parser
- Sets the property value for marshaling.
- Specified by:
setValue
in interface Parser
- Specified by:
setValue
in interface Property
- Overrides:
setValue
in class RecordAggregation
- Parameters:
context
- the ParsingContext
value
- the property value
hasContent
public boolean hasContent(ParsingContext context)
- Description copied from interface:
Parser
- Returns whether this parser or any of its descendant have content for marshalling.
- Specified by:
hasContent
in interface Parser
- Overrides:
hasContent
in class DelegatingParser
- Parameters:
context
- the ParsingContext
- Returns:
- true if there is content for marshalling, false otherwise
getMap
protected Map<Object,Object> getMap(ParsingContext context)
- Returns the collection value being parsed.
- Parameters:
context
- the ParsingContext
- Returns:
- the
Collection
type
public int type()
- Description copied from interface:
Property
- Returns the property type.
- Returns:
Property.SIMPLE
, Property.COMPLEX
, Property.AGGREGATION_ARRAY
, Property.COLLECTION
,
Property.AGGREGATION_COLLECTION
, or Property.MAP
defines
public boolean defines(Object value)
- Specified by:
defines
in interface Property
- Overrides:
defines
in class RecordAggregation
getKey
public Property getKey()
setKey
public void setKey(Property key)
Copyright © 2010-2013 Kevin Seim