public abstract class GenericStarDatabase extends AbstractSql
GenericSql class, only a single bridge, i.e. a single
database-type can be loaded per VM (or, per classloader). This class knows
how to convert the relevant fields found in the database into
SimpleStar objects out of a result set. Special databases using
callable statements etc. must subclass this class. This class is therefore
abstract, daughter must implement how to convert a central star, given as a
SimpleStar and a (circular) field into a result-set.AbstractSql.Columns, AbstractSql.ExtractPropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFEPOCHCALC
The default epoch expression.
|
private static String |
DEFEQUINOXCALC
The default equinox expression.
|
static String |
KEY_COLORCALC
The key linked to the color expression.
|
static String |
KEY_DECALC
The key linked to the declination expression.
|
static String |
KEY_EPOCHCALC
The key linked to the epoch expression.
|
static String |
KEY_EQUINOXCALC
The key linked to the equinox expression.
|
static String |
KEY_MAGCALC
The key linked to the magnitude expression.
|
static String |
KEY_NAME
The key linked to the Table field that is the name.
|
static String |
KEY_PMDECALC
The key linked to the proper motion in de expression.
|
static String |
KEY_PMRACALC
The key linked to the proper motion in ra expression.
|
static String |
KEY_RACALC
The key linked to the right ascension expression.
|
KEY_TABLE, SQLBATCHDIR, SQLFAILDIRKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Constructor and Description |
|---|
GenericStarDatabase(Map<String,String> prop)
Constructs a new generic star database.
|
| Modifier and Type | Method and Description |
|---|---|
List<Star> |
convertResultToStarList(ResultSet rs)
Converts a result set to a list of
SimpleStar objects. |
private static Number |
evaluate(String node,
ResultSet row)
Converts the current result set row into a number.
|
abstract ResultSet |
getCircularField(Star center,
double radius)
Takes a central star and a circular radius around it to convert it to a
database query result set, which is then passed to the
convertResultToStarList(java.sql.ResultSet) method. |
delete, distinct, distinct, exit, getAccess, getDefaultArchive, getDefaultFormat, getTable, init, insert, isEntry, release, release, replace, retrieve, retrieve, retrieve, single, singleclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, 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, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, 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, stringPropertiespublic static final String KEY_NAME
public static final String KEY_RACALC
public static final String KEY_DECALC
public static final String KEY_PMRACALC
public static final String KEY_PMDECALC
public static final String KEY_MAGCALC
public static final String KEY_COLORCALC
public static final String KEY_EPOCHCALC
public static final String KEY_EQUINOXCALC
private static final String DEFEQUINOXCALC
private static final String DEFEPOCHCALC
public GenericStarDatabase(Map<String,String> prop)
SimpleStars. Keys
that are not defined mean that they are not present in the database.public abstract ResultSet getCircularField(Star center, double radius)
convertResultToStarList(java.sql.ResultSet) method.center - The central star/position.radius - Radius of the circular field around the center, degrees.public List<Star> convertResultToStarList(ResultSet rs)
SimpleStar objects. Only
the fields that can be set using the database result are set.