Dataset History

From Informatics

Jump to: navigation, search

Dataset History is a builtin component in geworkbench.

Contents

Feature

You can use it to add some text for an object.

Example output

For example, you can use ProjectPanel.addToHistory() function to add dataset history for ANOVA analysis result. After that, when user click ANOVA result, they will see the text you added for that object in Dataset History tab in command area.

DatasetHistory.png

Example code for using dataset history

 import org.geworkbench.builtin.projects.ProjectPanel;
 ProjectPanel.addToHistory(DSExtendableObject, "Text you want to put for this object");

Framework for easy coding

Simple dataset history for both local and grid analyses

Most of the dataset history are focus on how the results were generated, which means they only care about the input. Including:

  1. input dataset.
  2. operations/analysis
  3. parameters.

Above information will not change during calculation, so it's pretty easy to be handled by framework instead of individual components.

If you are implementing a component falls into this category,

you can easily override and implement public String toString() (was used before 2/14/2009) public String getDataSetHistory() in your parameter panel for your analysis.

(Please return a String contains dataset history for parameters in your parameter panel) Hint: You can generate this part by calling getParameters() you implemented for your parameter panel.

This getParameters() method will be called for both local and grid analyses to output parameters used in that analysis.

The framework will also output other parts of dataset history (dataset used, server used, etc) automatically.

You are also encuraged to implement

 public Map<Serializable, Serializable> getHumanReadableParameters()

The data returned should be the same as getParameters(), but in human readable format. ex: getParameters() will return 1 for parameter "method", but getHumanReadableParameters() will return "average" for parameter "Clustering Method: " When print out, user will see "Clustering Method: average" instead of "method: 1"

More complicated one

If your dataset history need information which can only be obtained WHILE, or AFTER executing the analysis (,so you are not be able to use method described in above section), your situation falls in to this category.

If your analysis will create a DSYourResultSet as result, you'll need to store the history information in DSYourResultSet when you generate the DSYourResultSet.

After geWorkbench got the result from grid server (or local analysis) and put the result as a node on project panel, it will fire a ProjectNodePostCompletedEvent event.

You can subscribe to ProjectNodePostCompletedEvent, and when you received this event, you can get the info from the node, generate history string and put in to dataset history.

Personal tools