changeset 16:775477d89709

added get for timestamp and timespan
author Sebastian Kruse <skruse@mpiwg-berlin.mpg.de>
date Mon, 26 Nov 2012 14:41:38 +0100
parents 175c1eecaf84
children 8f1aa93fad09
files war/scripts/sti/DataObject.js
diffstat 1 files changed, 33 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/war/scripts/sti/DataObject.js	Mon Nov 26 14:40:43 2012 +0100
+++ b/war/scripts/sti/DataObject.js	Mon Nov 26 14:41:38 2012 +0100
@@ -84,6 +84,39 @@
     	}
     },
     
+    /**
+     * return the string representation of the timeStamp
+     * @return the string representation of the timeStamp
+     */
+    getTimeStampString: function(){
+    	if( this.timeStamp != undefined ){
+    		return SimileAjax.DateTime.getTimeString(this.granularity,this.timeStamp)+"";
+    	}
+    	return(undefined);
+    },
+
+    /**
+     * return the string representation of the timeStamp
+     * @return the string representation of the timeStamp
+     */
+    getTimeSpanStartString: function(){
+    	if( this.timeSpan != undefined ){
+    		return SimileAjax.DateTime.getTimeString(this.granularity,this.timeSpan.start)+"";
+    	}
+    	return(undefined);
+    },
+
+    /**
+     * return the string representation of the timeStamp
+     * @return the string representation of the timeStamp
+     */
+    getTimeSpanEndString: function(){
+    	if( this.timeSpan != undefined ){
+    		return SimileAjax.DateTime.getTimeString(this.granularity,this.timeSpan.end)+"";
+    	}
+    	return(undefined);
+    },
+
     isSelected: function(){
 		if( this.percentage > 0 || this.hoverSelect ){
 			return true;