public class TargetConsistency extends PropertyResources implements Initializable
SCAN with PropertyLoader.scanLoad(java.lang.String) is performed.| Modifier and Type | Class and Description |
|---|---|
static class |
TargetConsistency.CrossCheck
Checks for stars in the task table with no entry in the target table and
updates them.
|
private static class |
TargetConsistency.UpdateThread
A thread that updates the targt database with simbad-resolved stars.
|
private static class |
TargetConsistency.URLInfo
Retrieves and stores info from an URL
|
static class |
TargetConsistency.User
Adds a new user or proposal by parsing the target xml.
|
static class |
TargetConsistency.Xml
Scans a targetlist for consistency.
|
PropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static Map<String,Star> |
fallback
This is the fallback, if no simbad info can be retrieved.
|
private static HistorySql |
histsql
The history-db reference.
|
static String |
KEY_HISTORYDB
If special history-db properties are required.
|
static String |
KEY_OBSERVEDB
If special observe-db properties are required.
|
static String |
KEY_PERMISSIONDB
If special permission-db properties are required.
|
static String |
KEY_PROPOSALDB
If special proposal-db properties are required.
|
static String |
KEY_TARGETDB
If special target-db properties are required.
|
static String |
KEY_TASKDB
If special task-db properties are required.
|
static String |
KEY_USERDB
If special user-db properties are required.
|
private static ObserveSql |
observesql
The history-db reference.
|
private static PermissionSql |
permsql
The history-db reference.
|
private static ProposalSql |
proposalsql
The history-db reference.
|
private static TargetConsistency |
run
The single running reference.
|
static String |
SCAN
The resource name psql.static.conf.
|
private static List<String> |
simbad
On cositency checks we gather all new SIMBAD target names.
|
private static TargetSql |
targetsql
The history-db reference.
|
private static TaskSql |
tasksql
The history-db reference.
|
private static UserSql |
usersql
The history-db reference.
|
KEY_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| Modifier | Constructor and Description |
|---|---|
private |
TargetConsistency(Map<String,String> prop)
Constructs the single living instqance of the target consistancy class.
|
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
addPermission(TargetDefinition td)
Add all permission for this proposal, including su permission for the PI
and normal permissions for the team members.
|
private static boolean |
checkForObject(String main)
Checks and prepares for updates of the target-db for the given new star.
|
static boolean |
checkTargetXml(String telid,
Map<String,SporeTarget> loaded)
Checks for all targets in the collection if the modification time of the
file resource is younger than the modification time stored.
|
private static boolean |
checkUpdateProposal(TargetDefinition td)
Checks and updates the proposal sql if the propsal is not found.
|
private static boolean |
checkUpdateUser(TargetDefinition td)
Checks and updates the user sql if the user is not found.
|
void |
init()
Constructs all tables.
|
static Thread |
startTargetUpdate()
Starts a thread for updating the target database, based on the list of
stars retrieved on
checkTargetXml(java.lang.String, java.util.Map<java.lang.String, stella.xml.SporeTarget>). |
clone, 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 SCAN
public static final String KEY_HISTORYDB
public static final String KEY_TASKDB
public static final String KEY_TARGETDB
public static final String KEY_PROPOSALDB
public static final String KEY_USERDB
public static final String KEY_PERMISSIONDB
public static final String KEY_OBSERVEDB
private static HistorySql histsql
private static TaskSql tasksql
private static TargetSql targetsql
private static ProposalSql proposalsql
private static UserSql usersql
private static PermissionSql permsql
private static ObserveSql observesql
private static TargetConsistency run
private static List<String> simbad
public void init()
throws InitException
init in interface InitializableInitExceptionpublic static boolean checkTargetXml(String telid, Map<String,SporeTarget> loaded)
public static Thread startTargetUpdate()
checkTargetXml(java.lang.String, java.util.Map<java.lang.String, stella.xml.SporeTarget>). The thread doing the update
is returned.private static boolean checkForObject(String main)
private static boolean checkUpdateUser(TargetDefinition td)
private static boolean checkUpdateProposal(TargetDefinition td)
private static boolean addPermission(TargetDefinition td)