Proposed Features
Query history
- Introduce idea of a UserI object, which can be implemented either as session or persistant.
Introduce idea of a "user supplied name for an Answer"
- it is displayed as the answer, with a little "edit" button to adjust it. uses question name as default
User's state includes:
- user id
- Answers (not the result, but, the Question and param values)
- optionally a name for each Answer
- implemented as session info at first
view
- shows history with same columns as www.Allgenes.org
- query column shows "user supplied name"
- 2-3 weeks
Persistant query history
- that's a whole nother matter, and has to do with authentication, right?
Meta-parameters, aka, query context
- The model declares available meta-parameters.
- the main example of this is taxon.
- the user must set the value at the start of the session (via entry point possibly)
- no queries allow this parameter to be changed.
- the value can be interpolated into any query in the model (like a macro), particularly controlled vocabs
- gets stored as a normal parameter in the query instance table
- this depends on UserI
- view: not quite sure yet.
- 1 week
Graphics plugins
- 1 week
Process queries (eg, blast)
- 3 weeks
Record sub-page hints
- 2 weeks
Report maker
- 2 weeks
input file upload
- 2 weeks
enumParam
- .5 week
tree vocabs, and other shapes
- 3 weeks
- user control over summary columns
- user sorting of summaries
Other Notes
UserI and the WDK Model
We envision having to parameterize some model operations with state associated with a user. Examples of this state are
| history | A list of the questions the user has asked |
|---|---|
| preferences | For the model, this means parameter values that are set globally |
| meta-parameters | Meta-parameters are parameters that other parameters use. The canonical example is a meta-parameter that specifies taxon, and a normal parameter, such as a controlled vocabulary of anatomy terms, that is built specifically for particular taxa. |
Regardless of the information that is stored for a user, we need a mechanism to provide that info to the Model.
The proposal is to create two create a few new things
- WdkModelUserI
- WdkModelBean
- QuestionBean
WdkModelI encapsulates the state of a user. It is an interface so that the model doesn't know about what kind of storage (eg, session, database, files, etc) underlies the info.
WdkModelBean wraps the exposed bean properties of WdkModel (eg, getQuestionSet). WdkModelBean is either constructed with or has a setter for WdkModelUserI. The methods it wraps on WdkModel are modified so that they take WdkModelUserI as an argument, thus propogating that value into the model.
One of the affected model properties is getQuestionSet(). Previously it returned Summary objects. Now it must return QuestionBeans objects. These will have their WdkModelUserI values set so that when, for example, the Question provides a list of parameters, it can omit those that are already answered by the user's preferences.
Record List to-do list
Query
- Refactor
QueryInstance
- Refactor
- add method: setMultiMode(String resultTableName, String pkToJoinWith, int startRow, int endRow)
- change getSql() to incorporate multi-mode (Corrupt where clause)
RecordInstance
- add method: setRecordListInstance
Getting a value for a field--RecordListInstance set
- checks to see if field is populated yet
- if not, gets multimode values from RecordListInstance
- finds appropriate query for field
- calls setMultiMode on query
- runs query
- pass result set back to RecordListInstance. Do not set my values.
Getting a value for a field--RecordListInstance not set
- get appropriate query for field, set my values
New classes
RecordList
- Write it
- Binding between a Query and a Record
- Needs XML parser (new types)
- method: getRecordListInstance(int startRow, int endRow)
RecordListInstance
- Write it
- has internal pointer to 'current' RecordInstance
- Has QueryInstance with list of id's
add method: getNextRecordInstance
initializes all record instances (one for each id)
- calls setRecordListInstance on each
- puts in internal array
- returns first RecordInstance
add method: setQueryResult
- Takes ResultSet from a RecordInstance which has run the query
- Updates all RecordInstances with its results (including RecordInstance that gave it the Query)
Model Inconsistencies
1. Record/Query/SummaryInstance instantiated differently
- Creating Instance objects use different mechanism/naming scheme for instantiation of each type of model object
RecordInstance ------------------- RecordInstance ri = record.makeRecordInstance(); ri.setPrimaryKey(int); QueryInstance ---------------- QueryInstance qi = query.makeInstance(); qi.setValues(valuesMap); SummaryInstance ------------------- SummaryInstance si = makeSummaryInstance(paramterValuesMap, startRowNumber, endRowNumber);
2. Iterator Methods do not match between WdkModel and (Record/Query/Summary)Sets
RecordSet rs[] = wdkModel.getAllRecordSets(); Record r[] = rs[0].getRecords;




