Package gov.nasa.pds.transform.product
Class Pds3LabelTransformer
- java.lang.Object
-
- gov.nasa.pds.transform.product.DefaultTransformer
-
- gov.nasa.pds.transform.product.Pds3LabelTransformer
-
- All Implemented Interfaces:
ProductTransformer
public class Pds3LabelTransformer extends DefaultTransformer
Class to support transformations given a PDS3 label.- Author:
- mcayanan
-
-
Field Summary
-
Fields inherited from class gov.nasa.pds.transform.product.DefaultTransformer
appendIndexToOutputFile, log, overwriteOutput
-
-
Constructor Summary
Constructors Constructor Description Pds3LabelTransformer(boolean overwrite)Constructor to set the flag to overwrite outputs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetIncludePaths(List<String> i)Set the paths to search for files referenced by pointers.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 url, File outputDir, String format, String dataFile, 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)-
Methods inherited from class gov.nasa.pds.transform.product.DefaultTransformer
transform, transformAll
-
-
-
-
Method Detail
-
transform
public List<File> transform(URL url, File outputDir, String format) throws TransformException, URISyntaxException, Exception
- Specified by:
transformin interfaceProductTransformer- Overrides:
transformin classDefaultTransformer- Throws:
TransformExceptionURISyntaxExceptionException
-
transform
public List<File> transform(File target, File outputDir, String format) throws TransformException
Description copied from interface:ProductTransformerTransform a single target. This will transform the first image/table found within the first data file found.- Specified by:
transformin interfaceProductTransformer- Overrides:
transformin classDefaultTransformer- 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
public List<File> transform(File target, File outputDir, String format, String dataFile, int index) throws TransformException
Description copied from interface:ProductTransformerTransform a single target.- Specified by:
transformin interfaceProductTransformer- Overrides:
transformin classDefaultTransformer- 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
public List<File> transform(URL url, File outputDir, String format, String dataFile, int index) throws TransformException, URISyntaxException, Exception
- Specified by:
transformin interfaceProductTransformer- Specified by:
transformin classDefaultTransformer- Throws:
TransformExceptionURISyntaxExceptionException
-
transformAll
public List<File> transformAll(File target, File outputDir, String format) throws TransformException
Description copied from interface:ProductTransformerTransform all images/tables found in the given target.- Specified by:
transformAllin interfaceProductTransformer- Overrides:
transformAllin classDefaultTransformer- 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
public List<File> transformAll(URL url, File outputDir, String format) throws TransformException, URISyntaxException, Exception
- Specified by:
transformAllin interfaceProductTransformer- Specified by:
transformAllin classDefaultTransformer- Throws:
TransformExceptionURISyntaxExceptionException
-
-