Mercurial > hg > STI-GWT
comparison war/scripts/sti/DataSet.js @ 68:8b58d9bc0bb6 trimmed_data
add functionality for additional tabular data from the description field (work in progress)
author | Sebastian Kruse <skruse@mpiwg-berlin.mpg.de> |
---|---|
date | Thu, 03 Jan 2013 18:43:28 +0100 |
parents | cf06b77a8bbd |
children |
comparison
equal
deleted
inserted
replaced
67:5b049141a26e | 68:8b58d9bc0bb6 |
---|---|
9 function DataSet(objects, termIdentifier, maxGranularity){ | 9 function DataSet(objects, termIdentifier, maxGranularity){ |
10 | 10 |
11 this.objects = objects; | 11 this.objects = objects; |
12 this.termIdentifier = termIdentifier; | 12 this.termIdentifier = termIdentifier; |
13 this.maxGranularity = maxGranularity; | 13 this.maxGranularity = maxGranularity; |
14 | 14 |
15 //check through each object if the description field contained a table, | |
16 //and "remember" the column names for easy access later | |
17 this.descriptionDataColumns = new Array(); | |
18 for (var i = 0; i < this.objects.length; i++) { | |
19 for (var columnName in this.objects[i].descriptionData) { | |
20 if ($.inArray(columnName, this.descriptionDataColumns) == -1) | |
21 this.descriptionDataColumns.push(columnName); | |
22 } | |
23 } | |
15 } | 24 } |
16 | 25 |
17 DataSet.prototype = { | 26 DataSet.prototype = { |
18 | 27 |
19 /** | 28 /** |