gov.nasa.pds.transform
Class TransformerFactory

java.lang.Object
  extended by gov.nasa.pds.transform.TransformerFactory

public class TransformerFactory
extends Object

Transformer Factory class that determines whether to transform a PDS3 or PDS4 product.

Author:
mcayanan

Method Summary
static TransformerFactory getInstance()
          Gets an instance of the factory.
 PdsTransformer newInstance(File label, String formatType)
          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 TransformerFactory getInstance()
Gets an instance of the factory.


newInstance

public PdsTransformer newInstance(File label,
                                  String formatType)
                           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:
label - A PDS3 or PDS4 label.
formatType - 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-2013 Planetary Data System. All Rights Reserved.