Package gov.nasa.pds.objectAccess
Class ImageExporter
- java.lang.Object
-
- gov.nasa.pds.objectAccess.ObjectExporter
-
- gov.nasa.pds.objectAccess.ImageExporter
-
- Direct Known Subclasses:
ThreeDImageExporter
,ThreeDSpectrumExporter
,TwoDImageExporter
public abstract class ImageExporter extends ObjectExporter
Super class for all image exporter types.- Author:
- mcayanan
-
-
Constructor Summary
Constructors Constructor Description ImageExporter(FileAreaObservational fileArea, ObjectProvider provider)
Constructor.ImageExporter(java.io.File label, int fileAreaIndex)
Constructor.ImageExporter(java.io.File label, java.lang.String dataFile)
Constructor.ImageExporter(java.net.URL label, int fileAreaIndex)
Constructor.ImageExporter(java.net.URL label, java.lang.String dataFile)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DisplaySettings
getDisplaySettings(java.lang.String id)
Get the display settings associated with the given identifier.protected void
parseLabel(java.io.File label, int fileAreaIndex)
protected void
parseLabel(java.io.File label, java.lang.String dataFile)
Parse the label.protected void
parseLabel(java.net.URL label, int fileAreaIndex)
Parse the label.protected void
parseLabel(java.net.URL label, java.lang.String dataFile)
Parse the label.void
setDisplaySettings(java.util.List<DisplaySettings> displaySettings)
Set the display settings.-
Methods inherited from class gov.nasa.pds.objectAccess.ObjectExporter
getObjectProvider, getObservationalFileArea, setObjectProvider, setObservationalFileArea
-
-
-
-
Constructor Detail
-
ImageExporter
public ImageExporter(java.io.File label, java.lang.String dataFile) throws java.lang.Exception
Constructor.- Parameters:
label
- label file.dataFile
- data file referenced by the given label- Throws:
java.lang.Exception
- If there was an error parsing the label
-
ImageExporter
public ImageExporter(java.net.URL label, java.lang.String dataFile) throws java.lang.Exception
Constructor.- Parameters:
label
- label file url.dataFile
- data file referenced by the given label- Throws:
java.lang.Exception
- If there was an error parsing the label
-
ImageExporter
public ImageExporter(java.io.File label, int fileAreaIndex) throws java.lang.Exception
Constructor.- Parameters:
label
- label file.fileAreaIndex
- The index of the File_Area_Observational element that contains the image to export.- Throws:
java.lang.Exception
- If an error occurred parsing the label.
-
ImageExporter
public ImageExporter(java.net.URL label, int fileAreaIndex) throws java.lang.Exception
Constructor.- Parameters:
label
- label file.fileAreaIndex
- The index of the File_Area_Observational element that contains the image to export.- Throws:
java.lang.Exception
- If an error occurred parsing the label.
-
ImageExporter
public ImageExporter(FileAreaObservational fileArea, ObjectProvider provider) throws java.io.IOException
Constructor.- Parameters:
fileArea
- The File_Area_Observational element containing the image to export.provider
- The ObjectProvider associated with the image to export.- Throws:
java.io.IOException
-
-
Method Detail
-
parseLabel
protected void parseLabel(java.io.File label, int fileAreaIndex) throws java.lang.Exception
- Overrides:
parseLabel
in classObjectExporter
- Throws:
java.lang.Exception
-
parseLabel
protected void parseLabel(java.net.URL label, int fileAreaIndex) throws java.lang.Exception
Parse the label.- Overrides:
parseLabel
in classObjectExporter
- Parameters:
label
- The label file.fileAreaIndex
- The index of the File_Area_Observational element that contains the image to export.- Throws:
java.lang.Exception
- If an error occurred while parsing the label.
-
parseLabel
protected void parseLabel(java.io.File label, java.lang.String dataFile) throws java.lang.Exception
Parse the label.- Parameters:
label
- The label file.dataFile
- data file- Throws:
java.lang.Exception
- If an error occurred while parsing the label.
-
parseLabel
protected void parseLabel(java.net.URL label, java.lang.String dataFile) throws java.lang.Exception
Parse the label.- Parameters:
label
- The label file.dataFile
- The name of the data file of the File_Area_Observational element that contains the image to export.- Throws:
java.lang.Exception
- If an error occurred while parsing the label.
-
setDisplaySettings
public void setDisplaySettings(java.util.List<DisplaySettings> displaySettings)
Set the display settings.- Parameters:
displaySettings
- A list of DisplaySettings.
-
getDisplaySettings
public DisplaySettings getDisplaySettings(java.lang.String id)
Get the display settings associated with the given identifier.- Parameters:
id
- The identifier to search.- Returns:
- The display settings associated with the given identifier. Returns null if none was found.
-
-