BeanIO 1.2.3

org.beanio.parser.delimited
Class DelimitedFieldDefinition

java.lang.Object
  extended by org.beanio.parser.PropertyDefinition
      extended by org.beanio.parser.FieldDefinition
          extended by org.beanio.parser.flat.FlatFieldDefinition
              extended by org.beanio.parser.delimited.DelimitedFieldDefinition

public class DelimitedFieldDefinition
extends FlatFieldDefinition

A DelimitedFieldDefinition is used to parse and format fields for delimited records.

Since:
1.0
Author:
Kevin Seim

Field Summary
 
Fields inherited from class org.beanio.parser.FieldDefinition
LEFT, RIGHT
 
Fields inherited from class org.beanio.parser.PropertyDefinition
INVALID, MISSING
 
Constructor Summary
DelimitedFieldDefinition()
           
 
Method Summary
 int getLength()
          Returns the maximum length of this property.
 boolean matches(Record record)
          Tests if the field text in the record matches this field definition.
 String parseField(Record record)
          Parses the raw field text from a record prior to any validation and sets the text on the record.
 
Methods inherited from class org.beanio.parser.flat.FlatFieldDefinition
getCurrentPosition
 
Methods inherited from class org.beanio.parser.FieldDefinition
defines, formatPaddedNull, formatText, formatValue, getDefaultTextFor, getDefaultValue, getJustification, getLiteral, getMaxLength, getMinLength, getPaddedLength, getPadding, getPosition, getRegex, getRegexPattern, getTypeHandler, isField, isMatch, isMatch, isNilSupported, isPadded, isProperty, isRequired, isTrim, parsePropertyValue, parsePropertyValue, setDefaultValue, setJustification, setLiteral, setMaxLength, setMinLength, setPadded, setPaddedLength, setPadding, setPosition, setProperty, setPropertyType, setRegex, setRequired, setTrim, setTypeHandler, unpad
 
Methods inherited from class org.beanio.parser.PropertyDefinition
getCollectionType, getMaxOccurs, getMinOccurs, getName, getParent, getPropertyDescriptor, getPropertyType, isArray, isBean, isCollection, isConstant, isLazy, isRecordIdentifier, parseValue, setCollectionType, setLazy, setLength, setMaxOccurs, setMinOccurs, setName, setParent, setPropertyDescriptor, setRecordIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelimitedFieldDefinition

public DelimitedFieldDefinition()
Method Detail

matches

public boolean matches(Record record)
Description copied from class: FieldDefinition
Tests if the field text in the record matches this field definition.

Specified by:
matches in class FieldDefinition
Parameters:
record - the record containing the field to test
Returns:
true if the text is a match

parseField

public String parseField(Record record)
Description copied from class: FieldDefinition
Parses the raw field text from a record prior to any validation and sets the text on the record.

Specified by:
parseField in class FieldDefinition
Parameters:
record - the record to parse
Returns:
the parsed field text, or PropertyDefinition.INVALID if the field is invalid, or null if the field is not present in the record

getLength

public int getLength()
Description copied from class: PropertyDefinition
Returns the maximum length of this property.

Overrides:
getLength in class PropertyDefinition
Returns:
the maximum length of this property
See Also:
PropertyDefinition.setLength(int)

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim