diff src/main/webapp/imageServer/resources/js/ismiUtils.js @ 7:764f47286679

(none)
author jurzua
date Wed, 29 Oct 2014 14:28:34 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/webapp/imageServer/resources/js/ismiUtils.js	Wed Oct 29 14:28:34 2014 +0000
@@ -0,0 +1,29 @@
+
+
+function Entity (json) {
+	this.id = json.id;
+	this.oc = json.oc;
+	this.ov = json.ov;
+	this.nov = json.nov;
+	this.lw = json.lw;
+	this.node_type = json.node_type;
+	
+	//attention: this array are saved as map<index, object>
+	this.atts = json.atts;
+	this.src_rels = json.src_rels;
+	this.tar_rels = json.tar_rels;
+    
+	this.getAttOvByName = function(attName){
+		for(var mapKey in this.atts){
+			var name = this.atts[mapKey].name;
+			if(name == attName){
+				return this.atts[mapKey].ov;
+			}
+		}
+	}
+	
+	this.toString = function() {
+        return "Entity [id="+this.id+", ov="+this.ov+"]";
+    };
+}
+