Package adams.flow.transformer.splitfile
Class AbstractFileSplitterWithBinarySupport
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.splitfile.AbstractFileSplitter
-
- adams.flow.transformer.splitfile.AbstractFileSplitterWithBinarySupport
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,Stoppable,FileSplitter,FileSplitterWithBinarySupport,Serializable
- Direct Known Subclasses:
SplitByNumber,SplitBySize
public abstract class AbstractFileSplitterWithBinarySupport extends AbstractFileSplitter implements FileSplitterWithBinarySupport
Ancestor for file splitters that support binary files as well.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_BufferSizethe buffer size.protected FileTypem_FileTypethe file type.-
Fields inherited from class adams.flow.transformer.splitfile.AbstractFileSplitter
m_Extension, m_Generated, m_NumDigits, m_Prefix, m_Stopped
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractFileSplitterWithBinarySupport()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringbufferSizeTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected voiddoSplit(PlaceholderFile file)Performs the actual splitting of the file.protected abstract voiddoSplitBinary(PlaceholderFile file)Performs the actual splitting of the binary file.protected abstract voiddoSplitText(PlaceholderFile file)Performs the actual splitting of the text file.StringfileTypeTipText()Returns the tip text for this property.intgetBufferSize()Get output file.FileTypegetFileType()Returns how to process the files.StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.voidsetBufferSize(int value)Sets the size of the buffer.voidsetFileType(FileType value)Sets how to process the files.-
Methods inherited from class adams.flow.transformer.splitfile.AbstractFileSplitter
check, extensionTipText, getExtension, getNumDigits, getPrefix, nextFile, numDigitsTipText, prefixTipText, reset, setExtension, setNumDigits, setPrefix, split, stopExecution
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.flow.transformer.splitfile.FileSplitter
extensionTipText, getExtension, getNumDigits, getPrefix, numDigitsTipText, prefixTipText, setExtension, setNumDigits, setPrefix, split
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
Methods inherited from interface adams.core.Stoppable
stopExecution
-
-
-
-
Field Detail
-
m_FileType
protected FileType m_FileType
the file type.
-
m_BufferSize
protected int m_BufferSize
the buffer size.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractFileSplitter
-
setFileType
public void setFileType(FileType value)
Sets how to process the files.- Specified by:
setFileTypein interfaceFileSplitterWithBinarySupport- Parameters:
value- the type of file
-
getFileType
public FileType getFileType()
Returns how to process the files.- Specified by:
getFileTypein interfaceFileSplitterWithBinarySupport- Returns:
- the type of file
-
fileTypeTipText
public String fileTypeTipText()
Returns the tip text for this property.- Specified by:
fileTypeTipTextin interfaceFileSplitterWithBinarySupport- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setBufferSize
public void setBufferSize(int value)
Sets the size of the buffer.- Specified by:
setBufferSizein interfaceFileSplitterWithBinarySupport- Parameters:
value- the size
-
getBufferSize
public int getBufferSize()
Get output file.- Specified by:
getBufferSizein interfaceFileSplitterWithBinarySupport- Returns:
- file
-
bufferSizeTipText
public String bufferSizeTipText()
Returns the tip text for this property.- Specified by:
bufferSizeTipTextin interfaceFileSplitterWithBinarySupport- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractFileSplitter- Returns:
- null if no info available, otherwise short string
-
doSplitText
protected abstract void doSplitText(PlaceholderFile file)
Performs the actual splitting of the text file.- Parameters:
file- the file to split
-
doSplitBinary
protected abstract void doSplitBinary(PlaceholderFile file)
Performs the actual splitting of the binary file.- Parameters:
file- the file to split
-
doSplit
protected void doSplit(PlaceholderFile file)
Performs the actual splitting of the file.- Specified by:
doSplitin classAbstractFileSplitter- Parameters:
file- the file to split
-
-