Copyright (C) 2003,2004 dr. Cristiano Sadun

Package org.sadun.text.ffp

The main FFP package.


Interface Summary
FFPFactory.FFPStreamParser This interface allows users to define their own syntax for conditionsand line formatspecifications.
FlatFileParser.AdvancedListener Classes implementing this extension of Listener will receive more events on flat file parsing.
FlatFileParser.Condition An object implementing this interface can decide whether or not the physical line currently available for reading match or not a certain condition, in the FlatFileParser.Condition#holds(int, int, LineReader) method.
FlatFileParser.LineReader Objects implementing this interface allow to access the flat file during parsing, from outside the parser.
FlatFileParser.Listener Classes implementing this interface can be registered in a FlatFileParser (using FlatFileParser#addListener(Listener)) to react to successfully parsed lines in the flat file.
FlatFileParser.UnmatchedLineListener Classes implementing this extension of Listener will receive notification about lines where no condition matches on parsing, if the failOnNoMatchingConditions property is false.

Class Summary
AndCondition A FlatFileParser.Condition that holds if and only if all the conditions it groups hold.
BaseListener A base implementation of FlatFileParser.Listener which activates only when on a specific line format name (or a specific regular expression match) is successfully parsed.
ConstantFoundInLineCondition A condition that looks for a matching constant into a specific physical line.
ConstantLineCondition A condition which holds only if the next line on the file is identical to the a given constant.
CountCondition A condition which compares the numer of physical/logical lines read so far with a given number (pivot number), checking for a specific simple numeric relationship.
DispatcherListener A dispatcher that allows to have different listeners receiving parsing events from a FlatFileParser depending on the line format which matched the line, instead of one monolithic one receiving all parsing events.
EchoListener A FlatFileParser.Listener which echoes the parsed data when a LineFormat whose is found whose name matches a regular expression (provided at construction).
FFPFactory This class creates FlatFileParserobjects by loading conditions and line format definitions from properly formatted stream, URL or file.
FlatFileParser A parser for flat files.
LineFormat An ojbect of this class holds details of a specific logical line format and can parse it from core memory.
MatchingRegexpInLineCondition A condition that checks a regular expression in a physical line.
NotCondition A FlatFileParser.Condition that holds if and only if the condition passed at construction does not hold.
NullCondition A condition that never holds.
OrCondition A FlatFileParser.Condition that holds if and only if one the conditions it groups hold.
Type This class declares the field types recognized by LineFormat and exposes them via public constant members.

Exception Summary
AbortFFPException An exception of this class can be raised by an FlatFileParser.AdvancedListener to signal problems at parsing start, termination or when using a DispatcherListener.
FFPParseException The main parsing-related exception.
FormatOutOfRangeException An exception raised when parsing a LineFormat and an expected field cannot be found since the line is too short.
NoAssociatedListenerException An exception raised when a DispatcherListeneris used to dispatch parsing events from a flat file parser, its {@link
TrailingCharactersException An exception raised when a line is parsed correctly by a LineFormat but not all its characters are consumed when the parsing is terminated.
ValidationException An exception raised if a field value does not match its declared type.

Package org.sadun.text.ffp Description

The main FFP package. The classes FlatFileParser and LineFormat are the main classes in the package.

Copyright (C) 2003,2004 dr. Cristiano Sadun