T
- iteration-typeS
- type after any necessary preprocessingpublic abstract class SingleFileTypeGenerator<T,S> extends Object implements TransformingGenerator<T,S>
Generator
that eventually writes only a single file to the filesystem.Constructor and Description |
---|
SingleFileTypeGenerator() |
Modifier and Type | Method and Description |
---|---|
abstract String |
selectFileExtension(OutputWriteSettings settings,
Optional<Logger> logger)
Selects the file/extension to be used for outputting the file.
|
void |
write(T element,
OutputNameStyle outputNameStyle,
ElementOutputter outputter)
Writes a non-indexable output (an output that isn't part of a collection of other similar
items).
|
abstract void |
writeToFile(T element,
OutputWriteSettings settings,
Path filePath) |
void |
writeWithIndex(T element,
String index,
IndexableOutputNameStyle outputNameStyle,
ElementOutputter outputter)
Writes an indexable output (many outputs of the same type, uniquely identified by an index).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
transform
public abstract void writeToFile(T element, OutputWriteSettings settings, Path filePath) throws OutputWriteFailedException
OutputWriteFailedException
public abstract String selectFileExtension(OutputWriteSettings settings, Optional<Logger> logger) throws OperationFailedException
settings
- settings for outputting.logger
- logger for warning for information messages when outputting.OperationFailedException
public void write(T element, OutputNameStyle outputNameStyle, ElementOutputter outputter) throws OutputWriteFailedException
ElementWriter
write
in interface ElementWriter<T>
element
- the element to write.outputNameStyle
- TODOOutputWriteFailedException
public void writeWithIndex(T element, String index, IndexableOutputNameStyle outputNameStyle, ElementOutputter outputter) throws OutputWriteFailedException
ElementWriter
writeWithIndex
in interface ElementWriter<T>
element
- the element to write.index
- TODOOutputWriteFailedException
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.