gov.nasa.pds.transform.product
Class DefaultTransformer

java.lang.Object
  extended by gov.nasa.pds.transform.product.DefaultTransformer
All Implemented Interfaces:
ProductTransformer
Direct Known Subclasses:
Pds3ImageTransformer, Pds3LabelTransformer, Pds4ImageTransformer, Pds4TableTransformer, StylesheetTransformer

public abstract class DefaultTransformer
extends Object
implements ProductTransformer

Default implementation of the ProductTransformer interface.

Author:
mcayanan

Field Summary
protected static Logger log
          logger object.
protected  boolean overwriteOutput
          Flag to indicate whether to overwrite an existing output file.
 
Constructor Summary
DefaultTransformer()
          Default constructor.
DefaultTransformer(boolean overwrite)
          Constructor to set the flag to overwrite outputs.
 
Method Summary
abstract  File transform(File target, File outputDir, String format)
          Transform a single target.
 List<File> transform(List<File> targets, File outputDir, String format)
          Transform multiple targets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Logger log
logger object.


overwriteOutput

protected boolean overwriteOutput
Flag to indicate whether to overwrite an existing output file.

Constructor Detail

DefaultTransformer

public DefaultTransformer()
Default constructor. Sets the flag to overwrite outputs to true.


DefaultTransformer

public DefaultTransformer(boolean overwrite)
Constructor to set the flag to overwrite outputs.

Parameters:
overwrite - Set to true to overwrite outputs, false otherwise.
Method Detail

transform

public List<File> transform(List<File> targets,
                            File outputDir,
                            String format)
                     throws TransformException
Description copied from interface: ProductTransformer
Transform multiple targets.

Specified by:
transform in interface ProductTransformer
Parameters:
targets - a list of file specifications to the PDS labels.
outputDir - directory where the output file will be written.
format - Valid format file type.
Throws:
TransformException

transform

public abstract File transform(File target,
                               File outputDir,
                               String format)
                        throws TransformException
Description copied from interface: ProductTransformer
Transform a single target.

Specified by:
transform in interface ProductTransformer
Parameters:
target - file specification to the PDS label.
outputDir - directory where the output file will be written.
format - Valid format file type.
Throws:
TransformException


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