gov.nasa.pds.objectAccess
Class ExporterFactory

java.lang.Object
  extended by gov.nasa.pds.objectAccess.ExporterFactory

public class ExporterFactory
extends Object

Factory pattern class to create specific object exporters.

Author:
dcberrio

Method Summary
static TwoDImageExporter get2DImageExporter(FileAreaObservational fileArea, ObjectProvider provider)
          Gets an instance of a Array2DImage exporter.
static TwoDImageExporter get2DImageExporter(File label, int fileAreaIndex)
          Gets an instance of a Array2DImage exporter.
static TableExporter getTableExporter(FileAreaObservational fileArea, ObjectProvider provider)
          Gets an instance of a Table exporter.
static TableExporter getTableExporter(File label, int fileAreaIndex)
          Gets an instance of a Table exporter.
static TableReader getTableReader(Object tableObject, File dataFile)
          Gets a table reader object for a given table and data file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get2DImageExporter

public static TwoDImageExporter get2DImageExporter(File label,
                                                   int fileAreaIndex)
                                            throws Exception
Gets an instance of a Array2DImage exporter.

Parameters:
label - the PDS label file
fileAreaIndex - the file area inside the label containing the data to export
Returns:
an instance of a TwoDImageExporter
Throws:
Exception

getTableExporter

public static TableExporter getTableExporter(File label,
                                             int fileAreaIndex)
                                      throws Exception
Gets an instance of a Table exporter.

Parameters:
label - the PDS label file
fileAreaIndex - the file area inside the label containing the data to export
Returns:
an instance of a TableExporter
Throws:
Exception

get2DImageExporter

public static TwoDImageExporter get2DImageExporter(FileAreaObservational fileArea,
                                                   ObjectProvider provider)
                                            throws Exception
Gets an instance of a Array2DImage exporter.

Parameters:
fileArea - the file area object containing the data to export
provider - the object provider pointing to the PDS4 label
Returns:
an instance of a TwoDImageExporter
Throws:
Exception

getTableExporter

public static TableExporter getTableExporter(FileAreaObservational fileArea,
                                             ObjectProvider provider)
                                      throws Exception
Gets an instance of a Table exporter.

Parameters:
fileArea - the file area object containing the data to export
provider - the object provider pointing to the PDS4 label
Returns:
an instance of a TableExporter
Throws:
Exception

getTableReader

public static TableReader getTableReader(Object tableObject,
                                         File dataFile)
                                  throws Exception
Gets a table reader object for a given table and data file.

Parameters:
tableObject - the table object, binary, character, or delimited
dataFile - the data file containing the table
Returns:
a table reader for the table
Throws:
Exception - if there is an error reading the file


Copyright © 2013. All Rights Reserved.