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 booleandateInFilenameFlag: add the date in the filenamestatic StringDEFAULT_DATE_FORMATstatic StringDEFAULT_TIME_FORMATprotected StringextensionThe file extention in case of a generated filenameprotected StringfileNameThe base name of the output fileprotected booleanpartNrInFilenameFlag: add the partition number in the filenameprotected booleanstepNrInFilenameFlag: add the stepnr in the filenameprotected booleantimeInFilenameFlag: 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 StringbuildFilename(String realFileName, String realExtension, String stepnr, String partnr, String splitnr, Date date, boolean ziparchive, boolean showSamples, BaseFileOutputMeta meta)StringbuildFilename(org.pentaho.di.core.variables.VariableSpace space, String stepnr, String partnr, String splitnr, boolean ziparchive)StringbuildFilename(org.pentaho.di.core.variables.VariableSpace space, String stepnr, String partnr, String splitnr, boolean ziparchive, boolean showSamples)protected StringbuildFilename(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)StringgetDateTimeFormat()StringgetExtension()StringgetFileCompression()StringgetFileName()String[]getFilePaths(boolean showSamples)String[]getFiles(org.pentaho.di.core.variables.VariableSpace space)protected StringgetPartPrefix()abstract intgetSplitEvery()intgetSplitEvery(org.pentaho.di.core.variables.VariableSpace space)booleanisDateInFilename()booleanisFileAsCommand()booleanisPartNrInFilename()booleanisSpecifyingFormat()booleanisStepNrInFilename()booleanisTimeInFilename()voidsetDateTimeFormat(String dateTimeFormat)voidsetExtension(String extension)voidsetFileAsCommand(boolean fileAsCommand)voidsetFileCompression(String fileCompression)voidsetFileName(String fileName)voidsetSpecifyingFormat(boolean specifyingFormat)abstract voidsetSplitEvery(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:
getFilePathsin 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
-
-