Hardware DB interface
What does it do?
-users can enter a new component
-users can enter a list of new components
-users can enter a revision for a component
-users can find a components serial and Minos ID from time/location data
-users can find time/location from serial or Minos ID
-users can see the history of a component from serial or MinosID
-users can see some visualization of current state of detector (?)
Java program for choice- Card layout with pages for
-login
-chooser: pick type of component and what to do with it
-new component page
-new components from list page
-revise component page
-find component page
-view and print history page
-vis state page (?)
Minos ID is remembered between pages
How it works
Each species of component has an associated checker object, which basically handles the different kinds of location/time data, and anything else unique to a given type of component. It can:
-supply a list of location data names for text field labels like [“rack”,”crate”,”slot”]
-breakdown a single location/time line of a Result Set returned from the database
-breakdown a multiline location/time Result Set from the database
-take an array of location data ( like [5,4,2] ) and construct a string to include in a
select command to DB (like “where rack=5 and crate=4 and slot=2”)
-know if a given location must be unique or not
-approve a serial number
-approve a manufacturer
-approve a revision number
-approve a set of location data (does rack=5, crate=4, slot=2 really exist?)
LoginPanel:
Users fill in username and password, loginPanel calls openConn DBT. If successful, Main flips to chooserPanel. If unsuccessful, error message is shown, users try again.
ChooserPanel:
Users see a list of different types of components, and a list of things to do. They pick one from each list, then hit Go. Main then brings up the appropriate Panel.
New Component Panel
NewComponentPanel shows JTextFields for the new components serial, model, manufacturer and revision number. NewComponentPanel calls DBTalker which writes the information to the database, and makes an entry into the validity table for the new component.
New Component List Panel
NewComponentListPanel makes a FilePicker that lets users pick out a csv file with serial, model, manufacturers, and revison numbers. NewComponentListPanel then shows the deciphered data to the user, and asks for confirmation. If granted, it writes the info to the database, and makes a validity (one validity for all or one for each line???) for it.
Revise Component Panel
Users see TFs for component location/time, MID and serial. They may fill in either loc/time, MID or serial, then click Find. Missing values are filled in from database (if possible). Another TF shows the current revision number. Users enter new revision number, comments, and click store. Panel checks to see if it knows about this revision; ifso it ends current Component validity and starts a new one with new revision number.
If it doesnt have any other components with this revision, it confirms with user (via popup) that they want to make a new revision, and havent just mistyped an existing one.
Find Component Panel
Users see TFs for all location/time fields, MID and serial number. They fill in one of the three, and the empty fields are filled in from the database. There is a “Print It” button. The system remembers the last MID found, and uses it to initialize all new Panels.
View Component History Panel
Users see TFs for all location/time fields, MID and serial. They fill in one of the three, and the database fills in the others (as above). The panel looks through the database and returns revision, loc, time, insert motivation, insert comments, removal motivation and removal comments for all validities with the same serial number. This data is shown to the user, with a “Print It” button.
DatabaseTalker
DBT handles all connections to the database. It can
-login(user,password)
-Find serial, rev from location/time
-Find current MID from serial or location/time
-Find current location/time from MID or serial
-Find MID from serial
-Find motivations and comments from MID, time
-Find all known revisions for a species of component
Minos HWDB
Interface