utility
Class DBAccess

java.lang.Object
  extended by utility.DBAccess

public class DBAccess
extends java.lang.Object


Field Summary
static java.lang.String[] filters
           
static java.lang.String url
           
 
Constructor Summary
DBAccess()
           
 
Method Summary
static void addObservation(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filt, double mag, double magErr, java.lang.String group, java.lang.String site, java.lang.String comments, java.util.Date obsDate)
          Adds and entry to the list of observations.
static void addObservation(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filt, java.lang.String group, java.lang.String site, java.lang.String comments, java.util.Date obsDate)
          Adds and entry to the list of observations.
static void addPhotStand(java.sql.Connection con, java.lang.String name, java.lang.String field, java.lang.String ra, java.lang.String dec, java.lang.String v, java.lang.String b_v, java.lang.String u_b, java.lang.String v_r, java.lang.String r_i, java.lang.String v_i, java.lang.String note)
          add a photometric standard star to the database
static void addStandField(java.sql.Connection con, java.lang.String field, java.lang.String ra, java.lang.String dec)
          add a standard star field
static CheckedOut[] addToCheckedOut(java.sql.Connection con, CheckedOut[] checkedOut, java.lang.String cand, java.lang.String type, java.lang.String filt, java.lang.String group, java.lang.String site)
          Adds a candidate to the checked out list.
static void addToEmailList(java.sql.Connection con, java.lang.String address, java.lang.String message)
          puts and entry on the list of messages to email
static void addToPriority(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filt, double value)
          Add a specified amount to a candidates priority.
static void deleteObservation(java.sql.Connection con, ObservationInfo oi)
          delete an observation entry
static void deleteRun(java.sql.Connection con, java.lang.String runName)
          deletes a run from the database
static boolean fullAccess(java.sql.Connection con)
           
static java.util.Vector getAllCandInfo(java.sql.Connection con)
          read all candidate entries
static java.util.Vector getAllGroupNames(java.sql.Connection con)
          Gets the all the group names in the database.
static java.lang.String[] getAllRunGroups(java.sql.Connection con)
          select all the groups that have runs scheduled or proposed
static java.lang.String[] getAllRunParam(java.sql.Connection con, java.lang.String param)
          select all the groups/scopes/types that have runs scheduled or proposed
static java.util.Vector getAllRuns(java.sql.Connection con)
          Gets all of the runs in the database
static java.lang.String[] getAllRunScopes(java.sql.Connection con)
          select all the scopes that have runs scheduled or proposed
static java.lang.String[] getAllRunTypes(java.sql.Connection con)
          select all the types that have runs scheduled or proposed
static java.util.Vector getAllStandFields(java.sql.Connection con)
          gets all the standard star fields (name, ra, dec)
static Sixty getCandDEC(java.sql.Connection con, java.lang.String funName)
          Gets the DEC of a candidate
static java.util.Vector getCandDEC(java.sql.Connection con, java.util.Vector funNames)
          Gets the DEC of specified candidates
static java.util.Vector getCandFunNames(java.sql.Connection con)
          Gets the fun names of all the candidates in the database
static java.util.Vector getCandFunNames(java.sql.Connection con, boolean showAll)
          Gets the fun names of all the candidates in the database
static CandInfo getCandInfo(java.sql.Connection con, java.lang.String cand)
          read a candidate's entries
static double getCandMag(java.sql.Connection con, java.lang.String cand, java.lang.String filter)
          Get the current magnitude for a candidate and filter.
static Sixty getCandRA(java.sql.Connection con, java.lang.String funName)
          Gets the RA of a candidate
static java.util.Vector getCandRA(java.sql.Connection con, java.util.Vector funNames)
          Gets the RA of specified candidates
static java.util.Vector getCandRaDec(java.sql.Connection con)
          gets all the candidates positions (name, ra, dec)
static java.util.Vector getChanges(java.sql.Connection con, java.util.Date from, java.util.Date to, java.lang.String orderBy)
          gets a list of all the changes made in the give time frame
static int getDaysSinceObserved(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filt, JulianDate now)
          returns the number of days since last observation
static java.lang.String getDetector(java.sql.Connection con, java.lang.String site)
          get the default detector name for a site.
static double getFullPriority(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filt)
          Gets the priority (0.0-10.0 or more) for a given candidate, type, and filter as a double.
