Package gov.nasa.pds.objectAccess
Class ExporterFactory
- java.lang.Object
-
- gov.nasa.pds.objectAccess.ExporterFactory
-
public class ExporterFactory extends java.lang.Object
Factory pattern class to create specific object exporters.- Author:
- dcberrio
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TwoDImageExporter
get2DImageExporter(FileAreaObservational fileArea, ObjectProvider provider)
Gets an instance of a Array2DImage exporter.static TwoDImageExporter
get2DImageExporter(java.io.File label, int fileAreaIndex)
Gets an instance of a Array2DImage exporter.static TwoDImageExporter
get2DImageExporter(java.net.URL label, int fileAreaIndex)
Gets an instance of a Array2DImage exporter.static ThreeDImageExporter
get3DImageExporter(FileAreaObservational fileArea, ObjectProvider provider)
Gets an instance of an Array3DImage exporter.static ThreeDImageExporter
get3DImageExporter(java.io.File label, int fileAreaIndex)
Gets an instance of an Array3DImage exporter.static ThreeDImageExporter
get3DImageExporter(java.net.URL label, int fileAreaIndex)
Gets an instance of an Array3DImage exporter.static ThreeDSpectrumExporter
get3DSpectrumExporter(FileAreaObservational fileArea, ObjectProvider provider)
Gets an instance of an Array3DSpectrum exporter.static ThreeDSpectrumExporter
get3DSpectrumExporter(java.io.File label, int fileAreaIndex)
Gets an instance of an Array3DSpectrum exporter.static ThreeDSpectrumExporter
get3DSpectrumExporter(java.net.URL label, int fileAreaIndex)
Gets an instance of an Array3DSpectrum exporter.static TableReader
getRawTableReader(java.lang.Object tableObject, java.io.File dataFile)
Gets a table reader object for a given table and data file.static RawTableReader
getRawTableReader(java.lang.Object tableObject, java.net.URL dataFile, DataObjectLocation location)
Gets a table reader object for a given table and data file.static TableExporter
getTableExporter(FileAreaObservational fileArea, ObjectProvider provider)
Gets an instance of a Table exporter.static TableExporter
getTableExporter(java.io.File label, int fileAreaIndex)
Gets an instance of a Table exporter.static TableExporter
getTableExporter(java.net.URL label, int fileAreaIndex)
Gets an instance of a Table exporter.static TableReader
getTableReader(java.lang.Object tableObject, java.io.File dataFile)
Gets a table reader object for a given table and data file.static TableReader
getTableReader(java.lang.Object tableObject, java.net.URL dataFile)
Gets a table reader object for a given table and data file.
-
-
-
Method Detail
-
get2DImageExporter
public static TwoDImageExporter get2DImageExporter(java.io.File label, int fileAreaIndex) throws java.lang.Exception
Gets an instance of a Array2DImage exporter.- Parameters:
label
- the PDS label filefileAreaIndex
- the file area inside the label containing the data to export- Returns:
- an instance of a TwoDImageExporter
- Throws:
java.lang.Exception
-
get2DImageExporter
public static TwoDImageExporter get2DImageExporter(java.net.URL label, int fileAreaIndex) throws java.lang.Exception
Gets an instance of a Array2DImage exporter.- Parameters:
label
- the PDS label filefileAreaIndex
- the file area inside the label containing the data to export- Returns:
- an instance of a TwoDImageExporter
- Throws:
java.lang.Exception
-
get3DImageExporter
public static ThreeDImageExporter get3DImageExporter(java.io.File label, int fileAreaIndex) throws java.lang.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:
java.lang.Exception
-
get3DImageExporter
public static ThreeDImageExporter get3DImageExporter(java.net.URL label, int fileAreaIndex) throws java.lang.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:
java.lang.Exception
-
get3DSpectrumExporter
public static ThreeDSpectrumExporter get3DSpectrumExporter(java.io.File label, int fileAreaIndex) throws java.lang.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:
java.lang.Exception
-
get3DSpectrumExporter
public static ThreeDSpectrumExporter get3DSpectrumExporter(java.net.URL label, int fileAreaIndex) throws java.lang.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:
java.lang.Exception
-
getTableExporter
public static TableExporter getTableExporter(java.io.File label, int fileAreaIndex) throws java.lang.Exception
Gets an instance of a Table exporter.- Parameters:
label
- the PDS label filefileAreaIndex
- the file area inside the label containing the data to export- Returns:
- an instance of a TableExporter
- Throws:
java.lang.Exception
-
getTableExporter
public static TableExporter getTableExporter(java.net.URL label, int fileAreaIndex) throws java.lang.Exception
Gets an instance of a Table exporter.- Parameters:
label
- the PDS label filefileAreaIndex
- the file area inside the label containing the data to export- Returns:
- an instance of a TableExporter
- Throws:
java.lang.Exception
-
get2DImageExporter
public static TwoDImageExporter get2DImageExporter(FileAreaObservational fileArea, ObjectProvider provider) throws java.lang.Exception
Gets an instance of a Array2DImage exporter.- Parameters:
fileArea
- the file area object containing the data to exportprovider
- the object provider pointing to the PDS4 label- Returns:
- an instance of a TwoDImageExporter
- Throws:
java.lang.Exception
-
get3DImageExporter
public static ThreeDImageExporter get3DImageExporter(FileAreaObservational fileArea, ObjectProvider provider) throws java.lang.Exception
Gets an instance of an Array3DImage exporter.- Parameters:
fileArea
- the file area object containing the data to exportprovider
- the object provider pointing to the PDS4 label- Returns:
- an instance of a ThreeDImageExporter.
- Throws:
java.lang.Exception
-
get3DSpectrumExporter
public static ThreeDSpectrumExporter get3DSpectrumExporter(FileAreaObservational fileArea, ObjectProvider provider) throws java.lang.Exception
Gets an instance of an Array3DSpectrum exporter.- Parameters:
fileArea
- the file area object containing the data to exportprovider
- the object provider pointing to the PDS4 label- Returns:
- an instance of a ThreeDSpectrumExporter.
- Throws:
java.lang.Exception
-
getTableExporter
public static TableExporter getTableExporter(FileAreaObservational fileArea, ObjectProvider provider) throws java.lang.Exception
Gets an instance of a Table exporter.- Parameters:
fileArea
- the file area object containing the data to exportprovider
- the object provider pointing to the PDS4 label- Returns:
- an instance of a TableExporter
- Throws:
java.lang.Exception
-
getTableReader
public static TableReader getTableReader(java.lang.Object tableObject, java.io.File dataFile) throws java.lang.Exception
Gets a table reader object for a given table and data file.- Parameters:
tableObject
- the table object, binary, character, or delimiteddataFile
- the data file containing the table- Returns:
- a table reader for the table
- Throws:
java.lang.Exception
- if there is an error reading the file
-
getTableReader
public static TableReader getTableReader(java.lang.Object tableObject, java.net.URL dataFile) throws java.lang.Exception
Gets a table reader object for a given table and data file.- Parameters:
tableObject
- the table object, binary, character, or delimiteddataFile
- the data file containing the table- Returns:
- a table reader for the table
- Throws:
java.lang.Exception
- if there is an error reading the file
-
getRawTableReader
public static TableReader getRawTableReader(java.lang.Object tableObject, java.io.File dataFile) throws java.lang.Exception
Gets a table reader object for a given table and data file.- Parameters:
tableObject
- the table object, binary, character, or delimiteddataFile
- the data file containing the table- Returns:
- a table reader for the table
- Throws:
java.lang.Exception
- if there is an error reading the file
-
getRawTableReader
public static RawTableReader getRawTableReader(java.lang.Object tableObject, java.net.URL dataFile, DataObjectLocation location) throws java.lang.Exception
Gets a table reader object for a given table and data file.- Parameters:
tableObject
- the table object, binary, character, or delimiteddataFile
- the data file containing the table- Returns:
- a table reader for the table
- Throws:
java.lang.Exception
- if there is an error reading the file
-
-