|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectspv.spectrum.SpectrumHeader
public class SpectrumHeader
Stores header information.
This version uses a Hashtable object to store
header keywords indexed by the keyword name. Thus the original
keyword ordering is not preserved upon retrieval.
If the header came from a FITS header object, this FITS header object is also stored in raw form. Support for a "double header" spectrum is also provided.his is useful e.g. when handling spectra stored in FITS extensions with their own header, plus the primary header that applies to the entire file.
| Field Summary | |
|---|---|
private static java.util.List |
beggining
|
private static java.lang.String[] |
beggining_keywords
|
private static java.lang.String |
COMMENT
|
private java.util.ArrayList |
comment_storage
|
private java.util.ArrayList |
fits_header_array
|
private static java.lang.String |
HISTORY
|
private java.util.ArrayList |
history_storage
|
private KeyedVector |
kw_storage
|
| Constructor Summary | |
|---|---|
SpectrumHeader()
Constructor. |
|
SpectrumHeader(nom.tam.fits.Header fits_header)
Constructor. |
|
SpectrumHeader(nom.tam.fits.Header fits_header_1,
nom.tam.fits.Header fits_header_2)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addHistory(java.lang.String record)
Adds an HISTORY record to the header. |
private void |
buildFromFitsHeader(nom.tam.fits.Header fits_header)
Populates the keyword storage with keyword/value pairs taken from a single fits header object. |
private void |
buildFromFitsHeaderArray()
Populates the keyword storage with keyword/value pairs taken from the array with fits header objects. |
javax.swing.JTextArea |
buildJTextArea()
Builds a JTextArea instance with a raw image of the \
header cards. |
protected java.lang.Object |
clone()
Returns a clone copy of this object. |
nom.tam.fits.Header |
getFITSHeader()
Generates a FITS header from this header. |
java.util.Enumeration |
getKeywordList()
Returns an Enumeration with keyword names. |
java.lang.String |
getKeywordValue(java.lang.String kwname)
Given the keyword name, returns the keyword value, or null if there is no such keyword name. |
java.lang.String |
getLongString()
Dumps the contents (cards) of a FITS header into a String object. |
static java.lang.String |
GetTargetNameKeyword()
Returns the keyword used to store the target name. |
private boolean |
isBeginningKeyword(java.lang.String keyword)
|
private boolean |
isTableColumnKeyword(java.lang.String keyword)
|
void |
remove(java.lang.String key)
Remove an element. |
void |
store(java.lang.String kwname,
java.lang.String value)
Stores a keyword and its value. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String COMMENT
private static final java.lang.String HISTORY
private static final java.lang.String[] beggining_keywords
private static java.util.List beggining
private java.util.ArrayList fits_header_array
private KeyedVector kw_storage
private java.util.ArrayList comment_storage
private java.util.ArrayList history_storage
| Constructor Detail |
|---|
public SpectrumHeader()
public SpectrumHeader(nom.tam.fits.Header fits_header)
fits_header - the FITS header associated with this.
public SpectrumHeader(nom.tam.fits.Header fits_header_1,
nom.tam.fits.Header fits_header_2)
fits_header_1 - the first FITS header associated with this.fits_header_2 - the second FITS header associated with this.| Method Detail |
|---|
public void store(java.lang.String kwname,
java.lang.String value)
COMMENT and HISTORY keywords are also accepted.
kwname - the keyword namevalue - the keyword valuepublic void remove(java.lang.String key)
public void addHistory(java.lang.String record)
record - the record to be addedpublic java.lang.String getKeywordValue(java.lang.String kwname)
null if there is no such keyword name.
This method returns a new String instance,
not a reference to the stored object.
kwname - the keyword name
public java.util.Enumeration getKeywordList()
Enumeration with keyword names.
Enumeration with keyword namespublic javax.swing.JTextArea buildJTextArea()
JTextArea instance with a raw image of the \
header cards.
We use a text area instead of more capable components such as text
panes due to the ability of JTextArea objects to
append strings. FITS header cards must be appended one by one
into the component.
TextArea instance with the header imagepublic java.lang.String getLongString()
private void buildFromFitsHeaderArray()
private void buildFromFitsHeader(nom.tam.fits.Header fits_header)
public nom.tam.fits.Header getFITSHeader()
Keywords that describe table columns ("TTYPE", "TFORM", "TUNIT") are NOT included in the result.
private boolean isBeginningKeyword(java.lang.String keyword)
private boolean isTableColumnKeyword(java.lang.String keyword)
public static java.lang.String GetTargetNameKeyword()
protected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||