|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectspv.spectrum.SpectrumSpecification
public abstract class SpectrumSpecification
Super class of all classes used to store and manipulate objects
that act as references to be used by the SpectrumFileFactory
class when building spectra.
This class is necessary since there might be around some file types that store more than one spectra per file. So the file name alone cannot be used to fully specify a spectrum, and more information is required. The prototypical case are spectra stored in HST-specific formats, such as spectra from the STIS, GHRS and FOS instruments.
The typical spectrum specification consists of a URL plus additional information that enables the spectrum(a) to be located within the file pointed to by the URL.
| Field Summary | |
|---|---|
protected java.lang.String |
axes
|
protected int |
extension
|
protected java.lang.String |
filename
|
protected nom.tam.fits.Fits |
fits_file
|
protected int |
i1
|
protected int |
i2
|
protected javax.swing.table.TableModel |
model
|
protected int |
row
|
protected int[] |
rows
|
protected java.lang.String |
ss
|
protected java.util.Map |
ucds
|
protected java.lang.String |
units
|
protected java.net.URL |
url
|
| Constructor Summary | |
|---|---|
SpectrumSpecification()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getAxes()
Gets the axis spec from the SSAP table model. |
protected static java.lang.String |
GetCleanString(java.lang.String is)
Returns the substring before the first occurrence of the '[' character. |
protected static java.net.URL |
GetCleanURL(java.net.URL url)
Returns a cleaned up URL. |
int |
getExtension()
Returns the extension. |
java.lang.String |
getFileName()
Returns the file name part of the URL, without any suffixes. |
nom.tam.fits.Fits |
getFits()
Returns the fits object. |
javax.swing.table.TableModel |
getModel()
Gets the SSAP table model. |
int |
getRow()
Gets the index that accesses a row in the SSAP table model. |
java.lang.String |
getSSAPParameter(java.lang.String name)
Gets an SSAP parameter, given its name. |
java.util.Map |
getUcds()
Gets the map with the SSAP UCDs. |
java.lang.String |
getUnits()
Gets the units spec from the SSAP table model. |
java.net.URL |
getURL()
Returns the url. |
protected void |
parseRowSpecification()
Parses the row specification string. |
protected void |
parseURLWithExtensionSpec(java.net.URL url)
This method performs the initial parsing of a spectrum specification string that consists of a URL plus a bracket-enclosed extension spec. |
void |
setRowInModel(int row)
|
void |
setTableModel(javax.swing.table.TableModel model)
|
void |
setUCDMap(java.util.Map ucds)
|
java.lang.String |
toString()
Returns a string representation of this. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String ss
protected java.net.URL url
protected java.lang.String filename
protected nom.tam.fits.Fits fits_file
protected int extension
protected int[] rows
protected int i1
protected int i2
protected java.lang.String axes
protected java.lang.String units
protected javax.swing.table.TableModel model
protected int row
protected java.util.Map ucds
| Constructor Detail |
|---|
public SpectrumSpecification()
| Method Detail |
|---|
public java.lang.String toString()
this.
toString in class java.lang.Objectthispublic java.lang.String getFileName()
public java.net.URL getURL()
public nom.tam.fits.Fits getFits()
public int getExtension()
public java.lang.String getSSAPParameter(java.lang.String name)
name - the parameter name
public java.util.Map getUcds()
public javax.swing.table.TableModel getModel()
public int getRow()
public java.lang.String getAxes()
public java.lang.String getUnits()
protected static java.lang.String GetCleanString(java.lang.String is)
is - the input string
protected static java.net.URL GetCleanURL(java.net.URL url)
This method assumes that the input URL was already checked for consistency, so no exceptions are thrown.
url - the input URL
protected void parseURLWithExtensionSpec(java.net.URL url)
throws java.lang.NumberFormatException
url - the url to be parsed
java.lang.NumberFormatExceptionprotected void parseRowSpecification()
public void setTableModel(javax.swing.table.TableModel model)
public void setRowInModel(int row)
public void setUCDMap(java.util.Map ucds)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||