Package gov.nasa.pds.transform.product
Class ProductTransformerFactory
- java.lang.Object
-
- gov.nasa.pds.transform.product.ProductTransformerFactory
-
public class ProductTransformerFactory extends Object
Transformer Factory class that determines whether to transform a PDS3 or PDS4 product.- Author:
- mcayanan
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProductTransformerFactorygetInstance()Gets an instance of the factory.ProductTransformernewInstance(File target, String format)Gets an instance of a Transformer.ProductTransformernewInstance(URL target, String format)
-
-
-
Method Detail
-
getInstance
public static ProductTransformerFactory getInstance()
Gets an instance of the factory.
-
newInstance
public ProductTransformer newInstance(File target, String format) throws TransformException
Gets an instance of a Transformer. If the given label ends in ".xml", then this will return a PDS4 Transformer object. Otherwise, a PDS3 Transformer object will be returned.- Parameters:
target- A PDS3 or PDS4 label file.format- The transformation format.- Returns:
- The appropriate Transformer object.
- Throws:
TransformException- If the input label could not be opened or the format type is not one of the valid formats.
-
newInstance
public ProductTransformer newInstance(URL target, String format) throws TransformException
- Throws:
TransformException
-
-