gov.nasa.pds.transform.product
Class ProductTransformerFactory

java.lang.Object
  extended by 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
static ProductTransformerFactory getInstance()
          Gets an instance of the factory.
 ProductTransformer newInstance(File target, String format)
          Gets an instance of a Transformer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.


Copyright © 2010–2014 Planetary Data System. All rights reserved.