comparison war/scripts/sti/DataSet.js @ 3:cf06b77a8bbd

Committed branch of the e4D repos sti-gwt branch 16384. git-svn-id: http://dev.dariah.eu/svn/repos/eu.dariah.de/ap1/sti-gwt-dariah-geobrowser@36 f2b5be40-def6-11e0-8a09-b3c1cc336c6b
author StefanFunk <StefanFunk@f2b5be40-def6-11e0-8a09-b3c1cc336c6b>
date Tue, 17 Jul 2012 13:34:40 +0000
parents
children 8b58d9bc0bb6
comparison
equal deleted inserted replaced
2:2897af43ccc6 3:cf06b77a8bbd
1 /**
2 * class that represents all needed informations about a performed dataset
3 * @param {DataObject[]} objects corresponding data objects of this data set
4 * @param {String} termIdentifier is a textual identifier for this dataset
5 * @param {int} maxGranularity is the maximum granularity of the dataobjects of the set
6 *
7 * @constructor
8 */
9 function DataSet(objects, termIdentifier, maxGranularity){
10
11 this.objects = objects;
12 this.termIdentifier = termIdentifier;
13 this.maxGranularity = maxGranularity;
14
15 }
16
17 DataSet.prototype = {
18
19 /**
20 * adds an object to the data set
21 * @param {DataObject} object the object to add
22 */
23 addObject: function(object){
24 this.objects.push(object);
25 if( this.maxGranularity < object.granularity ){
26 this.maxGranularity = object.granularity;
27 }
28 },
29
30 /**
31 * copies this dataset without objects
32 * @return a DataSet object copy
33 */
34 copy: function(){
35 return new DataSet( [], this.termIdentifier, 0 );
36 }
37
38 }