Package org.beanio.internal.compiler.xml
Class XmlParserFactory
- java.lang.Object
-
- org.beanio.internal.compiler.ProcessorSupport
-
- org.beanio.internal.compiler.ParserFactorySupport
-
- org.beanio.internal.compiler.xml.XmlParserFactory
-
- All Implemented Interfaces:
ParserFactory
public class XmlParserFactory extends ParserFactorySupport
AParserFactory
for the XML stream format.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description XmlParserFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldFormat
createFieldFormat(FieldConfig config, java.lang.Class<?> type)
Creates a format specificFieldFormat
.protected Preprocessor
createPreprocessor(StreamConfig config)
Creates a stream configuration pre-processor.RecordFormat
createRecordFormat(RecordConfig config)
Creates a format specificRecordFormat
.Stream
createStream(StreamConfig config)
Creates a new stream definition based on a stream configuration.StreamFormat
createStreamFormat(StreamConfig config)
Creates a format specificStreamFormat
.protected Property
finalizeGroupMain(GroupConfig config)
protected void
finalizeRecord(RecordConfig config, Record record)
Invoked byParserFactorySupport.finalizeRecord(RecordConfig)
to allow subclasses to perform further finalization of the createdRecord
.protected Property
finalizeRecordMain(RecordConfig config)
protected void
finalizeSegment(SegmentConfig config, Segment segment)
Invoked byParserFactorySupport.finalizeSegmentMain(SegmentConfig)
to allow subclasses to perform further finalization of the createdSegment
.protected Property
finalizeSegmentMain(SegmentConfig config)
Called byParserFactorySupport.finalizeSegment(SegmentConfig)
to finalize the segment component.protected RecordParserFactory
getDefaultRecordParserFactory()
Returns the defaultRecordParserFactory
.protected void
initializeGroupMain(GroupConfig config, Property bean)
protected void
initializeRecordMain(RecordConfig config, Property bean)
protected void
initializeSegmentMain(SegmentConfig config, Property property)
Called byParserFactorySupport.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, reflectAggregationType, reflectCollectionType, reflectPropertyType, reflectRecordAggregationType, setClassLoader, setTypeHandlerFactory, updateConstructor
-
Methods inherited from class org.beanio.internal.compiler.ProcessorSupport
getParent, handleComponent, process
-
-
-
-
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 classParserFactorySupport
- 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 interfaceParserFactory
- Overrides:
createStream
in classParserFactorySupport
- 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 classParserFactorySupport
-
finalizeGroupMain
protected Property finalizeGroupMain(GroupConfig config) throws BeanIOConfigurationException
- Overrides:
finalizeGroupMain
in classParserFactorySupport
- Throws:
BeanIOConfigurationException
-
initializeRecordMain
protected void initializeRecordMain(RecordConfig config, Property bean)
- Overrides:
initializeRecordMain
in classParserFactorySupport
-
finalizeRecordMain
protected Property finalizeRecordMain(RecordConfig config) throws BeanIOConfigurationException
- Overrides:
finalizeRecordMain
in classParserFactorySupport
- Throws:
BeanIOConfigurationException
-
finalizeRecord
protected void finalizeRecord(RecordConfig config, Record record)
Description copied from class:ParserFactorySupport
Invoked byParserFactorySupport.finalizeRecord(RecordConfig)
to allow subclasses to perform further finalization of the createdRecord
.- Overrides:
finalizeRecord
in classParserFactorySupport
- Parameters:
config
- the record configurationrecord
- theRecord
being finalized
-
isSegmentRequired
protected boolean isSegmentRequired(SegmentConfig config)
- Overrides:
isSegmentRequired
in classParserFactorySupport
-
initializeSegmentMain
protected void initializeSegmentMain(SegmentConfig config, Property property)
Description copied from class:ParserFactorySupport
Called byParserFactorySupport.initializeSegment(SegmentConfig)
to initialize the segment.- Overrides:
initializeSegmentMain
in classParserFactorySupport
- Parameters:
config
- the segment configurationproperty
- the property bound to the segment, or null if no property was bound
-
finalizeSegmentMain
protected Property finalizeSegmentMain(SegmentConfig config) throws BeanIOConfigurationException
Description copied from class:ParserFactorySupport
Called byParserFactorySupport.finalizeSegment(SegmentConfig)
to finalize the segment component.- Overrides:
finalizeSegmentMain
in classParserFactorySupport
- Parameters:
config
- the segment configuration- Throws:
BeanIOConfigurationException
-
finalizeSegment
protected void finalizeSegment(SegmentConfig config, Segment segment)
Description copied from class:ParserFactorySupport
Invoked byParserFactorySupport.finalizeSegmentMain(SegmentConfig)
to allow subclasses to perform further finalization of the createdSegment
.- Overrides:
finalizeSegment
in classParserFactorySupport
- Parameters:
config
- the segment configurationsegment
- the newSegment
-
createStreamFormat
public StreamFormat createStreamFormat(StreamConfig config)
Description copied from class:ParserFactorySupport
Creates a format specificStreamFormat
.- Specified by:
createStreamFormat
in classParserFactorySupport
- Parameters:
config
- the stream configuration- Returns:
- the new
StreamFormat
-
createRecordFormat
public RecordFormat createRecordFormat(RecordConfig config)
Description copied from class:ParserFactorySupport
Creates a format specificRecordFormat
.- Specified by:
createRecordFormat
in classParserFactorySupport
- Parameters:
config
- the record configuration- Returns:
- the new
RecordFormat
-
createFieldFormat
public FieldFormat createFieldFormat(FieldConfig config, java.lang.Class<?> type)
Description copied from class:ParserFactorySupport
Creates a format specificFieldFormat
.- Specified by:
createFieldFormat
in classParserFactorySupport
- Parameters:
config
- the field configurationtype
- 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 defaultRecordParserFactory
.- Specified by:
getDefaultRecordParserFactory
in classParserFactorySupport
- Returns:
- the
RecordParserFactory
-
-