static double getFullPriority(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filt, boolean noObservers)
          Gets the priority (0.0-10.0 or more) for a given candidate, type, and filter as a double.
static java.lang.String getGroupName(java.sql.Connection con, java.lang.String site)
          get the default group name for a site.
static void getMagnitudes(java.sql.Connection con, java.lang.String cand, java.lang.String[] filters, double[] mags)
          Get the current magnitude for a candidate and filter.
static void getMagnitudes(java.sql.Connection con, java.lang.String cand, java.lang.String[] filters, java.lang.Double[] mags)
          Get the current magnitude for a candidate and filter.
static boolean getMoonFlag(java.sql.Connection con, java.lang.String cand)
          see if the database thinks the moon is too close
static java.lang.String getNightReport(java.sql.Connection con, java.lang.String scope, JulianDate jdate)
          get the fraction of the night scheduled
static java.lang.String getObjType(java.sql.Connection con, java.lang.String cand)
          get the object type
static java.util.Vector getObservations(java.sql.Connection con, java.util.Date from, java.util.Date to, java.lang.String orderBy)
          gets a list of all the observations made in the give time frame
static int getOverAllPriority(java.sql.Connection con, java.lang.String cand)
          Gets the over all priority for a given candidate.
static java.util.Hashtable getPhotInfo(java.sql.Connection con)
          Gets all the info about the photometric stands in the db
static java.util.Vector getPhotStands(java.sql.Connection con)
          gets all the photometric standard stars (name, ra, dec)
static void getPriorities(java.sql.Connection con, java.lang.String cand, java.lang.String[] filters, java.lang.Integer[] phots, java.lang.Integer[] specs)
           
static int getPriority(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filt)
          Gets the priority (0-10) for a given candidate, type, and filter.
static int getPriority(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filt, boolean noObservers)
          Gets the priority (0-10) for a given candidate, type, and filter.
static double getPriorityInc(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filter)
          Returns the amount to increment a priority level (if any is given).
static java.lang.String getRunGroup(java.sql.Connection con, java.lang.String runName)
          gets a run's group name
static JulianDate[] getRunJulianDays(java.sql.Connection con, java.lang.String runName)
          get the julian days of a run
static double getRunNightFrac(java.sql.Connection con, java.lang.String runName, JulianDate jdate)
          get the fraction of the night scheduled
static int getRunNumDays(java.sql.Connection con, java.lang.String runName)
          gets the number of days in a run
static java.lang.String getRunParam(java.sql.Connection con, java.lang.String runName, java.lang.String field)
          select a field from the runs table
static java.lang.String getRunScope(java.sql.Connection con, java.lang.String runName)
          gets a run's telescope name
static java.lang.String getRunType(java.sql.Connection con, java.lang.String runName)
          gets a run's type
static int getScopeColor(java.sql.Connection con, java.lang.String scope)
          gets the color index for a telescope
static double getScopeZP(java.sql.Connection con, java.lang.String scope, java.lang.String filter)
          Get the zeropoint for a telescope and filter.
static double[] getScopeZPs(java.sql.Connection con, java.lang.String scope)
          Get all the zeropoints (u,b,v,r,i) for a telescope.
static void getSiteParams(java.sql.Connection con, java.lang.String site, java.util.Hashtable hash)
          Reads the database and returns the elevation of a telescope scope.
static float getSiteParams(java.sql.Connection con, java.lang.String site, java.util.Vector latAndLong)
          Reads the database and returns the elevation of a telescope scope.
static java.util.Vector getStandards(java.sql.Connection con, double minRA, double maxRA, double minDEC, double maxDEC)
          gets all the standard stars in a range (name, ra, dec).
static java.util.Vector getTelescopes(java.sql.Connection con)
          Gets the available telescopes
static java.lang.String getTimeZone(java.sql.Connection con, java.lang.String site)
          get the default TimeZone ID for a given site.
static double getZeroPoint(java.sql.Connection con, java.lang.String site)
          get the default zeropoint for a site.
static boolean isQueueScheduled(java.sql.Connection con, java.lang.String runName)
          Checks to see if a run is Queue scheduled
static boolean isScheduled(java.sql.Connection con, java.lang.String runName)
          Checks to see if a run is scheduled or just proposed
static void justModified(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filt)
          Call when an observation is made, or the priority is otherwise updated.
