BeanIO 2.0.4

org.beanio.internal.compiler.xml
Class XmlParserFactory

java.lang.Object
  extended by org.beanio.internal.compiler.ProcessorSupport
      extended by org.beanio.internal.compiler.ParserFactorySupport
          extended by org.beanio.internal.compiler.xml.XmlParserFactory
All Implemented Interfaces:
ParserFactory

public class XmlParserFactory
extends ParserFactorySupport

A ParserFactory for the XML stream format.

Since:
2.0
Author:
Kevin Seim

Constructor Summary
XmlParserFactory()
          Constructs a new XmlParserFactory.
 
Method Summary
 FieldFormat createFieldFormat(FieldConfig config, Class<?> type)
          Creates a format specific FieldFormat.
protected  Preprocessor createPreprocessor(StreamConfig config)
          Creates a stream configuration pre-processor.
 RecordFormat createRecordFormat(RecordConfig config)
          Creates a format specific RecordFormat.
 Stream createStream(StreamConfig config)
          Creates a new stream definition based on a stream configuration.
 StreamFormat createStreamFormat(StreamConfig config)
          Creates a format specific StreamFormat.
protected  void finalizeGroupMain(GroupConfig config)
           
protected  void finalizeRecord(RecordConfig config, Record record)
          Invoked by ParserFactorySupport.finalizeRecord(RecordConfig) to allow subclasses to perform further finalization of the created Record.
protected  void finalizeRecordMain(RecordConfig config)
           
protected  void finalizeSegment(SegmentConfig config, Segment segment)
          Invoked by ParserFactorySupport.finalizeSegmentMain(SegmentConfig) to allow subclasses to perform further finalization of the created Segment.
protected  void finalizeSegmentMain(SegmentConfig config)
          Called by ParserFactorySupport.finalizeSegment(SegmentConfig) to finalize the segment component.
protected  RecordParserFactory getDefaultRecordParserFactory()
          Returns the default RecordParserFactory.
protected  void initializeGroupMain(GroupConfig config, Property bean)
           
protected  void initializeRecordMain(RecordConfig config, Property bean)
           
protected  void initializeSegmentMain(SegmentConfig config, Property property)
          Called by ParserFactorySupport.initializeSegment(SegmentConfig) to initialize the segment.
protected  boolean isSegmentRequired(SegmentConfig config)
           
 
Methods inherited from class org.beanio.internal.compiler.ParserFactorySupport
createAggregation, createProperty, createRecordAggregation, createRecordParserFactory, finalizeGroup, finalizeGroup, finalizeGroupIteration, finalizeRecord, finalizeRecordIteration, finalizeSegment, finalizeSegmentIteration, finalizeStream, getBeanClass, getField, handleConstant, handleField, initializeGroup, initializeGroupIteration, initializeRecord, initializeRecordIteration, initializeSegment, initializeSegmentIteration, initializeStream, isBound, isReadEnabled, isWriteEnabled, parseDefaultValue, popParser, popProperty, pushParser, pushProperty, reflectCollectionType, reflectPropertyType, setClassLoader, setTypeHandlerFactory, updateConstructor
 
Methods inherited from class org.beanio.internal.compiler.ProcessorSupport
getParent, handleComponent, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlParserFactory

public XmlParserFactory()
Constructs a new XmlParserFactory.

Method Detail

createPreprocessor

protected Preprocessor createPreprocessor(StreamConfig config)
Description copied from class: ParserFactorySupport
Creates a stream configuration pre-processor. May be overridden to return a format specific version.

Overrides:
createPreprocessor in class ParserFactorySupport
Parameters:
config - the stream configuration to pre-process
Returns:
the new Preprocessor

createStream

public Stream createStream(StreamConfig config)
                    throws BeanIOConfigurationException
Description copied from class: ParserFactorySupport
Creates a new stream definition based on a stream configuration.

