|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.di.trans.step.BaseStepMeta
org.pentaho.di.trans.steps.textfileinput.TextFileInputMeta
public class TextFileInputMeta
Field Summary | |
---|---|
static int |
FILE_FORMAT_DOS
|
static int |
FILE_FORMAT_MIXED
|
static int |
FILE_FORMAT_UNIX
|
static int |
FILE_TYPE_CSV
|
static int |
FILE_TYPE_FIXED
|
static String[] |
RequiredFilesCode
|
static String[] |
RequiredFilesDesc
|
Fields inherited from class org.pentaho.di.trans.step.BaseStepMeta |
---|
loggingObject, STEP_ATTRIBUTES_FILE |
Constructor Summary | |
---|---|
TextFileInputMeta()
|
Method Summary | |
---|---|
void |
allocate(int nrfiles,
int nrfields,
int nrfilters)
|
void |
check(List<org.pentaho.di.core.CheckResultInterface> remarks,
TransMeta transMeta,
StepMeta stepinfo,
org.pentaho.di.core.row.RowMetaInterface prev,
String[] input,
String[] output,
org.pentaho.di.core.row.RowMetaInterface info)
Checks the settings of this step and puts the findings in a remarks List. |
Object |
clone()
Make an exact copy of this step, make sure to explicitly copy Collections etc. |
String |
exportResources(org.pentaho.di.core.variables.VariableSpace space,
Map<String,ResourceDefinition> definitions,
ResourceNamingInterface resourceNamingInterface,
Repository repository)
Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively. |
String |
getAcceptingField()
|
StepMeta |
getAcceptingStep()
|
String |
getAcceptingStepName()
|
Locale |
getDateFormatLocale()
|
String |
getEnclosure()
|
String |
getEncoding()
|
String |
getErrorCountField()
|
String |
getErrorFieldsField()
|
String |
getErrorFilesDestinationDirectory()
|
String |
getErrorLineFilesExtension()
|
String |
getErrorTextField()
|
String |
getEscapeCharacter()
|
String[] |
getExludeFileMask()
|
String |
getExtensionField()
|
void |
getFields(org.pentaho.di.core.row.RowMetaInterface row,
String name,
org.pentaho.di.core.row.RowMetaInterface[] info,
StepMeta nextStep,
org.pentaho.di.core.variables.VariableSpace space)
Get the fields that are emitted by this step |
String |
getFileCompression()
|
String |
getFileErrorField()
|
String |
getFileErrorMessageField()
|
String |
getFileFormat()
|
int |
getFileFormatTypeNr()
|
String[] |
getFileMask()
|
String[] |
getFileName()
|
String |
getFilenameField()
|
String[] |
getFilePaths(org.pentaho.di.core.variables.VariableSpace space)
|
String[] |
getFileRequired()
|
String |
getFileType()
|
int |
getFileTypeNr()
|
TextFileFilter[] |
getFilter()
|
String[] |
getIncludeSubFolders()
|
String[] |
getInfoSteps()
|
TextFileInputField[] |
getInputFields()
|
String |
getLastModificationDateField()
|
String |
getLineNumberFilesDestinationDirectory()
|
String |
getLineNumberFilesExtension()
|
String |
getLookupStepname()
|
int |
getNrFooterLines()
|
int |
getNrHeaderLines()
|
int |
getNrLinesDocHeader()
|
int |
getNrLinesPerPage()
|
int |
getNrWraps()
|
String |
getPathField()
|
String |
getRequiredFilesCode(String tt)
|
String |
getRequiredFilesDesc(String tt)
|
List<ResourceReference> |
getResourceDependencies(TransMeta transMeta,
StepMeta stepInfo)
Get a list of all the resource dependencies that the step is depending on. |
String |
getRootUriField()
|
long |
getRowLimit()
|
String |
getRowNumberField()
|
String |
getSeparator()
|
String |
getShortFileNameField()
|
String |
getSizeField()
|
StepInterface |
getStep(StepMeta stepMeta,
StepDataInterface stepDataInterface,
int cnr,
TransMeta transMeta,
Trans trans)
Get the executing step, needed by Trans to launch a step. |
StepDataInterface |
getStepData()
Get a new instance of the appropriate data class. |
org.pentaho.di.core.fileinput.FileInputList |
getTextFileList(org.pentaho.di.core.variables.VariableSpace space)
|
String |
getUriField()
|
String |
getWarningFilesDestinationDirectory()
|
String |
getWarningFilesExtension()
|
String |
getXML()
Produces the XML string that describes this step's information. |
boolean |
hasFooter()
|
boolean |
hasHeader()
|
boolean |
includeFilename()
|
boolean |
includeRowNumber()
|
boolean |
isAcceptingFilenames()
|
boolean |
isAddResultFile()
|
boolean |
isBreakInEnclosureAllowed()
|
boolean |
isDateFormatLenient()
|
boolean |
isErrorIgnored()
|
boolean |
isErrorLineSkipped()
|
String |
isHiddenField()
|
boolean |
isLayoutPaged()
|
boolean |
isLineWrapped()
|
boolean |
isPassingThruFields()
|
boolean |
isRowNumberByFile()
true if row number reset for each file |
boolean |
isSkipBadFiles()
|
void |
loadXML(Node stepnode,
List<org.pentaho.di.core.database.DatabaseMeta> databases,
Map<String,org.pentaho.di.core.Counter> counters)
Load the values for this step from an XML Node |
boolean |
noEmptyLines()
|
void |
readRep(Repository rep,
org.pentaho.di.repository.ObjectId id_step,
List<org.pentaho.di.core.database.DatabaseMeta> databases,
Map<String,org.pentaho.di.core.Counter> counters)
Read the steps information from a Kettle repository |
void |
saveRep(Repository rep,
org.pentaho.di.repository.ObjectId id_transformation,
org.pentaho.di.repository.ObjectId id_step)
Save the steps data into a Kettle repository |
void |
searchInfoAndTargetSteps(List<StepMeta> steps)
Change step names into step objects to allow them to be name-changed etc. |
void |
setAcceptingField(String fileNameField)
|
void |
setAcceptingFilenames(boolean getFileFromJob)
|
void |
setAcceptingStep(StepMeta acceptingStep)
|
void |
setAcceptingStepName(String acceptingStep)
|
void |
setAddResultFile(boolean isaddresult)
|
void |
setBreakInEnclosureAllowed(boolean breakInEnclosureAllowed)
|
void |
setDateFormatLenient(boolean dateFormatLenient)
|
void |
setDateFormatLocale(Locale dateFormatLocale)
|
void |
setDefault()
Set default values |
void |
setEnclosure(String enclosure)
|
void |
setEncoding(String encoding)
|
void |
setErrorCountField(String errorCountField)
|
void |
setErrorFieldsField(String errorFieldsField)
|
void |
setErrorFilesDestinationDirectory(String errorFilesDestinationDirectory)
|
void |
setErrorIgnored(boolean errorIgnored)
|
void |
setErrorLineFilesExtension(String errorLineFilesExtension)
|
void |
setErrorLineSkipped(boolean errorLineSkipped)
|
void |
setErrorTextField(String errorTextField)
|
void |
setEscapeCharacter(String escapeCharacter)
|
void |
setExcludeFileMask(String[] excludeFileMask)
|
void |
setExtensionField(String field)
|
void |
setFileCompression(String fileCompression)
|
void |
setFileErrorField(String field)
|
void |
setFileErrorMessageField(String field)
|
void |
setFileFormat(String fileFormat)
|
void |
setFileMask(String[] fileMask)
|
void |
setFileName(String[] fileName)
|
void |
setFilenameField(String filenameField)
|
void |
setFileRequired(String[] fileRequiredin)
|
void |
setFileType(String fileType)
|
void |
setFilter(TextFileFilter[] filter)
|
void |
setFooter(boolean footer)
|
void |
setHeader(boolean header)
|
void |
setIncludeFilename(boolean includeFilename)
|
void |
setIncludeRowNumber(boolean includeRowNumber)
|
void |
setIncludeSubFolders(String[] includeSubFoldersin)
|
void |
setInputFields(TextFileInputField[] inputFields)
|
void |
setIsHiddenField(String field)
|
void |
setLastModificationDateField(String field)
|
void |
setLayoutPaged(boolean layoutPaged)
|
void |
setLineNumberFilesDestinationDirectory(String lineNumberFilesDestinationDirectory)
|
void |
setLineNumberFilesExtension(String lineNumberFilesExtension)
|
void |
setLineWrapped(boolean lineWrapped)
|
void |
setNoEmptyLines(boolean noEmptyLines)
|
void |
setNrFooterLines(int nrFooterLines)
|
void |
setNrHeaderLines(int nrHeaderLines)
|
void |
setNrLinesDocHeader(int nrLinesDocHeader)
|
void |
setNrLinesPerPage(int nrLinesPerPage)
|
void |
setNrWraps(int nrWraps)
|
void |
setPassingThruFields(boolean passingThruFields)
|
void |
setPathField(String field)
|
void |
setRootUriField(String field)
|
void |
setRowLimit(long rowLimit)
|
void |
setRowNumberByFile(boolean rowNumberByFile)
|
void |
setRowNumberField(String rowNumberField)
|
void |
setSeparator(String separator)
|
void |
setShortFileNameField(String field)
|
void |
setSizeField(String field)
|
void |
setSkipBadFiles(boolean value)
|
void |
setUriField(String field)
|
void |
setWarningFilesDestinationDirectory(String warningFilesDestinationDirectory)
|
void |
setWarningFilesExtension(String warningFilesExtension)
|
boolean |
supportsErrorHandling()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] RequiredFilesDesc
public static final String[] RequiredFilesCode
public static final int FILE_FORMAT_DOS
public static final int FILE_FORMAT_UNIX
public static final int FILE_FORMAT_MIXED
public static final int FILE_TYPE_CSV
public static final int FILE_TYPE_FIXED
Constructor Detail |
---|
public TextFileInputMeta()
Method Detail |
---|
public String getShortFileNameField()
public void setShortFileNameField(String field)
field
- The shortFileFieldName to set.public String getPathField()
public void setPathField(String field)
field
- The pathFieldName to set.public String isHiddenField()
public void setIsHiddenField(String field)
field
- The hiddenFieldName to set.public String getLastModificationDateField()
public void setLastModificationDateField(String field)
field
- The lastModificationTimeFieldName to set.public String getUriField()
public void setUriField(String field)
field
- The uriNameFieldName to set.public String getRootUriField()
public void setRootUriField(String field)
field
- The rootUriNameFieldName to set.public String getExtensionField()
public void setExtensionField(String field)
field
- The extensionFieldName to set.public String getSizeField()
public void setSizeField(String field)
field
- The sizeFieldName to set.public boolean isSkipBadFiles()
public void setSkipBadFiles(boolean value)
value
- If should continue processing after failing to open a filepublic String getFileErrorField()
public void setFileErrorField(String field)
public String getFileErrorMessageField()
public void setFileErrorMessageField(String field)
public String getEncoding()
public void setEncoding(String encoding)
encoding
- The encoding to set.public TextFileInputField[] getInputFields()
getInputFields
in interface InputFileMetaInterface
public void setInputFields(TextFileInputField[] inputFields)
inputFields
- The input fields to set.public String getEnclosure()
getEnclosure
in interface InputFileMetaInterface
public void setEnclosure(String enclosure)
enclosure
- The enclosure to set.public boolean isBreakInEnclosureAllowed()
public void setBreakInEnclosureAllowed(boolean breakInEnclosureAllowed)
breakInEnclosureAllowed
- The breakInEnclosureAllowed to set.public String[] getExludeFileMask()
public void setExcludeFileMask(String[] excludeFileMask)
excludeFileMask
- The excludeFileMask to set.public String getFileFormat()
public void setFileFormat(String fileFormat)
fileFormat
- The fileFormat to set.public String[] getFileMask()
public String[] getFileRequired()
public void setFileMask(String[] fileMask)
fileMask
- The fileMask to set.public void setFileRequired(String[] fileRequiredin)
fileRequired
- The fileRequired to set.public String[] getIncludeSubFolders()
public void setIncludeSubFolders(String[] includeSubFoldersin)
public String getRequiredFilesCode(String tt)
public String[] getFileName()
public void setFileName(String[] fileName)
fileName
- The fileName to set.public String getFilenameField()
public void setFilenameField(String filenameField)
filenameField
- The filenameField to set.public String getFileType()
getFileType
in interface InputFileMetaInterface
public void setFileType(String fileType)
fileType
- The fileType to set.public TextFileFilter[] getFilter()
public void setFilter(TextFileFilter[] filter)
filter
- The array of filters to usepublic boolean hasFooter()
public void setFooter(boolean footer)
footer
- The footer to set.public boolean hasHeader()
hasHeader
in interface InputFileMetaInterface
public void setHeader(boolean header)
header
- The header to set.public boolean includeFilename()
includeFilename
in interface InputFileMetaInterface
public void setIncludeFilename(boolean includeFilename)
includeFilename
- The includeFilename to set.public boolean includeRowNumber()
includeRowNumber
in interface InputFileMetaInterface
public void setIncludeRowNumber(boolean includeRowNumber)
includeRowNumber
- The includeRowNumber to set.public boolean isRowNumberByFile()
public void setRowNumberByFile(boolean rowNumberByFile)
rowNumberByFile
- True if row number field is reset for each filepublic boolean noEmptyLines()
public void setNoEmptyLines(boolean noEmptyLines)
noEmptyLines
- The noEmptyLines to set.public long getRowLimit()
public void setRowLimit(long rowLimit)
rowLimit
- The rowLimit to set.public String getRowNumberField()
public void setRowNumberField(String rowNumberField)
rowNumberField
- The rowNumberField to set.public String getSeparator()
getSeparator
in interface InputFileMetaInterface
public void setSeparator(String separator)
separator
- The separator to set.public String getFileCompression()
public void setFileCompression(String fileCompression)
fileCompression
- Sets the compression typepublic void loadXML(Node stepnode, List<org.pentaho.di.core.database.DatabaseMeta> databases, Map<String,org.pentaho.di.core.Counter> counters) throws org.pentaho.di.core.exception.KettleXMLException
StepMetaInterface
loadXML
in interface StepMetaInterface
stepnode
- the Node to get the info fromdatabases
- The available list of databases to reference tocounters
- Counters to reference.
org.pentaho.di.core.exception.KettleXMLException
- When an unexpected XML error occurred. (malformed etc.)public Object clone()
StepMetaInterface
clone
in interface StepMetaInterface
clone
in class BaseStepMeta
public void allocate(int nrfiles, int nrfields, int nrfilters)
public void setDefault()
StepMetaInterface
setDefault
in interface StepMetaInterface
public void getFields(org.pentaho.di.core.row.RowMetaInterface row, String name, org.pentaho.di.core.row.RowMetaInterface[] info, StepMeta nextStep, org.pentaho.di.core.variables.VariableSpace space) throws org.pentaho.di.core.exception.KettleStepException
StepMetaInterface
getFields
in interface StepMetaInterface
getFields
in class BaseStepMeta
row
- The fields that are entering the step. These are changed to reflect the output metadata.name
- The name of the step to be used as origininfo
- The input rows metadata that enters the step through the specified channels in the same order as in method getInfoSteps(). The step metadata can then choose what to do with it: ignore it or not.
Interesting is also that in case of database lookups, the layout of the target database table is put in info[0]nextStep
- if this is a non-null value, it's the next step in the transformation. The one who's asking, the step where the data is targetted towards.space
- TODO
org.pentaho.di.core.exception.KettleStepException
- when an error occurred searching for the fields.public String getXML()
BaseStepMeta
getXML
in interface StepMetaInterface
getXML
in class BaseStepMeta
public String getLookupStepname()
public void searchInfoAndTargetSteps(List<StepMeta> steps)
BaseStepMeta
searchInfoAndTargetSteps
in interface StepMetaInterface
searchInfoAndTargetSteps
in class BaseStepMeta
steps
- optionally search the info step in a list of stepspublic String[] getInfoSteps()
public void readRep(Repository rep, org.pentaho.di.repository.ObjectId id_step, List<org.pentaho.di.core.database.DatabaseMeta> databases, Map<String,org.pentaho.di.core.Counter> counters) throws org.pentaho.di.core.exception.KettleException
StepMetaInterface
readRep
in interface StepMetaInterface
rep
- The repository to read fromid_step
- The step IDdatabases
- The databases to referencecounters
- The counters to reference
org.pentaho.di.core.exception.KettleException
- When an unexpected error occurred (database, network, etc)public void saveRep(Repository rep, org.pentaho.di.repository.ObjectId id_transformation, org.pentaho.di.repository.ObjectId id_step) throws org.pentaho.di.core.exception.KettleException
StepMetaInterface
saveRep
in interface StepMetaInterface
rep
- The Kettle repository to save toid_transformation
- The transformation IDid_step
- The step ID
org.pentaho.di.core.exception.KettleException
- When an unexpected error occurred (database, network, etc)public String[] getFilePaths(org.pentaho.di.core.variables.VariableSpace space)
getFilePaths
in interface InputFileMetaInterface
public org.pentaho.di.core.fileinput.FileInputList getTextFileList(org.pentaho.di.core.variables.VariableSpace space)
public void check(List<org.pentaho.di.core.CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepinfo, org.pentaho.di.core.row.RowMetaInterface prev, String[] input, String[] output, org.pentaho.di.core.row.RowMetaInterface info)
StepMetaInterface
check
in interface StepMetaInterface
remarks
- The list to put the remarks in @see org.pentaho.di.core.CheckResultstepinfo
- The stepMeta to help checkingprev
- The fields coming from the previous stepinput
- The input step namesoutput
- The output step namesinfo
- The fields that are used as information by the steppublic StepInterface getStep(StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta transMeta, Trans trans)
StepMetaInterface
getStep
in interface StepMetaInterface
stepMeta
- The step infostepDataInterface
- the step data interface linked to this step. Here the step can store temporary data, database connections, etc.cnr
- The copy nr to gettransMeta
- The transformation infotrans
- The launching transformationpublic StepDataInterface getStepData()
StepMetaInterface
getStepData
in interface StepMetaInterface
public String getEscapeCharacter()
getEscapeCharacter
in interface InputFileMetaInterface
public void setEscapeCharacter(String escapeCharacter)
escapeCharacter
- The escapeCharacter to set.public String getErrorCountField()
getErrorCountField
in interface InputFileMetaInterface
public void setErrorCountField(String errorCountField)
public String getErrorFieldsField()
getErrorFieldsField
in interface InputFileMetaInterface
public void setErrorFieldsField(String errorFieldsField)
public boolean isErrorIgnored()
isErrorIgnored
in interface InputFileMetaInterface
public void setErrorIgnored(boolean errorIgnored)
public String getErrorTextField()
getErrorTextField
in interface InputFileMetaInterface
public void setErrorTextField(String errorTextField)
public boolean isLineWrapped()
public void setLineWrapped(boolean lineWrapped)
lineWrapped
- The lineWrapped to set.public int getNrFooterLines()
public void setNrFooterLines(int nrFooterLines)
nrFooterLines
- The nrFooterLines to set.public String getRequiredFilesDesc(String tt)
public int getNrHeaderLines()
getNrHeaderLines
in interface InputFileMetaInterface
public void setNrHeaderLines(int nrHeaderLines)
nrHeaderLines
- The nrHeaderLines to set.public int getNrWraps()
public void setNrWraps(int nrWraps)
nrWraps
- The nrWraps to set.public boolean isLayoutPaged()
public void setLayoutPaged(boolean layoutPaged)
layoutPaged
- The layoutPaged to set.public int getNrLinesPerPage()
public void setNrLinesPerPage(int nrLinesPerPage)
nrLinesPerPage
- The nrLinesPerPage to set.public int getNrLinesDocHeader()
public void setNrLinesDocHeader(int nrLinesDocHeader)
nrLinesDocHeader
- The nrLinesDocHeader to set.public String getWarningFilesDestinationDirectory()
public void setWarningFilesDestinationDirectory(String warningFilesDestinationDirectory)
public String getWarningFilesExtension()
public void setWarningFilesExtension(String warningFilesExtension)
public String getLineNumberFilesDestinationDirectory()
public void setLineNumberFilesDestinationDirectory(String lineNumberFilesDestinationDirectory)
public String getLineNumberFilesExtension()
public void setLineNumberFilesExtension(String lineNumberFilesExtension)
public String getErrorFilesDestinationDirectory()
public void setErrorFilesDestinationDirectory(String errorFilesDestinationDirectory)
public String getErrorLineFilesExtension()
public void setErrorLineFilesExtension(String errorLineFilesExtension)
public boolean isDateFormatLenient()
public void setDateFormatLenient(boolean dateFormatLenient)
public void setAddResultFile(boolean isaddresult)
isaddresult
- The isaddresult to set.public boolean isAddResultFile()
public boolean isErrorLineSkipped()
isErrorLineSkipped
in interface InputFileMetaInterface
public void setErrorLineSkipped(boolean errorLineSkipped)
public Locale getDateFormatLocale()
public void setDateFormatLocale(Locale dateFormatLocale)
dateFormatLocale
- The dateFormatLocale to set.public boolean isAcceptingFilenames()
public void setAcceptingFilenames(boolean getFileFromJob)
public boolean isPassingThruFields()
public void setPassingThruFields(boolean passingThruFields)
public String getAcceptingField()
public void setAcceptingField(String fileNameField)
fileNameField
- The fileNameField to set.public String getAcceptingStepName()
public void setAcceptingStepName(String acceptingStep)
acceptingStep
- The acceptingStep to set.public StepMeta getAcceptingStep()
public void setAcceptingStep(StepMeta acceptingStep)
acceptingStep
- The acceptingStep to set.public int getFileFormatTypeNr()
getFileFormatTypeNr
in interface InputFileMetaInterface
public int getFileTypeNr()
public List<ResourceReference> getResourceDependencies(TransMeta transMeta, StepMeta stepInfo)
BaseStepMeta
getResourceDependencies
in interface StepMetaInterface
getResourceDependencies
in class BaseStepMeta
public String exportResources(org.pentaho.di.core.variables.VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws org.pentaho.di.core.exception.KettleException
exportResources
in interface StepMetaInterface
exportResources
in class BaseStepMeta
space
- the variable space to userepository
- The repository to optionally load other resources from (to be converted to XML)
org.pentaho.di.core.exception.KettleException
public boolean supportsErrorHandling()
supportsErrorHandling
in interface StepMetaInterface
supportsErrorHandling
in class BaseStepMeta
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |