Package hec.util.transformation.core
Class DataTransformer
java.lang.Object
hec.util.transformation.core.DataTransformer
This class acts as the glue between the Reader, and Writer implementations and uses dependency
injection in order to identify the Reader and Writer given a Controller class.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Controller>
booleanrun
(T controller) Given a controller, this will retrieve the reader and writer for the Controller class type and read the data, then transform it to its new location.
-
Method Details
-
run
Given a controller, this will retrieve the reader and writer for the Controller class type and read the data, then transform it to its new location.- Type Parameters:
T
- Type of controller, this is required to extend Controller.- Parameters:
controller
- Class for controlling the input and output data such as files to read, and files to write.- Returns:
- Returns a true flag in the event that it was a successful write, and a false flag is returned if anything goes wrong.
- Throws:
DataTransformationException
- This exception will be thrown in the event that something bad happened. This can be an issue with the reader, or writer, or with the data setup. If a data setup issue happens, this can be due to an incorrect use of the Annotations, or possibly a service file is missing from your jar. These are necessary for the service lookup to occur.
-