Package org.pentaho.di.trans.steps.file
Class BaseFileOutputMeta
- java.lang.Object
-
- org.pentaho.di.trans.step.BaseStepMeta
-
- org.pentaho.di.trans.steps.file.BaseFileMeta
-
- org.pentaho.di.trans.steps.file.BaseFileOutputMeta
-
- All Implemented Interfaces:
Cloneable
,StepAttributesInterface
,StepMetaInterface
- Direct Known Subclasses:
TextFileOutputMeta
public abstract class BaseFileOutputMeta extends BaseFileMeta
A base implementation for all output file based metas.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
dateInFilename
Flag: add the date in the filenamestatic String
DEFAULT_DATE_FORMAT
static String
DEFAULT_TIME_FORMAT
protected String
extension
The file extention in case of a generated filenameprotected String
fileName
The base name of the output fileprotected boolean
partNrInFilename
Flag: add the partition number in the filenameprotected boolean
stepNrInFilename
Flag: add the stepnr in the filenameprotected boolean
timeInFilename
Flag: add the time in the filename-
Fields inherited from class org.pentaho.di.trans.steps.file.BaseFileMeta
servletOutput
-
Fields inherited from class org.pentaho.di.trans.step.BaseStepMeta
attributes, databases, log, loggingObject, parentStepMeta, repository, STEP_ATTRIBUTES_FILE
-
-
Constructor Summary
Constructors Constructor Description BaseFileOutputMeta()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
buildFilename(String realFileName, String realExtension, String stepnr, String partnr, String splitnr, Date date, boolean ziparchive, boolean showSamples, BaseFileOutputMeta meta)
String
buildFilename(org.pentaho.di.core.variables.VariableSpace space, String stepnr, String partnr, String splitnr, boolean ziparchive)
String
buildFilename(org.pentaho.di.core.variables.VariableSpace space, String stepnr, String partnr, String splitnr, boolean ziparchive, boolean showSamples)
protected String
buildFilename(org.pentaho.di.core.variables.VariableSpace space, String realFileName, String realExtension, String stepnr, String partnr, String splitnr, Date date, boolean ziparchive, boolean showSamples, BaseFileOutputMeta meta)
String
getDateTimeFormat()
String
getExtension()
String
getFileCompression()
String
getFileName()
String[]
getFilePaths(boolean showSamples)
String[]
getFiles(org.pentaho.di.core.variables.VariableSpace space)
protected String
getPartPrefix()
abstract int
getSplitEvery()
int
getSplitEvery(org.pentaho.di.core.variables.VariableSpace space)
boolean
isDateInFilename()
boolean
isFileAsCommand()
boolean
isPartNrInFilename()
boolean
isSpecifyingFormat()
boolean
isStepNrInFilename()
boolean
isTimeInFilename()
void
setDateTimeFormat(String dateTimeFormat)
void
setExtension(String extension)
void
setFileAsCommand(boolean fileAsCommand)
void
setFileCompression(String fileCompression)
void
setFileName(String fileName)
void
setSpecifyingFormat(boolean specifyingFormat)
abstract void
setSplitEvery(int splitEvery)
-
Methods inherited from class org.pentaho.di.trans.steps.file.BaseFileMeta
passDataToServletOutput, writesToFile
-
Methods inherited from class org.pentaho.di.trans.step.BaseStepMeta
analyseImpact, analyseImpact, cancelQueries, check, check, check, clone, createEntry, excludeFromCopyDistributeVerification, excludeFromRowLayoutVerification, exportResources, exportResources, extractStepMetadataEntries, findAttribute, findParent, findParentEntry, getActiveReferencedObjectDescription, getDescription, getDialogClassName, getFields, getFields, getLog, getLogChannelId, getName, getObjectCopy, getObjectId, getObjectRevision, getObjectType, getOptionalStreams, getParent, getParentStepMeta, getReferencedObjectDescriptions, getRepCode, getRepositoryDirectory, getRequiredFields, getRequiredFields, getResourceDependencies, getSQLStatements, getSQLStatements, getStepInjectionMetadataEntries, getStepIOMeta, getStepIOMeta, getStepMetaInjectionInterface, getSupportedTransformationTypes, getTableFields, getTooltip, getUsedArguments, getUsedDatabaseConnections, getUsedLibraries, getXML, getXmlCode, handleStreamSelection, hasChanged, hasRepositoryReferences, isBasic, isDebug, isDetailed, isReferencedObjectEnabled, isRowLevel, loadReferencedObject, loadReferencedObject, loadStepAttributes, loadXML, loadXML, loadXML, logBasic, logBasic, logDebug, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logMinimal, logRowlevel, logRowlevel, lookupRepositoryReferences, readRep, readRep, readRep, resetStepIoMeta, saveRep, saveRep, searchInfoAndTargetSteps, setChanged, setChanged, setParentStepMeta, setStepIOMeta, supportsErrorHandling
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.di.trans.step.StepMetaInterface
analyseImpact, analyseImpact, cancelQueries, check, check, cleanAfterHopFromRemove, cleanAfterHopFromRemove, cleanAfterHopToRemove, clone, excludeFromCopyDistributeVerification, excludeFromRowLayoutVerification, exportResources, exportResources, extractStepMetadataEntries, fetchTransMeta, getActiveReferencedObjectDescription, getDialogClassName, getFields, getFields, getOptionalStreams, getParentStepMeta, getReferencedObjectDescriptions, getRequiredFields, getResourceDependencies, getSQLStatements, getSQLStatements, getStep, getStepData, getStepIOMeta, getStepMetaInjectionInterface, getSupportedTransformationTypes, getTableFields, getUsedArguments, getUsedDatabaseConnections, getUsedLibraries, getXML, handleStreamSelection, hasChanged, hasRepositoryReferences, isReferencedObjectEnabled, loadReferencedObject, loadXML, loadXML, lookupRepositoryReferences, readRep, readRep, resetStepIoMeta, saveRep, saveRep, searchInfoAndTargetSteps, setChanged, setDefault, setParentStepMeta, supportsErrorHandling
-
-
-
-
Field Detail
-
DEFAULT_DATE_FORMAT
public static final String DEFAULT_DATE_FORMAT
- See Also:
- Constant Field Values
-
DEFAULT_TIME_FORMAT
public static final String DEFAULT_TIME_FORMAT
- See Also:
- Constant Field Values
-
stepNrInFilename
protected boolean stepNrInFilename
Flag: add the stepnr in the filename
-
partNrInFilename
protected boolean partNrInFilename
Flag: add the partition number in the filename
-
dateInFilename
protected boolean dateInFilename
Flag: add the date in the filename
-
timeInFilename
protected boolean timeInFilename
Flag: add the time in the filename
-
extension
protected String extension
The file extention in case of a generated filename
-
fileName
protected String fileName
The base name of the output file
-
-
Method Detail
-
getExtension
public String getExtension()
-
setExtension
public void setExtension(String extension)
-
getFileName
public String getFileName()
-
setFileName
public void setFileName(String fileName)
-
getSplitEvery
public abstract int getSplitEvery()
-
getSplitEvery
public int getSplitEvery(org.pentaho.di.core.variables.VariableSpace space)
-
setSplitEvery
public abstract void setSplitEvery(int splitEvery)
-
isFileAsCommand
public boolean isFileAsCommand()
-
setFileAsCommand
public void setFileAsCommand(boolean fileAsCommand)
-
isSpecifyingFormat
public boolean isSpecifyingFormat()
-
setSpecifyingFormat
public void setSpecifyingFormat(boolean specifyingFormat)
-
getDateTimeFormat
public String getDateTimeFormat()
-
setDateTimeFormat
public void setDateTimeFormat(String dateTimeFormat)
-
isTimeInFilename
public boolean isTimeInFilename()
-
isDateInFilename
public boolean isDateInFilename()
-
isPartNrInFilename
public boolean isPartNrInFilename()
-
isStepNrInFilename
public boolean isStepNrInFilename()
-
getFileCompression
public String getFileCompression()
-
setFileCompression
public void setFileCompression(String fileCompression)
-
getFiles
public String[] getFiles(org.pentaho.di.core.variables.VariableSpace space)
-
getPartPrefix
protected String getPartPrefix()
-
buildFilename
public String buildFilename(org.pentaho.di.core.variables.VariableSpace space, String stepnr, String partnr, String splitnr, boolean ziparchive)
-
buildFilename
public String buildFilename(org.pentaho.di.core.variables.VariableSpace space, String stepnr, String partnr, String splitnr, boolean ziparchive, boolean showSamples)
-
buildFilename
protected String buildFilename(String realFileName, String realExtension, String stepnr, String partnr, String splitnr, Date date, boolean ziparchive, boolean showSamples, BaseFileOutputMeta meta)
-
buildFilename
protected String buildFilename(org.pentaho.di.core.variables.VariableSpace space, String realFileName, String realExtension, String stepnr, String partnr, String splitnr, Date date, boolean ziparchive, boolean showSamples, BaseFileOutputMeta meta)
-
getFilePaths
public String[] getFilePaths(boolean showSamples)
- Specified by:
getFilePaths
in classBaseFileMeta
- Parameters:
showSamples
- determines whether the paths being returned are dummy samples or the "template" representation. The samples woulc include things like sample step number, partition number etc ( filename_0_1.txt) , while the non-sample path would include a token ( filename_<step>_<partition>.<extension>)- Returns:
- An array of file paths
-
-