BeanIO 1.2.3

org.beanio.config.flat
Class FlatStreamDefinitionFactory

java.lang.Object
  extended by org.beanio.config.StreamDefinitionFactory
      extended by org.beanio.config.flat.FlatStreamDefinitionFactory
Direct Known Subclasses:
DelimitedStreamDefinitionFactory, FixedLengthStreamDefinitionFactory

public abstract class FlatStreamDefinitionFactory
extends StreamDefinitionFactory

Base class for stream definition factories for flat formatted streams (i.e. delimited or fixed length).

Since:
1.0
Author:
Kevin Seim

Constructor Summary
FlatStreamDefinitionFactory()
           
 
Method Summary
protected abstract  void assignDefaultFieldPositions(RecordConfig recordConfig, FlatRecordDefinition recordDefinition)
          Assigns a default position to all record fields.
protected  void compileFieldDefinitions(RecordConfig recordConfig, RecordDefinition recordDefinition)
          Compiles child property definitions for a record.
protected  void validateCollections(BeanDefinition beanDefinition, boolean isCollection)
          Validates there are no field gaps in any descendant of a collection.
protected  boolean validateOccurrences(BeanDefinition beanDefinition)
          Recursively checks bean definitions to validate that any variable occurrence is at the end of the record.
 
Methods inherited from class org.beanio.config.StreamDefinitionFactory
compileBeanDefinition, compileBeanPropertyDefinition, compileFieldDefinition, compileFieldDefinitions, compileGroupDefinition, compileRecordDefinition, compileStreamDefinition, createStreamDefinition, getBeanClass, getDefaultTypeHandlerFactory, isOptionalBeanEnabled, isOptionalFieldEnabled, isReadEnabled, isWriteEnabled, newBeanDefinition, newFieldDefinition, newGroupDefinition, newRecordDefinition, newRecordReaderFactory, newRecordWriterFactory, newStreamDefinition, setTypeHandlerFactory, updateBeanDefinition, updateFieldDefinition, updateGroupDefinition, updateStreamDefinition, validateRecordIdentifyingCriteria
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlatStreamDefinitionFactory

public FlatStreamDefinitionFactory()
Method Detail

compileFieldDefinitions

protected void compileFieldDefinitions(RecordConfig recordConfig,
                                       RecordDefinition recordDefinition)
Description copied from class: StreamDefinitionFactory
Compiles child property definitions for a record. The compiled property definitions are added to the record definition.

Overrides:
compileFieldDefinitions in class StreamDefinitionFactory
Parameters:
recordConfig - the record configuration
recordDefinition - the record definition to update

assignDefaultFieldPositions

protected abstract void assignDefaultFieldPositions(RecordConfig recordConfig,
                                                    FlatRecordDefinition recordDefinition)
Assigns a default position to all record fields.

Parameters:
recordConfig - the record configuration
recordDefinition - the record definition

validateCollections

protected void validateCollections(BeanDefinition beanDefinition,
                                   boolean isCollection)
Validates there are no field gaps in any descendant of a collection.

Parameters:
beanDefinition - the bean definition to validate
isCollection - true if any ancestor of beanDefinition is a collection

validateOccurrences

protected boolean validateOccurrences(BeanDefinition beanDefinition)
Recursively checks bean definitions to validate that any variable occurrence is at the end of the record.

Parameters:
beanDefinition - the bean definition to check recursively
Returns:
true if the bean definition is of variable occurrence

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim