Package gov.nasa.pds.transform.product
Interface ProductTransformer
-
- All Known Implementing Classes:
DefaultTransformer,Pds3ImageTransformer,Pds3LabelTransformer,Pds3TableTransformer,Pds4ImageTransformer,Pds4LabelTransformer,Pds4TableTransformer,StylesheetTransformer
public interface ProductTransformerInterface to perform transformations on PDS data products.- Author:
- mcayanan
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<File>transform(File target, File outputDir, String format)Transform a single target.List<File>transform(File target, File outputDir, String format, String dataFile, int index)Transform a single target.List<File>transform(URL url, File outputDir, String format)List<File>transform(URL target, File outputDir, String format, String dataFile, int index)List<File>transform(List<URL> targets, File outputDir, String format)Transform multiple targets.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)List<File>transformAll(List<URL> targets, File outputDir, String format)Transform all images/tables found in each target.
-
-
-
Method Detail
-
transform
List<File> transform(File target, File outputDir, String format) throws TransformException
Transform a single target. This will transform the first image/table found within the first data file found.- Parameters:
target- file specification to the PDS label.outputDir- directory where the output file will be written.format- Valid format file type.- Returns:
- The resulting output file.
- Throws:
TransformException- If an error occurred during the transformation process.
-
transform
List<File> transform(URL url, File outputDir, String format) throws TransformException, URISyntaxException, Exception
-
transform
List<File> transform(File target, File outputDir, String format, String dataFile, int index) throws TransformException
Transform a single target.- Parameters:
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.- Returns:
- The resulting output file.
- Throws:
TransformException- If an error occurred during the transformation process.
-
transform
List<File> transform(URL target, File outputDir, String format, String dataFile, int index) throws TransformException, URISyntaxException, Exception
-
transform
List<File> transform(List<URL> targets, File outputDir, String format) throws TransformException, URISyntaxException, Exception
Transform multiple targets. This will transform the first image/table found within the first data file found in each target.- Parameters:
targets- a list of URL specifications to the PDS labels.outputDir- directory where the output file will be written.format- Valid format file type.- Returns:
- The resulting output files.
- Throws:
TransformException- If an error occurred during the transformation process.URISyntaxExceptionException
-
transformAll
List<File> transformAll(File target, File outputDir, String format) throws TransformException
Transform all images/tables found in the given target.- Parameters:
target- file specification to the PDS label.outputDir- directory where the output file will be written.format- Valid format file type.- Returns:
- The resulting output files.
- Throws:
TransformException- If an error occurred during the transformation process.
-
transformAll
List<File> transformAll(URL url, File outputDir, String format) throws TransformException, URISyntaxException, Exception
-
transformAll
List<File> transformAll(List<URL> targets, File outputDir, String format) throws TransformException, URISyntaxException, Exception
Transform all images/tables found in each target.- Parameters:
targets- a list of URL specifications to the PDS labels.outputDir- directory where the output file will be written.format- Valid format file type.- Returns:
- The resulting output files.
- Throws:
TransformException- If an error occurred during the transformation process.URISyntaxExceptionException
-
-