|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.util.HeaderUpdate
public class HeaderUpdate
Class that updates fits headers. The fuits file in question is read, the required key is searched and if it is not present, its value is recalculated and writtn into the header.
| Nested Class Summary | |
|---|---|
static class |
HeaderUpdate.Read
First argument are the properties of the header update, second one is the fits file. |
static class |
HeaderUpdate.Write
First argument are the properties of the header update, second one is the fits file. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private static String |
DEFCOMMENTS
Default fits keys to comments. |
private static String |
DEFNAMESKEYS
Default fits keys to parameter names. |
private static File |
DEFUPDATEPATH
Default path where to write the new fits files. |
static String |
KEY_COMMENTS
Links parameter names to header keywords. |
static String |
KEY_FITSDB
Links parameter names to header keywords. |
static String |
KEY_NAMESKEYS
Links parameter names to header keywords. |
static String |
KEY_SET
The properties of the parameter cluster. |
static String |
KEY_TARGETLIST
The properties of the target list . |
static String |
KEY_UPDATEPATH
The path to the updated file, if a new file must be writtn. |
private Map<String,String> |
key2comment
Map of fits key names to parameter names. |
private Map<String,String> |
key2name
Map of fits key names to parameter names. |
private ParameterClustering |
set
The parameters for the update. |
private Collection<TargetDefinition> |
targets
The list of targets. |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
HeaderUpdate(Map prop)
Constructs a new header update. |
|
| Method Summary | |
|---|---|
private boolean |
database(List fitsfiles)
Reads files from path, scans for fits keys and, if they are present enters them into the database. |
void |
init()
Initializes the look-up table and the parameter set. |
boolean |
update(File fitsfile)
Updates the given fits file. |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Field Detail |
|---|
public static final String KEY_SET
public static final String KEY_UPDATEPATH
public static final String KEY_TARGETLIST
public static final String KEY_NAMESKEYS
public static final String KEY_COMMENTS
public static final String KEY_FITSDB
private static final String DEFNAMESKEYS
private static final String DEFCOMMENTS
private static final File DEFUPDATEPATH
private ParameterClustering set
private Collection<TargetDefinition> targets
private Map<String,String> key2name
private Map<String,String> key2comment
| Constructor Detail |
|---|
public HeaderUpdate(Map prop)
| Method Detail |
|---|
public void init()
init in interface Initializableinit in class PropertyResources
public boolean update(File fitsfile)
throws IOException,
nom.tam.fits.FitsException
IOException
nom.tam.fits.FitsException
private boolean database(List fitsfiles)
throws SQLException,
nom.tam.fits.FitsException,
IOException
SQLException
nom.tam.fits.FitsException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||