Specified by:
createStream in interface ParserFactory
Overrides:
createStream in class ParserFactorySupport
Parameters:
config - the stream configuration
Returns:
the new Stream
Throws:
BeanIOConfigurationException - if the configuration is invalid

initializeGroupMain

protected void initializeGroupMain(GroupConfig config,
                                   Property bean)
Overrides:
initializeGroupMain in class ParserFactorySupport

finalizeGroupMain

protected void finalizeGroupMain(GroupConfig config)
                          throws BeanIOConfigurationException
Overrides:
finalizeGroupMain in class ParserFactorySupport
Throws:
BeanIOConfigurationException

initializeRecordMain

protected void initializeRecordMain(RecordConfig config,
                                    Property bean)
Overrides:
initializeRecordMain in class ParserFactorySupport

finalizeRecordMain

protected void finalizeRecordMain(RecordConfig config)
                           throws BeanIOConfigurationException
Overrides:
finalizeRecordMain in class ParserFactorySupport
Throws:
BeanIOConfigurationException

finalizeRecord

protected void finalizeRecord(RecordConfig config,
                              Record record)
Description copied from class: ParserFactorySupport
Invoked by ParserFactorySupport.finalizeRecord(RecordConfig) to allow subclasses to perform further finalization of the created Record.

Overrides:
finalizeRecord in class ParserFactorySupport
Parameters:
config - the record configuration
record - the Record being finalized

isSegmentRequired

protected boolean isSegmentRequired(SegmentConfig config)
Overrides:
isSegmentRequired in class ParserFactorySupport

initializeSegmentMain

protected void initializeSegmentMain(SegmentConfig config,
                                     Property property)
Description copied from class: ParserFactorySupport
Called by ParserFactorySupport.initializeSegment(SegmentConfig) to initialize the segment.

Overrides:
initializeSegmentMain in class ParserFactorySupport
Parameters:
config - the segment configuration
property - the property bound to the segment, or null if no property was bound

finalizeSegmentMain

protected void finalizeSegmentMain(SegmentConfig config)
                            throws BeanIOConfigurationException
Description copied from class: ParserFactorySupport
Called by ParserFactorySupport.finalizeSegment(SegmentConfig) to finalize the segment component.

Overrides:
finalizeSegmentMain in class ParserFactorySupport
Parameters:
config - the segment configuration
Throws:
BeanIOConfigurationException

finalizeSegment

protected void finalizeSegment(SegmentConfig config,
                               Segment segment)
Description copied from class: ParserFactorySupport
Invoked by ParserFactorySupport.finalizeSegmentMain(SegmentConfig) to allow subclasses to perform further finalization of the created Segment.

Overrides:
finalizeSegment in class ParserFactorySupport
Parameters:
config - the segment configuration
segment - the new Segment

createStreamFormat

public StreamFormat createStreamFormat(StreamConfig config)
Description copied from class: ParserFactorySupport
Creates a format specific StreamFormat.

Specified by:
createStreamFormat in class ParserFactorySupport
Parameters:
config - the stream configuration
Returns:
the new StreamFormat

createRecordFormat

public RecordFormat createRecordFormat(RecordConfig config)
Description copied from class: ParserFactorySupport
Creates a format specific RecordFormat.

Specified by:
createRecordFormat in class ParserFactorySupport
Parameters:
config - the record configuration
Returns:
the new RecordFormat

createFieldFormat

public FieldFormat createFieldFormat(FieldConfig config,
                                     Class<?> type)
Description copied from class: ParserFactorySupport
Creates a format specific FieldFormat.

Specified by:
createFieldFormat in class ParserFactorySupport
Parameters:
config - the field configuration
type - the property type, or null if not bound to a property
Returns:
the new FieldFormat

getDefaultRecordParserFactory

protected RecordParserFactory getDefaultRecordParserFactory()
Description copied from class: ParserFactorySupport
Returns the default RecordParserFactory.

Specified by:
getDefaultRecordParserFactory in class ParserFactorySupport
Returns:
the RecordParserFactory

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim