|
||||||||||
| 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.xml.ElementHelper
stella.xml.ObjectHelper
public class ObjectHelper
This class allows assignment of xml-target descriptions from object names. It
provides methods for retrieving field-of-view entries, as well as object
positions. Guiding stars can also be set. Note that guiding offsets are part
of the setup constant section rather than in the object. This class does not
extend the ElementHelper class because the only required field is the
object id and the object name, while resolving of the position and guiding
field is done in a very special way.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class stella.xml.ElementHelper |
|---|
ElementHelper.Valid |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
static Map<String,Map<String,String>> |
CATALOGS
A table of catalog-names to catalog properties. |
private static String |
DEFFIELDCATALOG
The default field-of-view resolving methods. |
static String |
DEFID
The default id. |
private static float |
DEFMAGLIMIT
The default mag limit. |
private static String |
DEFMAINCATALOG
The default field-of-view resolving methods. |
private static double |
DEFMAINFIELD
The default main field to enhance main-star entry. |
private static String |
DEFREQUIREMENT
The required entries. |
private static long |
DEFRESOLVETIME
The default resolve time using simbad services. |
private static String |
DEFSETTABLE
The settable parameters. |
private static String |
DEFTYPEMAP
The type map for the object parameters. |
private static long |
DEFUPDATETIME
The default resolve time using simbad services. |
private static String |
DEFVALUEDETAILS
|
private StarCatalog |
fieldcat
The star catalog to use for the main guide star resolving tasks. |
private List<StarDescription> |
fov
A list of field of view stars. |
static String |
KEY_FIELDCATALOG
The key to the StarCatalog for guide star list. |
static String |
KEY_ID
The object-id as attribute to the object-xml fragment. |
static String |
KEY_IDGUIDE
Points to the setup-id carrying guiding info. |
static String |
KEY_MAGLIMIT
All stars below this magnitude are discarded from FoV. |
static String |
KEY_MAINCATALOG
The key to the StarCatalog for main star resolving. |
static String |
KEY_MAINFIELD
The key to the (narrow) field around the main star. |
static String |
KEY_RESOLVETIME
The key to the time used for resolving the object name. |
static String |
KEY_UPDATETIME
The key to the time used for updating the object. |
private static Map<String,String> |
LOOKUP
A look-up table matching DTD names to StarDescription names. |
private StarDescription |
main
The entry for the main star. |
private List<StarCatalog> |
maincat
The star catalogs to use for the main star resolving tasks. |
| Fields inherited from class stella.xml.ElementHelper |
|---|
KEY_APPENDIX, KEY_HELPERCLASS, KEY_INIT, KEY_REQUIREMENT, KEY_SETTABLE, KEY_TYPEMAP, KEY_VALUEDETAILS |
| 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 | |
|---|---|
ObjectHelper(Map<String,String> prop)
Creates a new object helper with the specified properties. |
|
| Method Summary | |
|---|---|
static ObjectHelper |
createObjectHelper(Map<String,String> prop)
Creates a ElementHelper using the provided properties. |
void |
erase()
Erases the field of view and the main star entry. |
String |
getFieldCatalogName()
Returns the name of the field-of-view catalog. |
long |
getFieldCatalogTime(double radius)
Returns the catalog resolve time for the main method. |
List<StarDescription> |
getFieldOfView()
Returns the field-of-view, the guide star being the first entry in the list. |
String |
getGuiderSetup()
Returns the id of the setup section that hosts guiding info. |
StarDescription |
getMain()
Returns the main star as a StarDescription object. |
long |
getResolveTime()
Returns a time estimate for resolving the main object name using the simbad service. |
void |
init()
Constructs the main resolving catalog out of KEY_MAINCATALOG and
the known catalogs CATALOGS. |
boolean |
isValid()
An object is valid if the main star is valid and the field-of-view is set. |
List<StarDescription> |
resolveFieldOfView(StarDescription around,
double view)
Uses the provided center of the field of view to retrieve star entries from the fieldcat catalog. |
StarDescription |
resolveObjectName(String simbad)
Resolves the main star entry. |
void |
setFieldOfView(List<StarDescription> field)
Sets the field of view if processed using non-default methods. |
void |
setFieldOfView(StarDescription around,
double field)
Sets the field of view, using a center star and a circular field of view. |
StarDescription |
setMain(StarDescription newmain)
Sets the main object as a StarDescription |
StarDescription |
setMain(String simbad)
Sets the main object using the resolveObjectName(java.lang.String) method. |
boolean |
setValue(String name,
Object value)
Setting one of the settable values re-directs it to setting the main star entry. |
boolean |
update()
Updates the variables. |
boolean |
update(boolean simbad)
Updates the variables. |
| Methods inherited from class stella.xml.ElementHelper |
|---|
createElementHelper, createElementHelpers, createElementHelpers, createHelperMap, createHelperMap, debug, error, fatal, fromResourceName, fromResourceName, getDefined, getDetails, getID, getMissing, getRequired, getSettable, getType, getValue, getVariables, info, toLongString, toString, warn |
| 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 |
| 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_ID
public static final String KEY_RESOLVETIME
public static final String KEY_UPDATETIME
public static final String KEY_MAINFIELD
public static final String KEY_MAINCATALOG
StarCatalog for main star resolving.
public static final String KEY_FIELDCATALOG
StarCatalog for guide star list.
public static final String KEY_IDGUIDE
public static final String KEY_MAGLIMIT
public static final Map<String,Map<String,String>> CATALOGS
public static final String DEFID
private static final long DEFRESOLVETIME
private static final long DEFUPDATETIME
private static final double DEFMAINFIELD
private static final String DEFMAINCATALOG
private static final String DEFFIELDCATALOG
private static final float DEFMAGLIMIT
private static final String DEFREQUIREMENT
private static final String DEFVALUEDETAILS
private static final String DEFTYPEMAP
private static final String DEFSETTABLE
private static final Map<String,String> LOOKUP
StarDescription names.
private StarDescription main
private List<StarCatalog> maincat
private StarCatalog fieldcat
private List<StarDescription> fov
| Constructor Detail |
|---|
public ObjectHelper(Map<String,String> prop)
| Method Detail |
|---|
public void init()
KEY_MAINCATALOG and
the known catalogs CATALOGS.
init in interface Initializableinit in class ElementHelperpublic void erase()
erase in class ElementHelperpublic String getGuiderSetup()
public long getResolveTime()
public long getFieldCatalogTime(double radius)
public StarDescription resolveObjectName(String simbad)
public String getFieldCatalogName()
public List<StarDescription> resolveFieldOfView(StarDescription around,
double view)
fieldcat catalog. This list is then considered the
field-of-view. If the provided center is null, the main star is used.
public boolean isValid()
isValid in interface UserAdjustableisValid in class ElementHelper
public boolean setValue(String name,
Object value)
setValue in interface UserAdjustablesetValue in class ElementHelperpublic boolean update()
update in interface UserAdjustableupdate in class ElementHelperpublic boolean update(boolean simbad)
simbad - If true, always try to resolve with Simbadpublic StarDescription getMain()
StarDescription object. The name used
in the call to resolveObjectName(java.lang.String) is preserved.
public StarDescription setMain(String simbad)
resolveObjectName(java.lang.String) method.
public StarDescription setMain(StarDescription newmain)
StarDescription
public List<StarDescription> getFieldOfView()
resolveFieldOfView(astro.StarDescription, double), it is rather
certain that no double entries exist.
public void setFieldOfView(StarDescription around,
double field)
setMain(java.lang.String).
public void setFieldOfView(List<StarDescription> field)
public static ObjectHelper createObjectHelper(Map<String,String> prop)
ElementHelper using the provided properties. If the
properties do not contain a PropertySupplying.KEY_CLASS property the
standard ElementHelper class is used. If one wants to create
daughter classes of the ElementHelper, e.g. to provide
GUI-enhanced functionality, the properties should contain a class entry
of this telescope helper subclass.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||