BeanIO 1.2.3

org.beanio.parser.xml
Class RecordMarshaller

java.lang.Object
  extended by org.beanio.parser.xml.Marshaller
      extended by org.beanio.parser.xml.RecordMarshaller

public class RecordMarshaller
extends Marshaller

A Marshaller implementation for marshaling record XML nodes.

Since:
1.1
Author:
Kevin Seim

Field Summary
 
Fields inherited from class org.beanio.parser.xml.Marshaller
count
 
Constructor Summary
RecordMarshaller(Marshaller parent, XmlRecordDefinition definition)
          Constructs a new RecordMarshaller.
 
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.
 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, restoreState, updateState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordMarshaller

public RecordMarshaller(Marshaller parent,
                        XmlRecordDefinition definition)
Constructs a new RecordMarshaller.

Parameters:
parent -
definition -
Method Detail

reset

public void reset()
Description copied from class: Marshaller
Resets the occurrences of this node and/or its children.

Specified by:
reset in class Marshaller

createHierarchy

public Node createHierarchy(Document document)
Description copied from class: Marshaller
Recursively creates the XML hierarchy of group nodes.

Specified by:
createHierarchy in class Marshaller
Parameters:
document - the document object model to append
Returns:
the parent document node

write

public boolean write(RecordWriter out,
                     String recordName,
                     Object bean)
              throws IOException
Description copied from class: Marshaller
Marshals this node to a RecordWriter.

Specified by:
write in class Marshaller
Parameters:
out - the RecordWriter to write to
recordName - the name of the record to marshal (may be null if unknown)
bean - the record bean to marshal
Returns:
true if the bean was marshal by this node or one of its children, false otherwise
Throws:
IOException - if an I/O error is thrown by the RecordWriter

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim