Class XStreamGenerator<T>
Object
SingleFileTypeGenerator<T,T>
OneStageGenerator<T>
SerializedGenerator<T>
XStreamGenerator<T>
- Type Parameters:
T- iteration-type
- All Implemented Interfaces:
Generator<T>,TransformingGenerator<T,,T> ElementWriter<T>
A generator that serialized using the XStream library
and format.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringextensionSuffix(OutputWriteSettings outputWriteSettings) Appended to the standard "serialized" extension, to form the complete extension.voidwriteToFile(T element, OutputWriteSettings settings, Path filePath) Write generated content for {code element} to the filefilePath.Methods inherited from class org.anchoranalysis.io.generator.serialized.SerializedGenerator
selectFileExtensionMethods inherited from class org.anchoranalysis.io.generator.OneStageGenerator
transformMethods inherited from class org.anchoranalysis.io.generator.SingleFileTypeGenerator
write, writeWithIndex
-
Constructor Details
-
XStreamGenerator
public XStreamGenerator()
-
-
Method Details
-
writeToFile
public void writeToFile(T element, OutputWriteSettings settings, Path filePath) throws OutputWriteFailedException Description copied from class:SingleFileTypeGeneratorWrite generated content for {code element} to the filefilePath.This function deliberately leaves ambiguity over what occurs if a file already exists at
filePath.- Specified by:
writeToFilein classSingleFileTypeGenerator<T,T> - Parameters:
element- element to be assigned and then transformed.settings- settings for outputting.filePath- the path to the file to write to.- Throws:
OutputWriteFailedException- if the content cannot be written successfully.
-
extensionSuffix
Description copied from class:SerializedGeneratorAppended to the standard "serialized" extension, to form the complete extension.- Specified by:
extensionSuffixin classSerializedGenerator<T>- Parameters:
outputWriteSettings- the associatedOutputWriteSettings.- Returns:
- the suffix for the extension including any leading period, when appropriate. This may be the empty string if no suffix exists.
-