|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.di.trans.step.BaseStepMeta org.pentaho.di.trans.steps.textfileoutput.TextFileOutputMeta
public class TextFileOutputMeta
Field Summary | |
---|---|
static int |
FILE_COMPRESSION_TYPE_GZIP
|
static int |
FILE_COMPRESSION_TYPE_NONE
|
static int |
FILE_COMPRESSION_TYPE_ZIP
|
static String[] |
fileCompressionTypeCodes
|
static String[] |
formatMapperLineTerminator
|
Fields inherited from class org.pentaho.di.trans.step.BaseStepMeta |
---|
loggingObject, STEP_ATTRIBUTES_FILE |
Constructor Summary | |
---|---|
TextFileOutputMeta()
|
Method Summary | |
---|---|
void |
allocate(int nrfields)
|
String |
buildFilename(String filename,
String extension,
VariableSpace space,
int stepnr,
String partnr,
int splitnr,
boolean ziparchive,
TextFileOutputMeta meta)
|
String |
buildFilename(VariableSpace space,
int stepnr,
String partnr,
int splitnr,
boolean ziparchive)
|
void |
check(List<CheckResultInterface> remarks,
TransMeta transMeta,
StepMeta stepinfo,
RowMetaInterface prev,
String[] input,
String[] output,
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(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 |
getDateTimeFormat()
|
String |
getEnclosure()
|
String |
getEncoding()
|
String |
getEndedLine()
|
String |
getExtension()
|
void |
getFields(RowMetaInterface row,
String name,
RowMetaInterface[] info,
StepMeta nextStep,
VariableSpace space)
Gets the fields. |
String |
getFileCompression()
|
String |
getFileFormat()
|
String |
getFileName()
|
String |
getFileNameField()
|
String[] |
getFiles(VariableSpace space)
|
String |
getNewline()
|
String |
getNewLine(String fformat)
|
TextFileField[] |
getOutputFields()
|
String |
getSeparator()
|
int |
getSplitEvery()
|
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. |
String |
getXML()
Produces the XML string that describes this step's information. |
boolean |
isAddToResultFiles()
|
boolean |
isCreateParentFolder()
|
boolean |
isDateInFilename()
|
boolean |
isDoNotOpenNewFileInit()
|
boolean |
isEnclosureFixDisabled()
|
boolean |
isEnclosureForced()
|
boolean |
isFastDump()
|
boolean |
isFileAppended()
|
boolean |
isFileAsCommand()
|
boolean |
isFileNameInField()
|
boolean |
isFooterEnabled()
|
boolean |
isHeaderEnabled()
|
boolean |
isPadded()
|
boolean |
isPartNrInFilename()
|
boolean |
isServletOutput()
|
boolean |
isSpecifyingFormat()
|
boolean |
isStepNrInFilename()
|
boolean |
isTimeInFilename()
|
void |
loadXML(Node stepnode,
List<DatabaseMeta> databases,
Map<String,Counter> counters)
Load the values for this step from an XML Node |
void |
readData(Node stepnode)
|
void |
readRep(Repository rep,
ObjectId id_step,
List<DatabaseMeta> databases,
Map<String,Counter> counters)
Read the steps information from a Kettle repository |
void |
saveRep(Repository rep,
ObjectId id_transformation,
ObjectId id_step)
Save the steps data into a Kettle repository |
void |
setAddToResultFiles(boolean addtoresultfilenamesin)
|
void |
setCreateParentFolder(boolean createparentfolder)
|
void |
setDateInFilename(boolean dateInFilename)
|
void |
setDateTimeFormat(String dateTimeFormat)
|
void |
setDefault()
Set default values |
void |
setDoNotOpenNewFileInit(boolean doNotOpenNewFileInit)
|
void |
setEnclosure(String enclosure)
|
void |
setEnclosureFixDisabled(boolean disableEnclosureFix)
|
void |
setEnclosureForced(boolean enclosureForced)
|
void |
setEncoding(String encoding)
|
void |
setEndedLine(String endedLine)
|
void |
setExtension(String extension)
|
void |
setFastDump(boolean fastDump)
|
void |
setFileAppended(boolean fileAppended)
|
void |
setFileAsCommand(boolean fileAsCommand)
|
void |
setFileCompression(String fileCompression)
|
void |
setFileFormat(String fileFormat)
|
void |
setFilename(String fileName)
|
void |
setFileName(String fileName)
|
void |
setFileNameField(String fileNameField)
|
void |
setFileNameInField(boolean fileNameInField)
|
void |
setFooterEnabled(boolean footer)
|
void |
setHeaderEnabled(boolean header)
|
void |
setNewline(String newline)
|
void |
setOutputFields(TextFileField[] outputFields)
|
void |
setPadded(boolean padded)
|
void |
setPartNrInFilename(boolean partNrInFilename)
|
void |
setSeparator(String separator)
|
void |
setServletOutput(boolean servletOutput)
|
void |
setSpecifyingFormat(boolean specifyingFormat)
|
void |
setSplitEvery(int splitEvery)
|
void |
setStepNrInFilename(boolean stepNrInFilename)
|
void |
setTimeInFilename(boolean timeInFilename)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FILE_COMPRESSION_TYPE_NONE
public static final int FILE_COMPRESSION_TYPE_ZIP
public static final int FILE_COMPRESSION_TYPE_GZIP
public static final String[] fileCompressionTypeCodes
public static final String[] formatMapperLineTerminator
Constructor Detail |
---|
public TextFileOutputMeta()
Method Detail |
---|
public boolean isFileAsCommand()
public void setFileAsCommand(boolean fileAsCommand)
fileAsCommand
- The fileAsCommand to setpublic boolean isServletOutput()
public void setServletOutput(boolean servletOutput)
public void setCreateParentFolder(boolean createparentfolder)
createparentfolder
- The createparentfolder to set.public boolean isCreateParentFolder()
public boolean isDateInFilename()
public void setDateInFilename(boolean dateInFilename)
dateInFilename
- The dateInFilename to set.public String getEnclosure()
public void setEnclosure(String enclosure)
enclosure
- The enclosure to set.public boolean isEnclosureForced()
public void setEnclosureForced(boolean enclosureForced)
enclosureForced
- The enclosureForced to set.public boolean isEnclosureFixDisabled()
public void setEnclosureFixDisabled(boolean disableEnclosureFix)
enclosureFixDisabled
- The enclosureFixDisabled to set.public String getExtension()
public void setExtension(String extension)
extension
- The extension to set.public boolean isAddToResultFiles()
public void setAddToResultFiles(boolean addtoresultfilenamesin)
addtoresultfilenamesin
- The addtoresultfilenames to set.public boolean isFileAppended()
public void setFileAppended(boolean fileAppended)
fileAppended
- The fileAppended to set.public String getFileFormat()
public void setFileFormat(String fileFormat)
fileFormat
- The fileFormat to set.public String getFileCompression()
public void setFileCompression(String fileCompression)
fileCompression
- The fileCompression to set.public String getFileName()
public void setFileName(String fileName)
fileName
- The fileName to set.public boolean isFooterEnabled()
public void setFooterEnabled(boolean footer)
footer
- The footer to set.public boolean isHeaderEnabled()
public void setHeaderEnabled(boolean header)
header
- The header to set.public String getNewline()
public void setNewline(String newline)
newline
- The newline to set.public boolean isPadded()
public void setPadded(boolean padded)
padded
- The padded to set.public boolean isFastDump()
public void setFastDump(boolean fastDump)
fastDump
- The fastDump to set.public String getSeparator()
public void setSeparator(String separator)
separator
- The separator to set.public boolean isDoNotOpenNewFileInit()
public void setDoNotOpenNewFileInit(boolean doNotOpenNewFileInit)
doNotOpenNewFileInit
- The "do not open new file at init" flag to set.public int getSplitEvery()
public void setSplitEvery(int splitEvery)
splitEvery
- The splitEvery to set.public boolean isStepNrInFilename()
public void setStepNrInFilename(boolean stepNrInFilename)
stepNrInFilename
- The stepNrInFilename to set.public boolean isPartNrInFilename()
public void setPartNrInFilename(boolean partNrInFilename)
partNrInFilename
- The partNrInFilename to set.public boolean isTimeInFilename()
public void setTimeInFilename(boolean timeInFilename)
timeInFilename
- The timeInFilename to set.public boolean isSpecifyingFormat()
public void setSpecifyingFormat(boolean specifyingFormat)
public String getDateTimeFormat()
public void setDateTimeFormat(String dateTimeFormat)
public TextFileField[] getOutputFields()
public void setOutputFields(TextFileField[] outputFields)
outputFields
- The outputFields to set.public String getEncoding()
public void setEncoding(String encoding)
encoding
- The desired encoding of output file, null or empty if the default system encoding needs to be
used.public String getEndedLine()
public void setEndedLine(String endedLine)
endedLine
- The desired last line in the output file, null or empty if nothing has to be added.public boolean isFileNameInField()
public void setFileNameInField(boolean fileNameInField)
fileNameInField
- Is the file name coded in a field?public String getFileNameField()
public void setFileNameField(String fileNameField)
fileNameField
- Name of the field that contains the file namepublic void loadXML(Node stepnode, List<DatabaseMeta> databases, Map<String,Counter> counters) throws 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.
KettleXMLException
- When an unexpected XML error occurred. (malformed etc.)public void allocate(int nrfields)
public Object clone()
StepMetaInterface
clone
in interface StepMetaInterface
clone
in class BaseStepMeta
public void readData(Node stepnode) throws KettleXMLException
KettleXMLException
public String getNewLine(String fformat)
public void setDefault()
StepMetaInterface
setDefault
in interface StepMetaInterface
public String[] getFiles(VariableSpace space)
public String buildFilename(VariableSpace space, int stepnr, String partnr, int splitnr, boolean ziparchive)
public String buildFilename(String filename, String extension, VariableSpace space, int stepnr, String partnr, int splitnr, boolean ziparchive, TextFileOutputMeta meta)
public void getFields(RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space) throws KettleStepException
BaseStepMeta
getFields
in interface StepMetaInterface
getFields
in class BaseStepMeta
row
- the input row metaname
- the nameinfo
- the infonextStep
- the next stepspace
- the space
KettleStepException
- the kettle step exceptionpublic String getXML()
BaseStepMeta
getXML
in interface StepMetaInterface
getXML
in class BaseStepMeta
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String,Counter> counters) throws KettleException
StepMetaInterface
readRep
in interface StepMetaInterface
rep
- The repository to read fromid_step
- The step IDdatabases
- The databases to referencecounters
- The counters to reference
KettleException
- When an unexpected error occurred (database, network, etc)public void saveRep(Repository rep, ObjectId id_transformation, ObjectId id_step) throws KettleException
StepMetaInterface
saveRep
in interface StepMetaInterface
rep
- The Kettle repository to save toid_transformation
- The transformation IDid_step
- The step ID
KettleException
- When an unexpected error occurred (database, network, etc)public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepinfo, RowMetaInterface prev, String[] input, String[] output, 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 exportResources(VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException
exportResources
in interface StepMetaInterface
exportResources
in class BaseStepMeta
space
- the spacedefinitions
- the definitionsresourceNamingInterface
- the resource naming interfacerepository
- the repository
KettleException
- the kettle exceptionpublic void setFilename(String fileName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |