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
AParserFactoryfor 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 FieldFormatcreateFieldFormat(FieldConfig config, java.lang.Class<?> type)Creates a format specificFieldFormat.protected PreprocessorcreatePreprocessor(StreamConfig config)Creates a stream configuration pre-processor.RecordFormatcreateRecordFormat(RecordConfig config)Creates a format specificRecordFormat.StreamcreateStream(StreamConfig config)Creates a new stream definition based on a stream configuration.StreamFormatcreateStreamFormat(StreamConfig config)Creates a format specificStreamFormat.protected PropertyfinalizeGroupMain(GroupConfig config)protected voidfinalizeRecord(RecordConfig config, Record record)Invoked byParserFactorySupport.finalizeRecord(RecordConfig)to allow subclasses to perform further finalization of the createdRecord.protected PropertyfinalizeRecordMain(RecordConfig config)protected voidfinalizeSegment(SegmentConfig config, Segment segment)Invoked byParserFactorySupport.finalizeSegmentMain(SegmentConfig)to allow subclasses to perform further finalization of the createdSegment.protected PropertyfinalizeSegmentMain(SegmentConfig config)Called byParserFactorySupport.finalizeSegment(SegmentConfig)to finalize the segment component.protected RecordParserFactorygetDefaultRecordParserFactory()Returns the defaultRecordParserFactory.protected voidinitializeGroupMain(GroupConfig config, Property bean)protected voidinitializeRecordMain(RecordConfig config, Property bean)protected voidinitializeSegmentMain(SegmentConfig config, Property property)Called byParserFactorySupport.initializeSegment(SegmentConfig)to initialize the segment.protected booleanisSegmentRequired(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:ParserFactorySupportCreates a stream configuration pre-processor. May be overridden to return a format specific version.- Overrides:
createPreprocessorin 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:ParserFactorySupportCreates a new stream definition based on a stream configuration.- Specified by:
createStreamin interfaceParserFactory- Overrides:
createStreamin 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:
initializeGroupMainin classParserFactorySupport
-
finalizeGroupMain
protected Property finalizeGroupMain(GroupConfig config) throws BeanIOConfigurationException
- Overrides:
finalizeGroupMainin classParserFactorySupport- Throws:
BeanIOConfigurationException
-
initializeRecordMain
protected void initializeRecordMain(RecordConfig config, Property bean)
- Overrides:
initializeRecordMainin classParserFactorySupport
-
finalizeRecordMain
protected Property finalizeRecordMain(RecordConfig config) throws BeanIOConfigurationException
- Overrides:
finalizeRecordMainin classParserFactorySupport- Throws:
BeanIOConfigurationException
-
finalizeRecord
protected void finalizeRecord(RecordConfig config, Record record)
Description copied from class:ParserFactorySupportInvoked byParserFactorySupport.finalizeRecord(RecordConfig)to allow subclasses to perform further finalization of the createdRecord.- Overrides:
finalizeRecordin classParserFactorySupport- Parameters:
config- the record configurationrecord- theRecordbeing finalized
-
isSegmentRequired
protected boolean isSegmentRequired(SegmentConfig config)
- Overrides:
isSegmentRequiredin classParserFactorySupport
-
initializeSegmentMain
protected void initializeSegmentMain(SegmentConfig config, Property property)
Description copied from class:ParserFactorySupportCalled byParserFactorySupport.initializeSegment(SegmentConfig)to initialize the segment.- Overrides:
initializeSegmentMainin 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:ParserFactorySupportCalled byParserFactorySupport.finalizeSegment(SegmentConfig)to finalize the segment component.- Overrides:
finalizeSegmentMainin classParserFactorySupport- Parameters:
config- the segment configuration- Throws:
BeanIOConfigurationException
-
finalizeSegment
protected void finalizeSegment(SegmentConfig config, Segment segment)
Description copied from class:ParserFactorySupportInvoked byParserFactorySupport.finalizeSegmentMain(SegmentConfig)to allow subclasses to perform further finalization of the createdSegment.- Overrides:
finalizeSegmentin classParserFactorySupport- Parameters:
config- the segment configurationsegment- the newSegment
-
createStreamFormat
public StreamFormat createStreamFormat(StreamConfig config)
Description copied from class:ParserFactorySupportCreates a format specificStreamFormat.- Specified by:
createStreamFormatin classParserFactorySupport- Parameters:
config- the stream configuration- Returns:
- the new
StreamFormat
-
createRecordFormat
public RecordFormat createRecordFormat(RecordConfig config)
Description copied from class:ParserFactorySupportCreates a format specificRecordFormat.- Specified by:
createRecordFormatin classParserFactorySupport- Parameters:
config- the record configuration- Returns:
- the new
RecordFormat
-
createFieldFormat
public FieldFormat createFieldFormat(FieldConfig config, java.lang.Class<?> type)
Description copied from class:ParserFactorySupportCreates a format specificFieldFormat.- Specified by:
createFieldFormatin 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:ParserFactorySupportReturns the defaultRecordParserFactory.- Specified by:
getDefaultRecordParserFactoryin classParserFactorySupport- Returns:
- the
RecordParserFactory
-
-