Package adams.data.io.output
Interface DataContainerWriter<T extends DataContainer>
-
- Type Parameters:
T
- the type of data to handle
- All Superinterfaces:
AdditionalInformationHandler
,CleanUpHandler
,Comparable
,Destroyable
,FileFormatHandler
,OptionHandler
,ShallowCopySupporter<DataContainerWriter>
- All Known Subinterfaces:
CompressionSupporter<T>
,StreamableBinaryDataContainerWriter<T>
,StreamableDataContainerWriter<T>
,StreamableTextBasedDataContainerWriter<T>
- All Known Implementing Classes:
AbstractDataContainerWriter
,AbstractTimeseriesWriter
,DataContainerToByteArray.DummyWriter
,DataContainerToString.DummyWriter
,SimpleTimeseriesWriter
,SpreadSheetTimeseriesWriter
public interface DataContainerWriter<T extends DataContainer> extends OptionHandler, Comparable, CleanUpHandler, ShallowCopySupporter<DataContainerWriter>, FileFormatHandler, AdditionalInformationHandler
Interface for writers that write data containers to files in various formats.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canWriteMultiple()
Returns whether writing of multiple containers is supported.PlaceholderFile
getOutput()
The file/directory to write to.boolean
isOutputFile()
Returns whether the output needs to be a file or directory.String
outputTipText()
Returns the tip text for this property.void
setOutput(PlaceholderFile value)
Sets the file/directory to write to.boolean
write(List<T> data)
Performs checks and writes the data.boolean
write(T data)
Performs checks and writes the data.-
Methods inherited from interface adams.core.AdditionalInformationHandler
getAdditionalInformation
-
Methods inherited from interface adams.core.CleanUpHandler
cleanUp
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.io.FileFormatHandler
getDefaultFormatExtension, getFormatDescription, getFormatExtensions
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
Methods inherited from interface adams.core.ShallowCopySupporter
shallowCopy, shallowCopy
-
-
-
-
Method Detail
-
isOutputFile
boolean isOutputFile()
Returns whether the output needs to be a file or directory.- Returns:
- true if the output needs to be a file, a directory otherwise
-
setOutput
void setOutput(PlaceholderFile value)
Sets the file/directory to write to.- Parameters:
value
- the file/directory to write to
-
getOutput
PlaceholderFile getOutput()
The file/directory to write to.- Returns:
- the file/directory to write to
-
outputTipText
String outputTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
canWriteMultiple
boolean canWriteMultiple()
Returns whether writing of multiple containers is supported.- Returns:
- true if multiple containers are supported
-
write
boolean write(T data)
Performs checks and writes the data.- Parameters:
data
- the data to write- Returns:
- true if successfully written
- See Also:
write(List)
-
-