public abstract class DefaultTransformer extends java.lang.Object implements ProductTransformer
Modifier and Type | Field and Description |
---|---|
protected boolean |
appendIndexToOutputFile |
protected static java.util.logging.Logger |
log
logger object.
|
protected boolean |
overwriteOutput
Flag to indicate whether to overwrite an existing output file.
|
Constructor and Description |
---|
DefaultTransformer()
Default constructor.
|
DefaultTransformer(boolean overwrite)
Constructor to set the flag to overwrite outputs.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.io.File> |
transform(java.io.File target,
java.io.File outputDir,
java.lang.String format)
Transform a single target.
|
java.util.List<java.io.File> |
transform(java.io.File target,
java.io.File outputDir,
java.lang.String format,
java.lang.String dataFile,
int index)
Transform a single target.
|
java.util.List<java.io.File> |
transform(java.util.List<java.net.URL> targets,
java.io.File outputDir,
java.lang.String format)
Transform multiple targets.
|
java.util.List<java.io.File> |
transform(java.net.URL url,
java.io.File outputDir,
java.lang.String format) |
abstract java.util.List<java.io.File> |
transform(java.net.URL url,
java.io.File outputDir,
java.lang.String format,
java.lang.String dataFile,
int index) |
java.util.List<java.io.File> |
transformAll(java.io.File target,
java.io.File outputDir,
java.lang.String format)
Transform all images/tables found in the given target.
|
java.util.List<java.io.File> |
transformAll(java.util.List<java.net.URL> targets,
java.io.File outputDir,
java.lang.String format)
Transform all images/tables found in each target.
|
abstract java.util.List<java.io.File> |
transformAll(java.net.URL url,
java.io.File outputDir,
java.lang.String format) |
protected static java.util.logging.Logger log
protected boolean overwriteOutput
protected boolean appendIndexToOutputFile
public DefaultTransformer()
public DefaultTransformer(boolean overwrite)
overwrite
- Set to true to overwrite outputs, false otherwise.public java.util.List<java.io.File> transform(java.io.File target, java.io.File outputDir, java.lang.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 java.util.List<java.io.File> transform(java.net.URL url, java.io.File outputDir, java.lang.String format) throws TransformException, java.net.URISyntaxException, java.lang.Exception
transform
in interface ProductTransformer
TransformException
java.net.URISyntaxException
java.lang.Exception
public java.util.List<java.io.File> transform(java.io.File target, java.io.File outputDir, java.lang.String format, java.lang.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 abstract java.util.List<java.io.File> transform(java.net.URL url, java.io.File outputDir, java.lang.String format, java.lang.String dataFile, int index) throws TransformException, java.net.URISyntaxException, java.lang.Exception
transform
in interface ProductTransformer
TransformException
java.net.URISyntaxException
java.lang.Exception
public java.util.List<java.io.File> transform(java.util.List<java.net.URL> targets, java.io.File outputDir, java.lang.String format) throws TransformException, java.net.URISyntaxException, java.lang.Exception
ProductTransformer
transform
in interface ProductTransformer
targets
- a list of URL 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.java.net.URISyntaxException
java.lang.Exception
public java.util.List<java.io.File> transformAll(java.io.File target, java.io.File outputDir, java.lang.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 abstract java.util.List<java.io.File> transformAll(java.net.URL url, java.io.File outputDir, java.lang.String format) throws TransformException, java.net.URISyntaxException, java.lang.Exception
transformAll
in interface ProductTransformer
TransformException
java.net.URISyntaxException
java.lang.Exception
public java.util.List<java.io.File> transformAll(java.util.List<java.net.URL> targets, java.io.File outputDir, java.lang.String format) throws TransformException, java.net.URISyntaxException, java.lang.Exception
ProductTransformer
transformAll
in interface ProductTransformer
targets
- a list of URL 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.java.net.URISyntaxException
java.lang.Exception
Copyright © 2010-2019 Planetary Data System. All Rights Reserved.