Mercurial > hg > STI-GWT
view war/scripts/sti/DataSet.js @ 30:1e95995ddbb2
re-added the ability to refine the dataset by a (very simple) text search
author | Sebastian Kruse <skruse@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 28 Nov 2012 17:01:34 +0100 |
parents | cf06b77a8bbd |
children | 8b58d9bc0bb6 |
line wrap: on
line source
/** * class that represents all needed informations about a performed dataset * @param {DataObject[]} objects corresponding data objects of this data set * @param {String} termIdentifier is a textual identifier for this dataset * @param {int} maxGranularity is the maximum granularity of the dataobjects of the set * * @constructor */ function DataSet(objects, termIdentifier, maxGranularity){ this.objects = objects; this.termIdentifier = termIdentifier; this.maxGranularity = maxGranularity; } DataSet.prototype = { /** * adds an object to the data set * @param {DataObject} object the object to add */ addObject: function(object){ this.objects.push(object); if( this.maxGranularity < object.granularity ){ this.maxGranularity = object.granularity; } }, /** * copies this dataset without objects * @return a DataSet object copy */ copy: function(){ return new DataSet( [], this.termIdentifier, 0 ); } }