Class ExporterFactory

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

public class ExporterFactory extends Object
Factory pattern class to create specific object exporters.
Author:
dcberrio
  • Method Details

    • 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
    • get2DImageExporter

      public static TwoDImageExporter get2DImageExporter(URL 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
    • get3DImageExporter

      public static ThreeDImageExporter get3DImageExporter(File label, int fileAreaIndex) throws Exception
      Gets an instance of an Array3DImage exporter.
      Parameters:
      label - the PDS label file.
      fileAreaIndex - the file area inside the label containing the data to export.
      Returns:
      an instance of a ThreeDImageExporter.
      Throws:
      Exception
    • get3DImageExporter

      public static ThreeDImageExporter get3DImageExporter(URL label, int fileAreaIndex) throws Exception
      Gets an instance of an Array3DImage exporter.
      Parameters:
      label - the PDS label file.
      fileAreaIndex - the file area inside the label containing the data to export.
      Returns:
      an instance of a ThreeDImageExporter.
      Throws:
      Exception
    • get3DSpectrumExporter

      public static ThreeDSpectrumExporter get3DSpectrumExporter(File label, int fileAreaIndex) throws Exception
      Gets an instance of an Array3DSpectrum exporter.
      Parameters:
      label - the PDS label file.
      fileAreaIndex - the file area inside the label containing the data to export.
      Returns:
      an instance of a ThreeDSpectrumExporter.
      Throws:
      Exception
    • get3DSpectrumExporter

      public static ThreeDSpectrumExporter get3DSpectrumExporter(URL label, int fileAreaIndex) throws Exception
      Gets an instance of an Array3DSpectrum exporter.
      Parameters:
      label - the PDS label file.
      fileAreaIndex - the file area inside the label containing the data to export.
      Returns:
      an instance of a ThreeDSpectrumExporter.
      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
    • getTableExporter

      public static TableExporter getTableExporter(URL 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
    • get3DImageExporter

      public static ThreeDImageExporter get3DImageExporter(FileAreaObservational fileArea, ObjectProvider provider) throws Exception
      Gets an instance of an Array3DImage 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 ThreeDImageExporter.
      Throws:
      Exception
    • get3DSpectrumExporter

      public static ThreeDSpectrumExporter get3DSpectrumExporter(FileAreaObservational fileArea, ObjectProvider provider) throws Exception
      Gets an instance of an Array3DSpectrum 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 ThreeDSpectrumExporter.
      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
    • getTableReader

      public static TableReader getTableReader(Object tableObject, URL 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
    • getRawTableReader

      public static TableReader getRawTableReader(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
    • getRawTableReader

      public static RawTableReader getRawTableReader(Object tableObject, URL dataFile, DataObjectLocation location) 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