Proposed Features

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

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

Model Inconsistencies

1. Record/Query/SummaryInstance instantiated differently

 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;