Class NamedProviderOutputter<T>
Object
NamedProviderOutputter<T>
- Type Parameters:
T
- element-type inGenerator
and inNamedProvider
.
Outputs entities from a
NamedProvider
into a directory using the names of each entity for
a corresponding generated file.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionNamedProviderOutputter
(NamedProvider<T> provider, Generator<T> generator, OutputterChecked outputter) Creates a newNamedProviderOutputter
instance. -
Method Summary
-
Constructor Details
-
NamedProviderOutputter
public NamedProviderOutputter(NamedProvider<T> provider, Generator<T> generator, OutputterChecked outputter) Creates a newNamedProviderOutputter
instance.- Parameters:
provider
- TheNamedProvider
whose entities (or a subselection thereof) will be written to the file-system.generator
- The generator to be repeatedly called for writing each element in the sequence.outputter
- The root directory where writing occurs to, and in which the sub-directories are created, if enabled.
-
-
Method Details
-
output
public void output(String outputName, boolean suppressSubdirectory) throws OutputWriteFailedException Outputs the entities using a particular output-name.- Parameters:
outputName
- the output-name to use, which also determines the subdirectory name if it is not suppressed.suppressSubdirectory
- if true, a separate subdirectory is not created, and rather the outputs occur in the parent directory.- Throws:
OutputWriteFailedException
- if any output cannot be written.
-