| Constructor and Description |
|---|
Record()
Constructs a new Record.
|
| Modifier and Type | Method and Description |
|---|---|
Selector |
close(ParsingContext context)
Checks for any unsatisfied components before the stream is closed.
|
int |
getCount(ParsingContext context)
Returns the number of times this component was matched within the current
iteration of its parent component.
|
RecordFormat |
getFormat() |
protected String |
getKey(String namespace,
String name)
Returns a Map key for accessing state information for this Node.
|
int |
getMaxOccurs()
Returns the maximum number of occurrences of this component (within the context
of its parent).
|
int |
getMinOccurs()
Returns the minimum number of occurrences of this component (within the context
of its parent).
|
int |
getOrder()
Returns the order of this component (within the context of its parent).
|
boolean |
isMaxOccursReached(ParsingContext context)
Returns whether this component has reached its maximum occurrences.
|
boolean |
isRecordGroup()
Returns whether this component is a record group.
|
boolean |
marshal(MarshallingContext context)
Marshals a record.
|
Selector |
matchAny(UnmarshallingContext context)
Finds a parser that matches the input record.
|
boolean |
matches(UnmarshallingContext context)
Returns whether this parser and its children match a record
being unmarshalled.
|
Selector |
matchNext(MarshallingContext context)
Finds a parser for marshalling a bean object.
|
Selector |
matchNext(UnmarshallingContext context)
Finds a parser for unmarshalling a record based on the current state of the stream.
|
void |
registerLocals(Set<ParserLocal<?>> locals)
Called by a stream to register variables stored in the parsing context.
|
void |
reset(ParsingContext context)
Resets the component count of this Selector's children.
|
void |
restoreState(ParsingContext context,
String namespace,
Map<String,Object> state)
Restores a Map of previously stored state information.
|
void |
setCount(ParsingContext context,
int count)
Sets the number of times this component was matched within the current
iteration of its parent component.
|
void |
setFormat(RecordFormat format) |
void |
setMaxOccurs(int maxOccurs) |
void |
setMinOccurs(int minOccurs) |
void |
setOrder(int order) |
void |
skip(UnmarshallingContext context)
Skips a record or group of records.
|
protected void |
toParamString(StringBuilder s)
Called by
TreeNode.toString() to append node parameters to the output. |
boolean |
unmarshal(UnmarshallingContext context)
Unmarshals a record.
|
void |
updateState(ParsingContext context,
String namespace,
Map<String,Object> state)
Updates a Map with the current state of the Marshaller.
|
clearValue, getProperty, getSize, getValue, hasContent, isExistencePredetermined, isIdentifier, isOptional, isRepeating, setExistencePredetermined, setIdentifier, setOptional, setProperty, setRepeating, setSize, setValueisSupportedChildadd, clone, find, getChildren, getFirst, getName, isDescendant, iterator, print, print, setName, size, sort, toString, updateReferencesequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPropertyclearValue, getName, getSize, getValue, hasContent, isIdentifier, isOptional, setValueforEach, spliteratorpublic boolean marshal(MarshallingContext context) throws IOException
Parsermarshal in interface Parsermarshal in class Segmentcontext - the MarshallingContextIOException - if an I/O error occurspublic boolean unmarshal(UnmarshallingContext context)
Parserunmarshal in interface Parserunmarshal in class Segmentcontext - the UnmarshallingContextpublic void skip(UnmarshallingContext context)
Selectorskip in interface Selectorcontext - the UnmarshallingContextpublic Selector matchNext(MarshallingContext context)
SelectormatchNext in interface Selectorcontext - the MarshallingContextSelector for marshalling the bean objectpublic Selector matchNext(UnmarshallingContext context)
SelectormatchNext in interface Selectorcontext - the UnmarshallingContextSelector for unmarshalling the recordpublic boolean matches(UnmarshallingContext context)
Parsermatches in interface Parsermatches in class Segmentcontext - the UnmarshallingContextpublic Selector matchAny(UnmarshallingContext context)
SelectorSelector.matchNext(UnmarshallingContext) returns null, in order to differentiate
between unexpected and unidentified record types.matchAny in interface Selectorcontext - the UnmarshallingContextSelectorpublic Selector close(ParsingContext context)
Selectorclose in interface Selectorcontext - the ParsingContextpublic void reset(ParsingContext context)
Selectorreset in interface Selectorcontext - the ParsingContextpublic void updateState(ParsingContext context, String namespace, Map<String,Object> state)
updateState in interface Selectornamespace - a String to prefix all state keys withstate - the Map to update with the latest statecontext - the ParsingContextpublic void restoreState(ParsingContext context, String namespace, Map<String,Object> state)
restoreState in interface Selectornamespace - a String to prefix all state keys withstate - the Map containing the state to restorecontext - the ParsingContextprotected String getKey(String namespace, String name)
namespace - the assigned namespace for the keyname - the state information to accesspublic boolean isRecordGroup()
SelectorisRecordGroup in interface Selectorpublic int getMinOccurs()
SelectorgetMinOccurs in interface Selectorpublic void setMinOccurs(int minOccurs)
public int getMaxOccurs()
SelectorgetMaxOccurs in interface Selectorpublic void setMaxOccurs(int maxOccurs)
public int getOrder()
Selectorpublic void setOrder(int order)
public int getCount(ParsingContext context)
SelectorgetCount in interface Selectorcontext - the ParsingContextpublic void setCount(ParsingContext context, int count)
SelectorsetCount in interface Selectorcontext - the ParsingContextcount - the new match countpublic RecordFormat getFormat()
public void setFormat(RecordFormat format)
public void registerLocals(Set<ParserLocal<?>> locals)
ComponentregisterLocals in class Segmentlocals - set of local variablespublic boolean isMaxOccursReached(ParsingContext context)
SelectorisMaxOccursReached in interface Selectorcontext - the ParsingContextprotected void toParamString(StringBuilder s)
TreeNodeTreeNode.toString() to append node parameters to the output.toParamString in class Segments - the output to append