BeanIO 2.0.4

org.beanio.internal.parser.format.xml
Class XmlStreamFormat

java.lang.Object
  extended by org.beanio.internal.parser.StreamFormatSupport
      extended by org.beanio.internal.parser.format.xml.XmlStreamFormat
All Implemented Interfaces:
StreamFormat

public class XmlStreamFormat
extends StreamFormatSupport

A StreamFormatSupport implementation for the XML stream format.

This implementation requires a reference to the stream layout (i.e. the root Selector in the parser tree). The layout is not modified in any way allowing this class to be thread safe.

Since:
2.0
Author:
Kevin Seim

Constructor Summary
XmlStreamFormat()
          Constructs a new XmlStreamFormat.
 
Method Summary
protected  Document createBaseDocument(Selector layout)
          Creates a DOM made up of any group nodes in the parser tree.
 MarshallingContext createMarshallingContext(boolean streaming)
          Creates a new marshalling context.
 UnmarshallingContext createUnmarshallingContext()
          Creates a new ummarshalling context.
 void setGroupDepth(int groupDepth)
           
 void setLayout(Selector layout)
          Sets the stream layout.
 void setRecordParserFactory(RecordParserFactory recordParserFactory)
          Sets the RecordParserFactory for creating record parsers.
 
Methods inherited from class org.beanio.internal.parser.StreamFormatSupport
createRecordMarshaller, createRecordReader, createRecordUnmarshaller, createRecordWriter, getName, getRecordParserFactory, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlStreamFormat

public XmlStreamFormat()
Constructs a new XmlStreamFormat.

Method Detail

createUnmarshallingContext

public UnmarshallingContext createUnmarshallingContext()
Description copied from interface: StreamFormat
Creates a new ummarshalling context.

Returns:
the new UnmarshallingContext

createMarshallingContext

public MarshallingContext createMarshallingContext(boolean streaming)
Description copied from interface: StreamFormat
Creates a new marshalling context.

Parameters:
streaming - true if marshalling to a stream
Returns:
the new MarshallingContext

setRecordParserFactory

public void setRecordParserFactory(RecordParserFactory recordParserFactory)
Description copied from class: StreamFormatSupport
Sets the RecordParserFactory for creating record parsers.

Overrides:
setRecordParserFactory in class StreamFormatSupport
Parameters:
recordParserFactory - the RecordParserFactory

setLayout

public void setLayout(Selector layout)
Sets the stream layout.

Parameters:
layout - the root Selector node in the parser tree

createBaseDocument

protected Document createBaseDocument(Selector layout)
Creates a DOM made up of any group nodes in the parser tree.

Returns:
the new Document made up of group nodes

setGroupDepth

public void setGroupDepth(int groupDepth)
Parameters:
groupDepth -

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim