Oracle Warehouse Builder Java API Reference
10g Release 1 (10.1)

B12155-01

oracle.owb.flatfile
Interface FlatFile

All Superinterfaces:
Component, Extensible, OWBNamedObject, PropertyOwner, ReconcileSource, ReconcileTarget, Snapshotable, ValidatableObject

public interface FlatFile
extends Component, ReconcileSource, ReconcileTarget, Extensible, ValidatableObject

The FlatFile interface exposes the metadata for a logical flat file. It may be used either as a source or target in mapping, or as the basis of an ExternalTable.

Since:
9.0.4
Version:
9.0.4
Author:
Luda Mogilevich (lyudmila.mogilevich@oracle.com)

Field Summary

 

Fields inherited from interface oracle.owb.metadatamgmt.changemgmt.Snapshotable
MAX_DEPENDENCY_DEPTH, MIN_DEPENDENCY_DEPTH

 

Method Summary
 Record createRecord(java.lang.String name)
          Creates a new Record and adds it to the FlatFile.
 void deleteRecord(Record record)
          Deletes a Record of the FlatFile.
 Record findRecord(java.lang.String name)
          Finds a Record in the FlatFile.
 java.lang.String getCharacterset()
          Gets the character set of the FlatFile
 java.lang.String getContinueIfEndsWith()
          For datafiles containing logical records which themselves contain a variable number of fixed records.
 java.lang.String getContinueIfStartsWith()
          For datafiles containing logical records which themselves contain a variable number of fixed records.
 java.lang.String getFieldDelimiter()
          Gets the field delimiter of the FlatFile
 char getFieldLeftEnclosure()
          Gets the left enclosure character of a FlatFile whose fields are delimited.
 char getFieldRightEnclosure()
          Gets the right enclosure character of a FlatFile whose fields are delimited.
 int getNumberOfPhysicalPerLogicalRecord()
          Gets the number of physical records in the datafile which will be concatenated to form a single logical record.
 int getNumberOfRecordsToSkip()
          Gets the default number of records to skip when loading this FlatFile.
 FlatFileModule getOwningFlatFileModule()
          Gets the owning FlatFileModule of this FlatFile.
 java.lang.String getRecordDelimiter()
          Sets the String which is the FlatFile's record delimiter.
 int getRecordLength()
          Gets the record length of the FlatFile.
 Record[] getRecords()
          Gets all of the records of this FlatFile.
 int getRecordTypeColumnNumber()
          Gets the record type column number for a multi-record FlatFile whose fields are delimited.
 int getRecordTypeEndPosition()
          Gets the end position of the record type value for a multi-record FlatFile whose fields are of fixed lengths.
 int getRecordTypeStartPosition()
          Gets the start position of the record type for a multi-record FlatFile whose fields are of fixed lengths.
 java.lang.String getSourceFrom()
          Gets the default data file that this FlatFile object is sourced from.
 boolean isDelimited()
          Gets the FlatFile format.
 void setCharacterset(java.lang.String characterset)
          Sets the character set of the FlatFile.
 void setContinueIfEndsWith(java.lang.String continueChar)
          For datafiles containing logical records which themselves contain a variable number of fixed records.
 void setContinueIfStartsWith(java.lang.String continueChar)
          For datafiles containing logical records which themselves contain a variable number of fixed records.
 void setDelimitedFormat(boolean value)
          Sets the FlatFile format.
 void setFieldDelimiter(java.lang.String delimiter)
          Sets the field delimiter of the FlatFile to the specified String
 void setFieldLeftEnclosure(char enclosureChar)
          Sets the left enclosure character of a FlatFile whose fields are delimited.
 void setFieldRightEnclosure(char enclosureChar)
          Sets the right enclosure character of a FlatFile whose fields are delimited.
 void setNumberOfPhysicalPerLogicalRecord(int number)
          Sets the number of physical records in the datafile which will be concatenated to form a single logical record.
 void setNumberOfRecordsToSkip(int number)
          Sets the default number of records to skip when loading this FlatFile.
 void setRecordDelimiter(java.lang.String delimiter)
          Sets the String which is the FlatFile's record delimiter.
 void setRecordLength(int length)
          Sets the record length of the FlatFile.
 void setRecordTypeColumnNumber(int columnNumber)
          Sets the record type column number for a multi-record FlatFile whose fields are delimited.
 void setRecordTypeEndPosition(int endPosition)
          Sets the end position of the record type for a multi-record FlatFile whose fields are of fixed lengths.
 void setRecordTypeStartPosition(int startPosition)
          Sets the start position of the record type for a multi-record FlatFile whose fields are of fixed lengths.
 void setSourceFrom(java.lang.String sourcefrom)
          Sets the default data file that this FlatFile object is sourced from.

 

Methods inherited from interface oracle.owb.foundation.Component
getOwningFolder, isReloadNeeded, lock, reload, unlock

 

Methods inherited from interface oracle.owb.foundation.OWBNamedObject
delete, getBusinessName, getClassDefinition, getComponent, getDescription, getName, getUOID, isDeletable, isEditable, isRenamable, setBusinessName, setDescription, setName

 

Methods inherited from interface oracle.owb.metadatamgmt.changemgmt.Snapshotable
compare, compare, compare, compare, createSnapshot, createSnapshot, createSnapshotWithDependeeComponents, createSnapshotWithDependeeComponents, getSnapshots

 

Methods inherited from interface oracle.owb.reconcile.ReconcileSource
getReconcileTargetTypes, getType

 

Methods inherited from interface oracle.owb.reconcile.ReconcileTarget
canMatchByPosition, getReconcileSourceTypes, getType

 

Methods inherited from interface oracle.owb.foundation.property.PropertyOwner
getDefaultPropertyValue, getLogicalPropertyKeys, getPhysicalPropertyKeys, getPropertyDomain, getPropertyKeys, getPropertyValue, getPropertyValueString, isLogicalProperty, isPhysicalProperty, isReadOnlyProperty, setPropertyValue, setPropertyValueByString

 

Methods inherited from interface oracle.owb.compile.ValidatableObject
validate

 

Method Detail

getOwningFlatFileModule

public FlatFileModule getOwningFlatFileModule()
Gets the owning FlatFileModule of this FlatFile.
Returns:
the FlatFileModule which contains this FlatFile

createRecord

public Record createRecord(java.lang.String name)
                    throws NameSpaceException,
InvalidFormatException
Creates a new Record and adds it to the FlatFile.
Parameters:
name - a String which will be the name of the new Record. The name will be converted to all uppercase characters if it is not already.
Returns:
the Record created by this method
Throws:
NameSpaceException - If the name has already been used by a Record in this FlatFile
InvalidFormatException - If the name is not a valid name for a Record. For example, it is too long or contains invalid characters.

deleteRecord

public void deleteRecord(Record record)
                  throws NameSpaceException,
InvalidFormatException
Deletes a Record of the FlatFile. The following rules are applied: A record cannot be deleted, if a FlatFile is a single record file. A record wil be deleted if a FlatFile is a multi-record file. A record will be deleted and then a new record will be created (with the same name as a FlatFile), if a FlatFile is a multi-record file with one record.
Parameters:
record - a Record object which should be deleted be converted to all uppercase characters if it is not already.
Throws:
NameSpaceException
InvalidFormatException

getRecords

public Record[] getRecords()
Gets all of the records of this FlatFile.
Returns:
an array of Records which this FlatFile owns

findRecord

public Record findRecord(java.lang.String name)
Finds a Record in the FlatFile.
Parameters:
name - a String specifying the name of the Record to find. It is case sensitive.
Returns:
the Record found; or null if no Record exists of the given name

setDelimitedFormat

public void setDelimitedFormat(boolean value)
Sets the FlatFile format.
Parameters:
value - if value is true the FlatFile contains delimitted Records if value is false the FlatFile contains fixed-length Records

isDelimited

public boolean isDelimited()
Gets the FlatFile format.
Returns:
if true the FlatFile contains delimited Records if false the FlatFile contains fixed-length Records

setSourceFrom

public void setSourceFrom(java.lang.String sourcefrom)
Sets the default data file that this FlatFile object is sourced from.
Parameters:
sourcefrom - a String representing the file name of the default datafile
See Also:
getSourceFrom

getSourceFrom

public java.lang.String getSourceFrom()
Gets the default data file that this FlatFile object is sourced from.
Returns:
a String representing the file name of the default datafile
See Also:
setSourceFrom

setCharacterset

public void setCharacterset(java.lang.String characterset)
Sets the character set of the FlatFile.
Parameters:
characterset - a String which is the name of the datafile's characterset
See Also:
getCharacterset

getCharacterset

public java.lang.String getCharacterset()
Gets the character set of the FlatFile
Returns:
a String which is the name of the datafile's characterset
See Also:
setCharacterset

setRecordDelimiter

public void setRecordDelimiter(java.lang.String delimiter)
Sets the String which is the FlatFile's record delimiter. By default it is a carriage return.
Parameters:
delimiter - the String delimiting the records of this FlatFile
See Also:
getRecordDelimiter

getRecordDelimiter

public java.lang.String getRecordDelimiter()
Sets the String which is the FlatFile's record delimiter. By default it is a carriage return.
Returns:
the String delimiting the records of this FlatFile
See Also:
setRecordDelimiter

setRecordLength

public void setRecordLength(int length)
Sets the record length of the FlatFile. This is pertinent if the datafile is not delimited by a special String, but instead contains records of a fixed length. The length is specified in characters.
Parameters:
length - the length of this FlatFile's records, in characters
See Also:
getRecordLength

getRecordLength

public int getRecordLength()
Gets the record length of the FlatFile.
Returns:
the length of this FlatFile's records, in characters
See Also:
setRecordLength

setRecordTypeColumnNumber

public void setRecordTypeColumnNumber(int columnNumber)
Sets the record type column number for a multi-record FlatFile whose fields are delimited.
Parameters:
columnNumber - specifies which column determines record type
See Also:
getRecordTypeColumnNumber

getRecordTypeColumnNumber

public int getRecordTypeColumnNumber()
Gets the record type column number for a multi-record FlatFile whose fields are delimited.
Returns:
an int which specifies which column number determines record type
See Also:
getRecordTypeColumnNumber

setRecordTypeStartPosition

public void setRecordTypeStartPosition(int startPosition)
Sets the start position of the record type for a multi-record FlatFile whose fields are of fixed lengths.
Parameters:
startPosition - the position in the data record where the record type value begins
See Also:
getRecordTypeStartPosition

getRecordTypeStartPosition

public int getRecordTypeStartPosition()
Gets the start position of the record type for a multi-record FlatFile whose fields are of fixed lengths.
Returns:
the position in the data record where the record type value begins
See Also:
setRecordTypeStartPosition

setRecordTypeEndPosition

public void setRecordTypeEndPosition(int endPosition)
Sets the end position of the record type for a multi-record FlatFile whose fields are of fixed lengths.
Parameters:
endPosition - the position in the data record where the record type value ends
See Also:
getRecordTypeEndPosition

getRecordTypeEndPosition

public int getRecordTypeEndPosition()
Gets the end position of the record type value for a multi-record FlatFile whose fields are of fixed lengths.
Returns:
the position in the data record where the record type value ends
See Also:
setRecordTypeEndPosition

setNumberOfRecordsToSkip

public void setNumberOfRecordsToSkip(int number)
Sets the default number of records to skip when loading this FlatFile. This value can be modified on a per-map basis in the mapping properties.
Parameters:
number - the number of records to skip
See Also:
getNumberOfRecordsToSkip

getNumberOfRecordsToSkip

public int getNumberOfRecordsToSkip()
Gets the default number of records to skip when loading this FlatFile. This value can be modified on a per-map basis in the mapping properties.
Returns:
the number of records to skip
See Also:
setNumberOfRecordsToSkip

setFieldDelimiter

public void setFieldDelimiter(java.lang.String delimiter)
Sets the field delimiter of the FlatFile to the specified String
Parameters:
delimiter - the String delimiting the fields of this FlatFile.
See Also:
getFieldDelimiter

getFieldDelimiter

public java.lang.String getFieldDelimiter()
Gets the field delimiter of the FlatFile
Returns:
the String delimiting the fields of this FlatFile
See Also:
setFieldDelimiter

setFieldLeftEnclosure

public void setFieldLeftEnclosure(char enclosureChar)
Sets the left enclosure character of a FlatFile whose fields are delimited. The enclosures are optionally included in the datafile in case the field delimiter itself appears in the data.
Parameters:
enclosureChar - the character enclosing the fields of this FlatFile
See Also:
getFieldLeftEnclosure

getFieldLeftEnclosure

public char getFieldLeftEnclosure()
Gets the left enclosure character of a FlatFile whose fields are delimited. The enclosures are optionally included in the datafile in case the field delimiter itself appears in the data.
Returns:
the character enclosing the fields of this FlatFile
See Also:
setFieldLeftEnclosure

setFieldRightEnclosure

public void setFieldRightEnclosure(char enclosureChar)
Sets the right enclosure character of a FlatFile whose fields are delimited. The enclosures are optionally included in the datafile in case the field delimiter itself appears in the data.
Parameters:
enclosureChar - the character enclosing the fields of this FlatFile
See Also:
getFieldRightEnclosure

getFieldRightEnclosure

public char getFieldRightEnclosure()
Gets the right enclosure character of a FlatFile whose fields are delimited. The enclosures are optionally included in the datafile in case the field delimiter itself appears in the data.
Returns:
the character enclosing the fields of this FlatFile
See Also:
setFieldRightEnclosure

setNumberOfPhysicalPerLogicalRecord

public void setNumberOfPhysicalPerLogicalRecord(int number)
Sets the number of physical records in the datafile which will be concatenated to form a single logical record. By default it is one.
Parameters:
number - the number of physical records in each logical record
See Also:
getNumberOfPhysicalPerLogicalRecord

getNumberOfPhysicalPerLogicalRecord

public int getNumberOfPhysicalPerLogicalRecord()
Gets the number of physical records in the datafile which will be concatenated to form a single logical record. By default it is one.
Returns:
the number of physical records in each logical record
See Also:
setNumberOfPhysicalPerLogicalRecord

setContinueIfEndsWith

public void setContinueIfEndsWith(java.lang.String continueChar)
For datafiles containing logical records which themselves contain a variable number of fixed records. This method sets the character which will determine if the next physical record will be concatenated on to the end of the current logical record, or will become the begining of the next logical record. If the last nonblank character of the current physical record is equal to this value then the next physical record will be added to it.
Parameters:
continueChar - the character to test the last nonblank character against
See Also:
getContinueIfEndsWith

getContinueIfEndsWith

public java.lang.String getContinueIfEndsWith()
For datafiles containing logical records which themselves contain a variable number of fixed records. This method gets the character which will determine if the next physical record will be concatenated on to the end of the current logical record, or will become the begining of the next logical record. If the last nonblank character of the current physical record is equal to this value then the next physical record will be added to it.
Returns:
the character to test the last nonblank character against
See Also:
setContinueIfEndsWith

setContinueIfStartsWith

public void setContinueIfStartsWith(java.lang.String continueChar)
For datafiles containing logical records which themselves contain a variable number of fixed records. This method sets the String which will determine if the next physical record will be concatenated on to the end of the current logical record, or will become the begining of the next logical record. If the next physical record begins with this String then it will be added to the current physical record.
Parameters:
continueChar - the String to compare to the begining of the next physical record
See Also:
getContinueIfStartsWith

getContinueIfStartsWith

public java.lang.String getContinueIfStartsWith()
For datafiles containing logical records which themselves contain a variable number of fixed records. This method gets the String which will determine if the next physical record will be concatenated on to the end of the current logical record, or will become the begining of the next logical record. If the next physical record begins with this String then it will be added to the current physical record.
Returns:
the String to compare to the begining of the next physical record
See Also:
setContinueIfStartsWith

Oracle Warehouse Builder Java API Reference
10g Release 1 (10.1)

B12155-01

Copyright © 2003, Oracle. All Rights Reserved.