public class Pds4TableTransformer extends DefaultTransformer
appendIndexToOutputFile, log, overwriteOutput
Constructor and Description |
---|
Pds4TableTransformer(boolean overwrite)
Constructor to set the flag to overwrite outputs.
|
Modifier and Type | Method and Description |
---|---|
void |
setDataFileBasePath(String base) |
File |
transform(File target,
File outputDir,
String format,
String dataFileName,
int index)
Transform the given label.
|
File |
transform(URL url,
File outputDir,
String format,
String dataFileName,
int index) |
List<File> |
transformAll(File target,
File outputDir,
String format)
Transform all images/tables found in the given target.
|
List<File> |
transformAll(URL url,
File outputDir,
String format) |
transform, transform, transform, transformAll
public Pds4TableTransformer(boolean overwrite)
overwrite
- Set to true to overwrite outputs, false otherwise.public File transform(File target, File outputDir, String format, String dataFileName, int index) throws TransformException
transform
in interface ProductTransformer
transform
in class DefaultTransformer
target
- The PDS4 xml label file.outputDir
- The output directory.format
- the format type.dataFileName
- 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 transformation.ParseException
- If there were errors parsing the given label.public File transform(URL url, File outputDir, String format, String dataFileName, int index) throws TransformException, URISyntaxException, Exception
transform
in interface ProductTransformer
transform
in class DefaultTransformer
TransformException
URISyntaxException
Exception
public List<File> transformAll(URL url, File outputDir, String format) throws TransformException
transformAll
in interface ProductTransformer
transformAll
in class DefaultTransformer
TransformException
public List<File> transformAll(File target, File outputDir, String format) throws TransformException
ProductTransformer
transformAll
in interface ProductTransformer
transformAll
in class DefaultTransformer
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 void setDataFileBasePath(String base)
Copyright © 2010–2017 Planetary Data System. All rights reserved.