static void killOverDue(java.sql.Connection con)
          Removes items checked out for more that 12 hours.
static java.lang.String lastModifiedOn(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filter)
           
static java.lang.String lastObservedOn(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filter)
           
static void makeRun(java.sql.Connection con, java.lang.String runName, java.lang.String scope, java.lang.String type, java.lang.String group, JulianDate[] jdays, double[] fracs, boolean isScheduled, boolean isQueue)
          create a new run
static void newCandidate(java.sql.Connection con, CandInfo ci)
          make new candidate entry
static void newCandidate(java.sql.Connection con, java.lang.String funName, java.lang.String scpName, java.lang.String iauName, java.lang.String ra, java.lang.String dec, java.lang.String discovered, java.lang.String comments, int overAll, java.lang.String band, java.lang.String state)
          make new candidate entry
static void newChangesMade(java.sql.Connection con, java.lang.String funName, java.lang.String property, java.lang.String from, java.lang.String to)
          creaty a new changes_made entry
static void newFilterStuff(java.sql.Connection con, java.lang.String key1, java.lang.String key2, java.lang.String u, java.lang.String b, java.lang.String v, java.lang.String r, java.lang.String i)
          make new filter_stuff entry
static void newLastModified(java.sql.Connection con, java.lang.String funName, java.lang.String type)
          make new last_modified entry
static void newPriority(java.sql.Connection con, java.lang.String funName, java.lang.String type, int u, int b, int v, int r, int i)
          make new priorities entry
static void observationMade(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filt)
          Change a candidates priority to reflect an observation was completed
static void observationMade(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filt, java.util.Date obsDate)
          Change a candidates priority to reflect an observation was completed.
static void removeAllCheckedOut(java.sql.Connection con, CheckedOut[] checkedOut)
          Removes all candidates from the checked out list and removes the database entry.
static CheckedOut[] removeCheckedOut(java.sql.Connection con, CheckedOut[] checkedOut, int index, boolean completed)
          Removes a candidate from the checked out list, alters the database priority value if completed, and removes the database entry.
static CheckedOut[] removeCheckedOut(java.sql.Connection con, CheckedOut[] checkedOut, java.lang.String cand, java.lang.String type, java.lang.String filt, boolean completed)
          Removes a candidate from the checked out list, alters the database priority value if completed, and removes the database entry.
static CheckedOut[] removeCheckedOut(java.sql.Connection con, CheckedOut[] checkedOut, java.lang.String cand, java.lang.String type, java.lang.String filt, java.lang.String group, java.lang.String site, boolean completed)
          Removes a candidate from the checked out list, alters the database priority value if completed, and removes the database entry.
static void setMoonFlag(java.sql.Connection con, java.lang.String cand, boolean moonFlag)
          indicates whether the moon is too close in the priorities
static void setOverAllPriority(java.sql.Connection con, java.lang.String cand, int value)
          Sets the over all priority for a given candidate
static void setPriority(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filt, double newValue)
          Set the priority of a candidate (preserves number of observers).
static void setPriority(java.sql.Connection con, java.lang.String cand, java.lang.String type, java.lang.String filt, double newValue, boolean noBull)
          Set the priority of a candidate.
static void setRunGroup(java.sql.Connection con, java.lang.String runName, java.lang.String group)
          sets the group name for a run
static void setRunIsQueue(java.sql.Connection con, java.lang.String runName, boolean isQueue)
          sets whether a run is Queue scheduled or not
static void setRunIsScheduled(java.sql.Connection con, java.lang.String runName, boolean isScheduled)
          sets whether a run is scheduled or not
static void submitObsForm(java.sql.Connection con, int runDate, java.lang.String scope, java.lang.String group, java.lang.String seeing, java.lang.String quality)
          submit an observer report form
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

public static final java.lang.String url
See Also:
Constant Field Values

filters

public static java.lang.String[] filters
Constructor Detail

DBAccess

public DBAccess()
Method Detail

getTelescopes

public static java.util.Vector getTelescopes(java.sql.Connection con)
Gets the available telescopes


getCandFunNames

public static java.util.Vector getCandFunNames(java.sql.Connection con)
Gets the fun names of all the candidates in the database


getCandFunNames

public static java.util.Vector getCandFunNames(java.sql.Connection con,
                                               boolean showAll)
Gets the fun names of all the candidates in the database


getAllRuns

public static java.util.Vector getAllRuns(java.sql.Connection con)
Gets all of the runs in the database


getAllGroupNames

public static java.util.Vector getAllGroupNames(java.sql.Connection con)
Gets the all the group names in the database.


getCandRA

public static Sixty getCandRA(java.sql.Connection con,
                              java.lang.String funName)
Gets the RA of a candidate


getCandRA

public static java.util.Vector getCandRA(java.sql.Connection con,
                                         java.util.Vector funNames)
Gets the RA of specified candidates


getCandDEC

public static Sixty getCandDEC(java.sql.Connection con,
                               java.lang.String funName)
Gets the DEC of a candidate


getCandDEC

public static java.util.Vector getCandDEC(java.sql.Connection con,
                                          java.util.Vector funNames)
Gets the DEC of specified candidates


getSiteParams

public static float getSiteParams(java.sql.Connection con,
                                  java.lang.String site,
                                  java.util.Vector latAndLong)
Reads the database and returns the elevation of a telescope scope. Sets lat and longit to the site latitude and longitude. Returns 0 if an error occurs.


getSiteParams

public static void getSiteParams(java.sql.Connection con,
                                 java.lang.String site,
                                 java.util.Hashtable hash)
Reads the database and returns the elevation of a telescope scope. Sets "latitude", "longitude", and "elevation" in the hash to the site values as Sixty, Sixty, and Double.


getPriorities

public static void getPriorities(java.sql.Connection con,
                                 java.lang.String cand,
                                 java.lang.String[] filters,
                                 java.lang.Integer[] phots,
                                 java.lang.Integer[] specs)

getPriority

public static int getPriority(java.sql.Connection con,
                              java.lang.String cand,
                              java.lang.String type,
                              java.lang.String filt)
Gets the priority (0-10) for a given candidate, type, and filter. A return value of -99 signals an error


getPriority

public static int getPriority(java.sql.Connection con,
                              java.lang.String cand,
                              java.lang.String type,
                              java.lang.String filt,
                              boolean noObservers)
Gets the priority (0-10) for a given candidate, type, and filter. A return value of -99 signals an error. Strips the n*100 observers value


getFullPriority

public static double getFullPriority(java.sql.Connection con,
                                     java.lang.String cand,
                                     java.lang.String type,
                                     java.lang.String filt)
Gets the priority (0.0-10.0 or more) for a given candidate, type, and filter as a double. A return value of -99 signals an error


getFullPriority

public static double getFullPriority(java.sql.Connection con,
                                     java.lang.String cand,
                                     java.lang.String type,
                                     java.lang.String filt,
                                     boolean noObservers)
Gets the priority (0.0-10.0 or more) for a given candidate, type, and filter as a double. A return value of -99 signals an error. Strips the n*100 observers value if(noObservers).


setPriority

public static void setPriority(java.sql.Connection con,
                               java.lang.String cand,
                               java.lang.String type,
                               java.lang.String filt,
                               double newValue)
Set the priority of a candidate (preserves number of observers).


setPriority

public static void setPriority(java.sql.Connection con,
                               java.lang.String cand,
                               java.lang.String type,
                               java.lang.String filt,
                               double newValue,
                               boolean noBull)
Set the priority of a candidate.


addToPriority

public static void addToPriority(java.sql.Connection con,
                                 java.lang.String cand,
                                 java.lang.String type,
                                 java.lang.String filt,
                                 double value)
Add a specified amount to a candidates priority. Useful when adding 100 for each observer.


observationMade

public static void observationMade(java.sql.Connection con,
                                   java.lang.String cand,
                                   java.lang.String type,
                                   java.lang.String filt)
Change a candidates priority to reflect an observation was completed


observationMade

public static void observationMade(java.sql.Connection con,
                                   java.lang.String cand,
                                   java.lang.String type,
                                   java.lang.String filt,
                                   java.util.Date obsDate)
Change a candidates priority to reflect an observation was completed. New priority reflects what the priority would be now if the observation was logged on obsDate.


addToCheckedOut

public static CheckedOut[] addToCheckedOut(java.sql.Connection con,
                                           CheckedOut[] checkedOut,
                                           java.lang.String cand,
                                           java.lang.String type,
                                           java.lang.String filt,
                                           java.lang.String group,
                                           java.lang.String site)
Adds a candidate to the checked out list. Updates the database accordingly.


removeAllCheckedOut

public static void removeAllCheckedOut(java.sql.Connection con,
                                       CheckedOut[] checkedOut)
Removes all candidates from the checked out list and removes the database entry.


removeCheckedOut

public static CheckedOut[] removeCheckedOut(java.sql.Connection con,
                                            CheckedOut[] checkedOut,
                                            java.lang.String cand,
                                            java.lang.String type,
                                            java.lang.String filt,
                                            boolean completed)
Removes a candidate from the checked out list, alters the database priority value if completed, and removes the database entry.


removeCheckedOut

public static CheckedOut[] removeCheckedOut(java.sql.Connection con,
                                            CheckedOut[] checkedOut,
                                            java.lang.String cand,
                                            java.lang.String type,
                                            java.lang.String filt,
                                            java.lang.String group,
                                            java.lang.String site,
                                            boolean completed)
Removes a candidate from the checked out list, alters the database priority value if completed, and removes the database entry.


removeCheckedOut

public static CheckedOut[] removeCheckedOut(java.sql.Connection con,
                                            CheckedOut[] checkedOut,
                                            int index,
                                            boolean completed)
Removes a candidate from the checked out list, alters the database priority value if completed, and removes the database entry.


addObservation

public static void addObservation(java.sql.Connection con,
                                  java.lang.String cand,
                                  java.lang.String type,
                                  java.lang.String filt,
                                  java.lang.String group,
                                  java.lang.String site,
                                  java.lang.String comments,
                                  java.util.Date obsDate)
Adds and entry to the list of observations.


addObservation

public static void addObservation(java.sql.Connection con,
                                  java.lang.String cand,
                                  java.lang.String type,
                                  java.lang.String filt,
                                  double mag,
                                  double magErr,
                                  java.lang.String group,
                                  java.lang.String site,
                                  java.lang.String comments,
                                  java.util.Date obsDate)
Adds and entry to the list of observations.


deleteObservation

public static void deleteObservation(java.sql.Connection con,
                                     ObservationInfo oi)
delete an observation entry


getGroupName

public static java.lang.String getGroupName(java.sql.Connection con,
                                            java.lang.String site)
get the default group name for a site.


getDetector

public static java.lang.String getDetector(java.sql.Connection con,
                                           java.lang.String site)
get the default detector name for a site.


getZeroPoint

public static double getZeroPoint(java.sql.Connection con,
                                  java.lang.String site)
get the default zeropoint for a site.


getScopeZP

public static double getScopeZP(java.sql.Connection con,
                                java.lang.String scope,
                                java.lang.String filter)
Get the zeropoint for a telescope and filter.


getScopeZPs

public static double[] getScopeZPs(java.sql.Connection con,
                                   java.lang.String scope)
Get all the zeropoints (u,b,v,r,i) for a telescope.


getCandMag

public static double getCandMag(java.sql.Connection con,
                                java.lang.String cand,
                                java.lang.String filter)
Get the current magnitude for a candidate and filter.


getMagnitudes

public static void getMagnitudes(java.sql.Connection con,
                                 java.lang.String cand,
                                 java.lang.String[] filters,
                                 java.lang.Double[] mags)
Get the current magnitude for a candidate and filter.


getMagnitudes

public static void getMagnitudes(java.sql.Connection con,
                                 java.lang.String cand,
                                 java.lang.String[] filters,
                                 double[] mags)
Get the current magnitude for a candidate and filter.


getPriorityInc

public static double getPriorityInc(java.sql.Connection con,
                                    java.lang.String cand,
                                    java.lang.String type,
                                    java.lang.String filter)
                             throws java.sql.SQLException
Returns the amount to increment a priority level (if any is given).

Throws:
java.sql.SQLException

lastObservedOn

public static java.lang.String lastObservedOn(java.sql.Connection con,
                                              java.lang.String cand,
                                              java.lang.String type,
                                              java.lang.String filter)
                                       throws java.sql.SQLException,
                                              java.text.ParseException
Throws:
java.sql.SQLException
java.text.ParseException

lastModifiedOn

public static java.lang.String lastModifiedOn(java.sql.Connection con,
                                              java.lang.String cand,
                                              java.lang.String type,
                                              java.lang.String filter)
                                       throws java.sql.SQLException,
                                              java.text.ParseException
Throws:
java.sql.SQLException
java.text.ParseException

justModified

public static void justModified(java.sql.Connection con,
                                java.lang.String cand,
                                java.lang.String type,
                                java.lang.String filt)
Call when an observation is made, or the priority is otherwise updated.


killOverDue

public static void killOverDue(java.sql.Connection con)
Removes items checked out for more that 12 hours.


newCandidate

public static void newCandidate(java.sql.Connection con,
                                java.lang.String funName,
                                java.lang.String scpName,
                                java.lang.String iauName,
                                java.lang.String ra,
                                java.lang.String dec,
                                java.lang.String discovered,
                                java.lang.String comments,
                                int overAll,
                                java.lang.String band,
                                java.lang.String state)
make new candidate entry


newCandidate

public static void newCandidate(java.sql.Connection con,
                                CandInfo ci)
make new candidate entry


getCandInfo

public static CandInfo getCandInfo(java.sql.Connection con,
                                   java.lang.String cand)
read a candidate's entries


getAllCandInfo

public static java.util.Vector getAllCandInfo(java.sql.Connection con)
read all candidate entries


newFilterStuff

public static void newFilterStuff(java.sql.Connection con,
                                  java.lang.String key1,
                                  java.lang.String key2,
                                  java.lang.String u,
                                  java.lang.String b,
                                  java.lang.String v,
                                  java.lang.String r,
                                  java.lang.String i)
make new filter_stuff entry


newPriority

public static void newPriority(java.sql.Connection con,
                               java.lang.String funName,
                               java.lang.String type,
                               int u,
                               int b,
                               int v,
                               int r,
                               int i)
make new priorities entry


newLastModified

public static void newLastModified(java.sql.Connection con,
                                   java.lang.String funName,
                                   java.lang.String type)
make new last_modified entry


getTimeZone

public static java.lang.String getTimeZone(java.sql.Connection con,
                                           java.lang.String site)
get the default TimeZone ID for a given site.


deleteRun

public static void deleteRun(java.sql.Connection con,
                             java.lang.String runName)
deletes a run from the database


isScheduled

public static boolean isScheduled(java.sql.Connection con,
                                  java.lang.String runName)
Checks to see if a run is scheduled or just proposed


isQueueScheduled

public static boolean isQueueScheduled(java.sql.Connection con,
                                       java.lang.String runName)
Checks to see if a run is Queue scheduled


getRunScope

public static java.lang.String getRunScope(java.sql.Connection con,
                                           java.lang.String runName)
gets a run's telescope name


getRunType

public static java.lang.String getRunType(java.sql.Connection con,
                                          java.lang.String runName)
gets a run's type


getRunGroup

public static java.lang.String getRunGroup(java.sql.Connection con,
                                           java.lang.String runName)
gets a run's group name


getRunNumDays

public static int getRunNumDays(java.sql.Connection con,
                                java.lang.String runName)
gets the number of days in a run


getScopeColor

public static int getScopeColor(java.sql.Connection con,
                                java.lang.String scope)
gets the color index for a telescope


setRunGroup

public static void setRunGroup(java.sql.Connection con,
                               java.lang.String runName,
                               java.lang.String group)
sets the group name for a run


setRunIsQueue

public static void setRunIsQueue(java.sql.Connection con,
                                 java.lang.String runName,
                                 boolean isQueue)
sets whether a run is Queue scheduled or not


setRunIsScheduled

public static void setRunIsScheduled(java.sql.Connection con,
                                     java.lang.String runName,
                                     boolean isScheduled)
sets whether a run is scheduled or not


getRunJulianDays

public static JulianDate[] getRunJulianDays(java.sql.Connection con,
                                            java.lang.String runName)
get the julian days of a run


getRunParam

public static java.lang.String getRunParam(java.sql.Connection con,
                                           java.lang.String runName,
                                           java.lang.String field)
select a field from the runs table


getAllRunParam

public static java.lang.String[] getAllRunParam(java.sql.Connection con,
                                                java.lang.String param)
select all the groups/scopes/types that have runs scheduled or proposed


getAllRunGroups

public static java.lang.String[] getAllRunGroups(java.sql.Connection con)
select all the groups that have runs scheduled or proposed


getAllRunScopes

public static java.lang.String[] getAllRunScopes(java.sql.Connection con)
select all the scopes that have runs scheduled or proposed


getAllRunTypes

public static java.lang.String[] getAllRunTypes(java.sql.Connection con)
select all the types that have runs scheduled or proposed


makeRun

public static void makeRun(java.sql.Connection con,
                           java.lang.String runName,
                           java.lang.String scope,
                           java.lang.String type,
                           java.lang.String group,
                           JulianDate[] jdays,
                           double[] fracs,
                           boolean isScheduled,
                           boolean isQueue)
create a new run


getRunNightFrac

public static double getRunNightFrac(java.sql.Connection con,
                                     java.lang.String runName,
                                     JulianDate jdate)
get the fraction of the night scheduled


getNightReport

public static java.lang.String getNightReport(java.sql.Connection con,
                                              java.lang.String scope,
                                              JulianDate jdate)
get the fraction of the night scheduled


submitObsForm

public static void submitObsForm(java.sql.Connection con,
                                 int runDate,
                                 java.lang.String scope,
                                 java.lang.String group,
                                 java.lang.String seeing,
                                 java.lang.String quality)
submit an observer report form


getAllStandFields

public static java.util.Vector getAllStandFields(java.sql.Connection con)
gets all the standard star fields (name, ra, dec)


getPhotStands

public static java.util.Vector getPhotStands(java.sql.Connection con)
gets all the photometric standard stars (name, ra, dec)


getStandards

public static java.util.Vector getStandards(java.sql.Connection con,
                                            double minRA,
                                            double maxRA,
                                            double minDEC,
                                            double maxDEC)
gets all the standard stars in a range (name, ra, dec). Expects minRA

getCandRaDec

public static java.util.Vector getCandRaDec(java.sql.Connection con)
gets all the candidates positions (name, ra, dec)


getOverAllPriority

public static int getOverAllPriority(java.sql.Connection con,
                                     java.lang.String cand)
Gets the over all priority for a given candidate. A return value of -99 signals an error


setOverAllPriority

public static void setOverAllPriority(java.sql.Connection con,
                                      java.lang.String cand,
                                      int value)
Sets the over all priority for a given candidate


getDaysSinceObserved

public static int getDaysSinceObserved(java.sql.Connection con,
                                       java.lang.String cand,
                                       java.lang.String type,
                                       java.lang.String filt,
                                       JulianDate now)
returns the number of days since last observation


setMoonFlag

public static void setMoonFlag(java.sql.Connection con,
                               java.lang.String cand,
                               boolean moonFlag)
indicates whether the moon is too close in the priorities


addPhotStand

public static void addPhotStand(java.sql.Connection con,
                                java.lang.String name,
                                java.lang.String field,
                                java.lang.String ra,
                                java.lang.String dec,
                                java.lang.String v,
                                java.lang.String b_v,
                                java.lang.String u_b,
                                java.lang.String v_r,
                                java.lang.String r_i,
                                java.lang.String v_i,
                                java.lang.String note)
add a photometric standard star to the database


addStandField

public static void addStandField(java.sql.Connection con,
                                 java.lang.String field,
                                 java.lang.String ra,
                                 java.lang.String dec)
add a standard star field


getPhotInfo

public static java.util.Hashtable getPhotInfo(java.sql.Connection con)
Gets all the info about the photometric stands in the db


getMoonFlag

public static boolean getMoonFlag(java.sql.Connection con,
                                  java.lang.String cand)
see if the database thinks the moon is too close


getObjType

public static java.lang.String getObjType(java.sql.Connection con,
                                          java.lang.String cand)
get the object type


fullAccess

public static boolean fullAccess(java.sql.Connection con)

addToEmailList

public static void addToEmailList(java.sql.Connection con,
                                  java.lang.String address,
                                  java.lang.String message)
puts and entry on the list of messages to email


getChanges

public static java.util.Vector getChanges(java.sql.Connection con,
                                          java.util.Date from,
                                          java.util.Date to,
                                          java.lang.String orderBy)
gets a list of all the changes made in the give time frame


newChangesMade

public static void newChangesMade(java.sql.Connection con,
                                  java.lang.String funName,
                                  java.lang.String property,
                                  java.lang.String from,
                                  java.lang.String to)
creaty a new changes_made entry


getObservations

public static java.util.Vector getObservations(java.sql.Connection con,
                                               java.util.Date from,
                                               java.util.Date to,
                                               java.lang.String orderBy)
gets a list of all the observations made in the give time frame