co.uk.hjcs.canyon.parsing
Interface FlatFileProcessor

All Known Implementing Classes:
DelimitedFieldFlatFileProcessor, FixedLengthFieldFlatFileProcessor

public interface FlatFileProcessor

The interface that Canyon processors must implement

Author:
HJC Solutions Ltd (http://canyon.hjcsolutions.co.uk)

Field Summary
static java.lang.String CLASS_ELEMENT_NAME
           
static java.lang.String CLASS_ID_ELEMENT_NAME
           
static java.lang.String CLASS_NAME_ATTRIBUTE
           
static java.lang.String CLASS_TYPE_ATTRIBUTE_NAME
           
static java.lang.String FIELD_ELEMENT_NAME
           
static java.lang.String FIELD_NAME_ATTRIBUTE_NAME
           
 
Method Summary
 java.lang.String createLine(FlatFileLine ffl)
          convert the FlatFileLine details into the construct that the flat file is exepcting.
 FlatFileLine createLine(java.lang.String lineData)
          Create a FlatFileLine object from a string of data
 FieldDefinition getField(java.lang.String fieldName)
          Retrieves the defintion of a field by name
 java.util.Set<FieldDefinition> getFields()
          Retrieves a Set of all the registered field definitions
 

Field Detail

CLASS_ELEMENT_NAME

static final java.lang.String CLASS_ELEMENT_NAME
See Also:
Constant Field Values

FIELD_ELEMENT_NAME

static final java.lang.String FIELD_ELEMENT_NAME
See Also:
Constant Field Values

FIELD_NAME_ATTRIBUTE_NAME

static final java.lang.String FIELD_NAME_ATTRIBUTE_NAME
See Also:
Constant Field Values

CLASS_NAME_ATTRIBUTE

static final java.lang.String CLASS_NAME_ATTRIBUTE
See Also:
Constant Field Values

CLASS_ID_ELEMENT_NAME

static final java.lang.String CLASS_ID_ELEMENT_NAME
See Also:
Constant Field Values

CLASS_TYPE_ATTRIBUTE_NAME

static final java.lang.String CLASS_TYPE_ATTRIBUTE_NAME
See Also:
Constant Field Values
Method Detail

createLine

java.lang.String createLine(FlatFileLine ffl)
convert the FlatFileLine details into the construct that the flat file is exepcting. E.g creates the flat file line

Parameters:
ffl - - the FlatFileLine to be turned into a String
Returns:
- the output string representation of this flat file line

getField

FieldDefinition getField(java.lang.String fieldName)
Retrieves the defintion of a field by name

Parameters:
fieldName - - the name of the field
Returns:
- the field definition of the named field

getFields

java.util.Set<FieldDefinition> getFields()
Retrieves a Set of all the registered field definitions

Returns:
- all the field definitions for the flat file line

createLine

FlatFileLine createLine(java.lang.String lineData)
Create a FlatFileLine object from a string of data

Parameters:
lineData - - the data to be used to create the FlatFileLine object
Returns:
- the line resultset row for the lineData