BeanIO 1.2.3

org.beanio.parser.xml
Class XmlStreamDefinition

java.lang.Object
  extended by org.beanio.parser.StreamDefinition
      extended by org.beanio.parser.xml.XmlStreamDefinition
All Implemented Interfaces:
MessageFactory

public class XmlStreamDefinition
extends StreamDefinition

Stream definition used to parse and format XML formatted streams.

Since:
1.1
Author:
Kevin Seim

Field Summary
 
Fields inherited from class org.beanio.parser.StreamDefinition
READ_ONLY_MODE, READ_WRITE_MODE, WRITE_ONLY_MODE
 
Constructor Summary
XmlStreamDefinition()
          Constructs a new XmlStreamDefinition.
 
Method Summary
 BeanWriter createBeanWriter(Writer out)
          Creates a new BeanWriter for writing to the given output stream.
protected  RecordReader createDefaultReader(Reader in)
          Creates a default RecordReader to read from the given input stream.
protected  RecordWriter createDefaultWriter(Writer out)
          Creates a default RecordWriter for writing to the given output stream.
protected  Record createRecord()
          Constructs a new Record for this stream to operate on.
protected  GroupDefinition newGroupDefinition()
          This method is called to instantiate a new group definition so that subclasses may override the implementation.
protected  GroupNode newGroupNode(GroupDefinition definition)
          Constructs a new group node for parsing an input stream.
 void setReaderFactory(RecordReaderFactory readerFactory)
          Sets the record reader factory to use to create new RecordReader's.
 
Methods inherited from class org.beanio.parser.StreamDefinition
createBeanReader, createRecord, createRecordReader, createRecordWriter, getFieldErrorMessage, getFieldLabel, getFormat, getLabel, getMode, getName, getRecordErrorMessage, getRecordLabel, getRootGroupDefinition, newRecordNode, setDefaultResourceBundle, setMaxOccurs, setMinOccurs, setMode, setName, setResourceBundle, setWriterFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlStreamDefinition

public XmlStreamDefinition()
Constructs a new XmlStreamDefinition.

Method Detail

newGroupDefinition

protected GroupDefinition newGroupDefinition()
Description copied from class: StreamDefinition
This method is called to instantiate a new group definition so that subclasses may override the implementation.

Overrides:
newGroupDefinition in class StreamDefinition
Returns:
the new GroupDefinition

newGroupNode

protected GroupNode newGroupNode(GroupDefinition definition)
Description copied from class: StreamDefinition
Constructs a new group node for parsing an input stream.

Overrides:
newGroupNode in class StreamDefinition
Parameters:
definition - the group definition
Returns:
the new group node

createRecord

protected Record createRecord()
Description copied from class: StreamDefinition
Constructs a new Record for this stream to operate on.

Overrides:
createRecord in class StreamDefinition
Returns:
new Record

setReaderFactory

public void setReaderFactory(RecordReaderFactory readerFactory)
Description copied from class: StreamDefinition
Sets the record reader factory to use to create new RecordReader's. If set to null, this stream context will create a default reader.

Overrides:
setReaderFactory in class StreamDefinition
Parameters:
readerFactory - the new record reader factory

createDefaultReader

protected RecordReader createDefaultReader(Reader in)
Description copied from class: StreamDefinition
Creates a default RecordReader to read from the given input stream. This method is called by StreamDefinition.createRecordReader(Reader) if no record reader factory was configured.

Specified by:
createDefaultReader in class StreamDefinition
Parameters:
in - the input stream to read from
Returns:
a new RecordReader

createDefaultWriter

protected RecordWriter createDefaultWriter(Writer out)
Description copied from class: StreamDefinition
Creates a default RecordWriter for writing to the given output stream. This method is called by StreamDefinition.createRecordWriter(Writer) if no record writer factory was configured.

Specified by:
createDefaultWriter in class StreamDefinition
Parameters:
out - the output stream to write to
Returns:
a new RecordWriter

createBeanWriter

public BeanWriter createBeanWriter(Writer out)
Creates a new BeanWriter for writing to the given output stream.

Overrides:
createBeanWriter in class StreamDefinition
Parameters:
out - the output stream to write to
Returns:
a new BeanWriter

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim