|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectastro.fits.HeaderCardDescriptor
public class HeaderCardDescriptor
A helper class that bundles FITS-header cards into descriptors that can then be resolved at run-time to provide true header cards.
| Nested Class Summary | |
|---|---|
static class |
HeaderCardDescriptor.Type
How the string descriptor should be converted into a value. |
| Field Summary | |
|---|---|
private String |
describe
|
private static DateFormat |
FITSDATE
The formatter for fits dates. |
private HeaderCardDescriptor.Type |
how
|
private String |
key
|
private String |
rem
|
| Constructor Summary | |
|---|---|
HeaderCardDescriptor(String k,
String value,
String comment)
|
|
HeaderCardDescriptor(String k,
String value,
String comment,
HeaderCardDescriptor.Type parse)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object that)
Equal, key, descriptor and how. |
static List<HeaderCardDescriptor> |
fromProperty(String t)
Convenience method that parses a property string into a list of header card descriptos. |
static List<HeaderCardDescriptor> |
fromProperty(String t,
HeaderCardDescriptor.Type def)
Convenience method that parses a property string into a list of header card descriptos. |
String |
getComment()
Returns the comment, if any. |
String |
getDescription()
Returns the value descriptor part of this object. |
String |
getKey()
Returns the key, not trimmed to any required length. |
int |
hashCode()
Hash code of key. |
static HeaderCardDescriptor |
parse(String p)
Parses a header card description from a single string. |
static HeaderCardDescriptor |
parse(String p,
HeaderCardDescriptor.Type deftype)
Parses a header card description from a single string. |
private static Object |
probe(Object value)
Tries to convert a string value into a fits-header key understandable object. |
nom.tam.fits.HeaderCard |
toCard(ParameterClustering set,
Map<String,Object> extern)
Converts the header card descriptor to a valid herader card reference at run-time, allowing filling in of values for sysmbols. |
String |
toString()
Reveresers the parse operation. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final DateFormat FITSDATE
private String key
private String describe
private String rem
private HeaderCardDescriptor.Type how
| Constructor Detail |
|---|
public HeaderCardDescriptor(String k,
String value,
String comment)
public HeaderCardDescriptor(String k,
String value,
String comment,
HeaderCardDescriptor.Type parse)
| Method Detail |
|---|
public String getDescription()
public String getKey()
public String getComment()
public nom.tam.fits.HeaderCard toCard(ParameterClustering set,
Map<String,Object> extern)
throws nom.tam.fits.HeaderCardException
getDescription() part
of the descriptor. If this parameter is found, and has a
none-null value, we probe(java.lang.Object) for its run-time class before
converting the parameter value to the header card. If the type is
EXTERNAL, the external map is used to find a value according to
the descriptors name. Again, the return value is probed for
its type. A PROBE type means the the string descriptor itself is
probed for conversion to any of the HeaderCard supported classes
Long, Double, or Boolean (fallback is String), a type of
NONE always returns the desriptor as a string value header card.
nom.tam.fits.HeaderCardExceptionprivate static Object probe(Object value)
public int hashCode()
hashCode in class Objectpublic boolean equals(Object that)
equals in class Objectpublic String toString()
toString in class Object
public static HeaderCardDescriptor parse(String p)
throws ParseException
ParseException
public static HeaderCardDescriptor parse(String p,
HeaderCardDescriptor.Type deftype)
throws ParseException
ParseExceptionpublic static List<HeaderCardDescriptor> fromProperty(String t)
public static List<HeaderCardDescriptor> fromProperty(String t,
HeaderCardDescriptor.Type def)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||