X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=bin%2Fjalview%2Fdatamodel%2FSequenceFeature.js;h=d2f14a8b46c405bf9553008a96718520f73973e8;hp=f8ce54881bca427e83003b3f12b00e8d885d9368;hb=8ffd05b3abe52c0b6b79b011c0966361f82d5fe6;hpb=6154cb57a6eac3bb1344b8342495f5bb701ee921 diff --git a/bin/jalview/datamodel/SequenceFeature.js b/bin/jalview/datamodel/SequenceFeature.js index f8ce548..d2f14a8 100644 --- a/bin/jalview/datamodel/SequenceFeature.js +++ b/bin/jalview/datamodel/SequenceFeature.js @@ -1,170 +1,170 @@ -Clazz.declarePackage ("jalview.datamodel"); -Clazz.load (null, "jalview.datamodel.SequenceFeature", ["java.util.Hashtable", "$.Vector"], function () { -c$ = Clazz.decorateAsClass (function () { -this.begin = 0; -this.end = 0; -this.score = 0; -this.type = null; -this.description = null; -this.otherDetails = null; -this.links = null; -this.featureGroup = null; -Clazz.instantialize (this, arguments); -}, jalview.datamodel, "SequenceFeature"); -Clazz.makeConstructor (c$, -function () { -}); -Clazz.makeConstructor (c$, -function (cpy) { -if (cpy != null) { -this.begin = cpy.begin; -this.end = cpy.end; -this.score = cpy.score; -if (cpy.type != null) { -this.type = String.instantialize (cpy.type); -}if (cpy.description != null) { -this.description = String.instantialize (cpy.description); -}if (cpy.featureGroup != null) { -this.featureGroup = String.instantialize (cpy.featureGroup); -}if (cpy.otherDetails != null) { -try { -this.otherDetails = cpy.otherDetails.clone (); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -} else { -throw e; -} -} -}if (cpy.links != null && cpy.links.size () > 0) { -this.links = new java.util.Vector (); -for (var i = 0, iSize = cpy.links.size (); i < iSize; i++) { -this.links.addElement (cpy.links.elementAt (i)); -} -}}}, "jalview.datamodel.SequenceFeature"); -Clazz.makeConstructor (c$, -function (type, desc, status, begin, end, featureGroup) { -this.type = type; -this.description = desc; -this.setValue ("status", status); -this.begin = begin; -this.end = end; -this.featureGroup = featureGroup; -}, "~S,~S,~S,~N,~N,~S"); -Clazz.makeConstructor (c$, -function (type, desc, begin, end, score, featureGroup) { -this.type = type; -this.description = desc; -this.begin = begin; -this.end = end; -this.score = score; -this.featureGroup = featureGroup; -}, "~S,~S,~N,~N,~N,~S"); -Clazz.defineMethod (c$, "equals", -function (sf) { -if (this.begin != sf.begin || this.end != sf.end || this.score != sf.score) { -return false; -}if (!(this.type + this.description + this.featureGroup).equals (sf.type + sf.description + sf.featureGroup)) { -return false; -}return true; -}, "jalview.datamodel.SequenceFeature"); -Clazz.defineMethod (c$, "getBegin", -function () { -return this.begin; -}); -Clazz.defineMethod (c$, "setBegin", -function (start) { -this.begin = start; -}, "~N"); -Clazz.defineMethod (c$, "getEnd", -function () { -return this.end; -}); -Clazz.defineMethod (c$, "setEnd", -function (end) { -this.end = end; -}, "~N"); -Clazz.defineMethod (c$, "getType", -function () { -return this.type; -}); -Clazz.defineMethod (c$, "setType", -function (type) { -this.type = type; -}, "~S"); -Clazz.defineMethod (c$, "getDescription", -function () { -return this.description; -}); -Clazz.defineMethod (c$, "setDescription", -function (desc) { -this.description = desc; -}, "~S"); -Clazz.defineMethod (c$, "getFeatureGroup", -function () { -return this.featureGroup; -}); -Clazz.defineMethod (c$, "setFeatureGroup", -function (featureGroup) { -this.featureGroup = featureGroup; -}, "~S"); -Clazz.defineMethod (c$, "addLink", -function (labelLink) { -if (this.links == null) { -this.links = new java.util.Vector (); -}this.links.insertElementAt (labelLink, 0); -}, "~S"); -Clazz.defineMethod (c$, "getScore", -function () { -return this.score; -}); -Clazz.defineMethod (c$, "setScore", -function (value) { -this.score = value; -}, "~N"); -Clazz.defineMethod (c$, "getValue", -function (key) { -if (this.otherDetails == null) { -return null; -} else { -return this.otherDetails.get (key); -}}, "~S"); -Clazz.defineMethod (c$, "setValue", -function (key, value) { -if (value != null) { -if (this.otherDetails == null) { -this.otherDetails = new java.util.Hashtable (); -}this.otherDetails.put (key, value); -}}, "~S,~O"); -Clazz.defineMethod (c$, "setStatus", -function (status) { -this.setValue ("status", status); -}, "~S"); -Clazz.defineMethod (c$, "getStatus", -function () { -if (this.otherDetails != null) { -var stat = this.otherDetails.get ("status"); -if (stat != null) { -return String.instantialize (stat); -}}return null; -}); -Clazz.defineMethod (c$, "setPosition", -function (pos) { -this.begin = pos; -this.end = pos; -}, "~N"); -Clazz.defineMethod (c$, "getPosition", -function () { -return this.begin; -}); -Clazz.defineMethod (c$, "getStrand", -function () { -var str; -if (this.otherDetails == null || (str = this.otherDetails.get ("STRAND").toString ()) == null) { -return 0; -}if (str.equals ("-")) { -return -1; -}if (str.equals ("+")) { -return 1; -}return 0; -}); -}); +Clazz.declarePackage ("jalview.datamodel"); +Clazz.load (null, "jalview.datamodel.SequenceFeature", ["java.util.Hashtable", "$.Vector"], function () { +c$ = Clazz.decorateAsClass (function () { +this.begin = 0; +this.end = 0; +this.score = 0; +this.type = null; +this.description = null; +this.otherDetails = null; +this.links = null; +this.featureGroup = null; +Clazz.instantialize (this, arguments); +}, jalview.datamodel, "SequenceFeature"); +Clazz.makeConstructor (c$, +function () { +}); +Clazz.makeConstructor (c$, +function (cpy) { +if (cpy != null) { +this.begin = cpy.begin; +this.end = cpy.end; +this.score = cpy.score; +if (cpy.type != null) { +this.type = String.instantialize (cpy.type); +}if (cpy.description != null) { +this.description = String.instantialize (cpy.description); +}if (cpy.featureGroup != null) { +this.featureGroup = String.instantialize (cpy.featureGroup); +}if (cpy.otherDetails != null) { +try { +this.otherDetails = cpy.otherDetails.clone (); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +} else { +throw e; +} +} +}if (cpy.links != null && cpy.links.size () > 0) { +this.links = new java.util.Vector (); +for (var i = 0, iSize = cpy.links.size (); i < iSize; i++) { +this.links.addElement (cpy.links.elementAt (i)); +} +}}}, "jalview.datamodel.SequenceFeature"); +Clazz.makeConstructor (c$, +function (type, desc, status, begin, end, featureGroup) { +this.type = type; +this.description = desc; +this.setValue ("status", status); +this.begin = begin; +this.end = end; +this.featureGroup = featureGroup; +}, "~S,~S,~S,~N,~N,~S"); +Clazz.makeConstructor (c$, +function (type, desc, begin, end, score, featureGroup) { +this.type = type; +this.description = desc; +this.begin = begin; +this.end = end; +this.score = score; +this.featureGroup = featureGroup; +}, "~S,~S,~N,~N,~N,~S"); +Clazz.defineMethod (c$, "equals", +function (sf) { +if (this.begin != sf.begin || this.end != sf.end || this.score != sf.score) { +return false; +}if (!(this.type + this.description + this.featureGroup).equals (sf.type + sf.description + sf.featureGroup)) { +return false; +}return true; +}, "jalview.datamodel.SequenceFeature"); +Clazz.defineMethod (c$, "getBegin", +function () { +return this.begin; +}); +Clazz.defineMethod (c$, "setBegin", +function (start) { +this.begin = start; +}, "~N"); +Clazz.defineMethod (c$, "getEnd", +function () { +return this.end; +}); +Clazz.defineMethod (c$, "setEnd", +function (end) { +this.end = end; +}, "~N"); +Clazz.defineMethod (c$, "getType", +function () { +return this.type; +}); +Clazz.defineMethod (c$, "setType", +function (type) { +this.type = type; +}, "~S"); +Clazz.defineMethod (c$, "getDescription", +function () { +return this.description; +}); +Clazz.defineMethod (c$, "setDescription", +function (desc) { +this.description = desc; +}, "~S"); +Clazz.defineMethod (c$, "getFeatureGroup", +function () { +return this.featureGroup; +}); +Clazz.defineMethod (c$, "setFeatureGroup", +function (featureGroup) { +this.featureGroup = featureGroup; +}, "~S"); +Clazz.defineMethod (c$, "addLink", +function (labelLink) { +if (this.links == null) { +this.links = new java.util.Vector (); +}this.links.insertElementAt (labelLink, 0); +}, "~S"); +Clazz.defineMethod (c$, "getScore", +function () { +return this.score; +}); +Clazz.defineMethod (c$, "setScore", +function (value) { +this.score = value; +}, "~N"); +Clazz.defineMethod (c$, "getValue", +function (key) { +if (this.otherDetails == null) { +return null; +} else { +return this.otherDetails.get (key); +}}, "~S"); +Clazz.defineMethod (c$, "setValue", +function (key, value) { +if (value != null) { +if (this.otherDetails == null) { +this.otherDetails = new java.util.Hashtable (); +}this.otherDetails.put (key, value); +}}, "~S,~O"); +Clazz.defineMethod (c$, "setStatus", +function (status) { +this.setValue ("status", status); +}, "~S"); +Clazz.defineMethod (c$, "getStatus", +function () { +if (this.otherDetails != null) { +var stat = this.otherDetails.get ("status"); +if (stat != null) { +return String.instantialize (stat); +}}return null; +}); +Clazz.defineMethod (c$, "setPosition", +function (pos) { +this.begin = pos; +this.end = pos; +}, "~N"); +Clazz.defineMethod (c$, "getPosition", +function () { +return this.begin; +}); +Clazz.defineMethod (c$, "getStrand", +function () { +var str; +if (this.otherDetails == null || (str = this.otherDetails.get ("STRAND").toString ()) == null) { +return 0; +}if (str.equals ("-")) { +return -1; +}if (str.equals ("+")) { +return 1; +}return 0; +}); +});