|
||||||||||
| 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.sql.TargetConsistency
public class TargetConsistency
Class to check the consistancy of the task and history database to target xml
files. This class acts server-like, it has no public constructors, and all
methods are statically accessible. To allow some configuration, a scan for
SCAN with PropertyLoader.scanLoad(java.lang.String) is performed.
| Nested Class Summary | |
|---|---|
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. |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private static Map<String,StarDescription> |
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. |
| 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 | |
|---|---|
private |
TargetConsistency(Map<String,String> prop)
Constructs the single living instqance of the target consistancy class. |
| Method Summary | |
|---|---|
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,ParsedTarget> 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. |
| 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 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
private static Map<String,StarDescription> fallback
| Constructor Detail |
|---|
private TargetConsistency(Map<String,String> prop)
| Method Detail |
|---|
public void init()
init in interface Initializableinit in class PropertyResources
public static boolean checkTargetXml(String telid,
Map<String,ParsedTarget> loaded)
public static Thread startTargetUpdate()
checkTargetXml(java.lang.String, java.util.Map) . 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||