|
BeanIO 1.2.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.beanio.parser.xml.Marshaller org.beanio.parser.xml.GroupMarshaller
public class GroupMarshaller
A Marshaller implementation for marshaling group XML nodes.
Field Summary |
---|
Fields inherited from class org.beanio.parser.xml.Marshaller |
---|
count |
Constructor Summary | |
---|---|
GroupMarshaller(Marshaller parent,
XmlGroupDefinition group)
Constructs a new GroupMarshaller |
Method Summary | |
---|---|
Node |
createHierarchy(Document document)
Recursively creates the XML hierarchy of group nodes. |
void |
reset()
Resets the occurrences of this node and/or its children. |
void |
restoreState(String namespace,
Map<String,Object> state)
Restores a Map of previously stored state information. |
void |
updateState(String namespace,
Map<String,Object> state)
Updates a Map with the current state of the Marshaller. |
boolean |
write(RecordWriter out,
String recordName,
Object bean)
Marshals this node to a RecordWriter. |
Methods inherited from class org.beanio.parser.xml.Marshaller |
---|
addChild, getCount, getFirstChild, getKey, getNextSibling, getNodeDefinition, getParent, isMaxOccursReached, removeAllChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GroupMarshaller(Marshaller parent, XmlGroupDefinition group)
parent
- the parent Marshallergroup
- the group node definitionMethod Detail |
---|
public void reset()
Marshaller
reset
in class Marshaller
public Node createHierarchy(Document document)
Marshaller
createHierarchy
in class Marshaller
document
- the document object model to append
public boolean write(RecordWriter out, String recordName, Object bean) throws IOException
Marshaller
write
in class Marshaller
out
- the RecordWriter to write torecordName
- the name of the record to marshal (may be null if unknown)bean
- the record bean to marshal
IOException
- if an I/O error is thrown by the RecordWriterpublic void updateState(String namespace, Map<String,Object> state)
Marshaller
updateState
in class Marshaller
namespace
- a String to prefix all state keys withstate
- the Map to update with the latest statepublic void restoreState(String namespace, Map<String,Object> state)
Marshaller
restoreState
in class Marshaller
namespace
- a String to prefix all state keys withstate
- the Map containing the state to restore
|
BeanIO 1.2.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |