diff war/scripts/sti/DataObject.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 775477d89709
children
line wrap: on
line diff
--- a/war/scripts/sti/DataObject.js	Wed Jan 02 16:52:01 2013 +0100
+++ b/war/scripts/sti/DataObject.js	Thu Jan 03 18:43:28 2013 +0100
@@ -10,7 +10,7 @@
  * 
  * @constructor
  */
-DataObject = function(name, description, place, timeStamp, timeSpan, granularity, lon, lat){
+DataObject = function(name, description, place, timeStamp, timeSpan, granularity, lon, lat, descriptionData){
 
     this.name = name;
     this.description = description;
@@ -19,7 +19,9 @@
 	this.granularity = granularity;
     this.longitude = lon;
     this.latitude = lat;
-
+    
+    this.descriptionData = descriptionData;
+    
     this.setPlaces(place);
     this.status = false;
     this.percentage = 0;
@@ -140,6 +142,13 @@
     		return this.placeDetail[this.placeDetail.length-1];
     	}
     	return this.placeDetail[level];
+    },
+    
+    getDescriptionData: function(columnName){
+    	if (this.descriptionData[columnName] != null)
+    		return this.descriptionData[columnName];
+    	else
+    		return "";
     }
     
 };