|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.transform.product.DefaultTransformer
public abstract class DefaultTransformer
Default implementation of the ProductTransformer interface.
Field Summary | |
---|---|
protected boolean |
appendIndexToOutputFile
|
protected static Logger |
log
logger object. |
protected boolean |
overwriteOutput
Flag to indicate whether to overwrite an existing output file. |
Constructor Summary | |
---|---|
DefaultTransformer()
Default constructor. |
|
DefaultTransformer(boolean overwrite)
Constructor to set the flag to overwrite outputs. |
Method Summary | |
---|---|
File |
transform(File target,
File outputDir,
String format)
Transform a single target. |
abstract File |
transform(File target,
File outputDir,
String format,
String dataFile,
int index)
Transform a single target. |
List<File> |
transform(List<File> targets,
File outputDir,
String format)
Transform multiple targets. |
abstract List<File> |
transformAll(File target,
File outputDir,
String format)
Transform all images/tables found in the given target. |
List<File> |
transformAll(List<File> targets,
File outputDir,
String format)
Transform all images/tables found in each target. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Logger log
protected boolean overwriteOutput
protected boolean appendIndexToOutputFile
Constructor Detail |
---|
public DefaultTransformer()
public DefaultTransformer(boolean overwrite)
overwrite
- Set to true to overwrite outputs, false otherwise.Method Detail |
---|
public File transform(File target, File outputDir, String format) throws TransformException
ProductTransformer
transform
in interface ProductTransformer
target
- file specification to the PDS label.outputDir
- directory where the output file will be
written.format
- Valid format file type.
TransformException
- If an error occurred during the
transformation process.public abstract File transform(File target, File outputDir, String format, String dataFile, int index) throws TransformException
ProductTransformer
transform
in interface ProductTransformer
target
- file specification to the PDS label.outputDir
- directory where the output file will be written.format
- Valid format file type.dataFile
- Tells the tool which data file to transform.
If this argument is an empty string, the default is to transform
the first data file found in the label.index
- The index of the data. This tells the tool which image
or table to transform if there are multiple images/tables within a
single data file.
TransformException
- If an error occurred during the
transformation process.public List<File> transform(List<File> targets, File outputDir, String format) throws TransformException
ProductTransformer
transform
in interface ProductTransformer
targets
- a list of file specifications to the PDS labels.outputDir
- directory where the output file will be
written.format
- Valid format file type.
TransformException
- If an error occurred during the
transformation process.public abstract List<File> transformAll(File target, File outputDir, String format) throws TransformException
ProductTransformer
transformAll
in interface ProductTransformer
target
- file specification to the PDS label.outputDir
- directory where the output file will be written.format
- Valid format file type.
TransformException
- If an error occurred during the
transformation process.public List<File> transformAll(List<File> targets, File outputDir, String format) throws TransformException
ProductTransformer
transformAll
in interface ProductTransformer
targets
- a list of file specifications to the PDS labels.outputDir
- directory where the output file will be written.format
- Valid format file type.
TransformException
- If an error occurred during the
transformation process.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |