1 Clazz.declarePackage ("jalview.datamodel");
\r
2 Clazz.load (null, "jalview.datamodel.SequenceFeature", ["java.util.Hashtable", "$.Vector"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
8 this.description = null;
\r
9 this.otherDetails = null;
\r
11 this.featureGroup = null;
\r
12 Clazz.instantialize (this, arguments);
\r
13 }, jalview.datamodel, "SequenceFeature");
\r
14 Clazz.makeConstructor (c$,
\r
17 Clazz.makeConstructor (c$,
\r
20 this.begin = cpy.begin;
\r
22 this.score = cpy.score;
\r
23 if (cpy.type != null) {
\r
24 this.type = String.instantialize (cpy.type);
\r
25 }if (cpy.description != null) {
\r
26 this.description = String.instantialize (cpy.description);
\r
27 }if (cpy.featureGroup != null) {
\r
28 this.featureGroup = String.instantialize (cpy.featureGroup);
\r
29 }if (cpy.otherDetails != null) {
\r
31 this.otherDetails = cpy.otherDetails.clone ();
\r
33 if (Clazz.exceptionOf (e, Exception)) {
\r
38 }if (cpy.links != null && cpy.links.size () > 0) {
\r
39 this.links = new java.util.Vector ();
\r
40 for (var i = 0, iSize = cpy.links.size (); i < iSize; i++) {
\r
41 this.links.addElement (cpy.links.elementAt (i));
\r
43 }}}, "jalview.datamodel.SequenceFeature");
\r
44 Clazz.makeConstructor (c$,
\r
45 function (type, desc, status, begin, end, featureGroup) {
\r
47 this.description = desc;
\r
48 this.setValue ("status", status);
\r
51 this.featureGroup = featureGroup;
\r
52 }, "~S,~S,~S,~N,~N,~S");
\r
53 Clazz.makeConstructor (c$,
\r
54 function (type, desc, begin, end, score, featureGroup) {
\r
56 this.description = desc;
\r
60 this.featureGroup = featureGroup;
\r
61 }, "~S,~S,~N,~N,~N,~S");
\r
62 Clazz.defineMethod (c$, "equals",
\r
64 if (this.begin != sf.begin || this.end != sf.end || this.score != sf.score) {
\r
66 }if (!(this.type + this.description + this.featureGroup).equals (sf.type + sf.description + sf.featureGroup)) {
\r
69 }, "jalview.datamodel.SequenceFeature");
\r
70 Clazz.defineMethod (c$, "getBegin",
\r
74 Clazz.defineMethod (c$, "setBegin",
\r
78 Clazz.defineMethod (c$, "getEnd",
\r
82 Clazz.defineMethod (c$, "setEnd",
\r
86 Clazz.defineMethod (c$, "getType",
\r
90 Clazz.defineMethod (c$, "setType",
\r
94 Clazz.defineMethod (c$, "getDescription",
\r
96 return this.description;
\r
98 Clazz.defineMethod (c$, "setDescription",
\r
100 this.description = desc;
\r
102 Clazz.defineMethod (c$, "getFeatureGroup",
\r
104 return this.featureGroup;
\r
106 Clazz.defineMethod (c$, "setFeatureGroup",
\r
107 function (featureGroup) {
\r
108 this.featureGroup = featureGroup;
\r
110 Clazz.defineMethod (c$, "addLink",
\r
111 function (labelLink) {
\r
112 if (this.links == null) {
\r
113 this.links = new java.util.Vector ();
\r
114 }this.links.insertElementAt (labelLink, 0);
\r
116 Clazz.defineMethod (c$, "getScore",
\r
120 Clazz.defineMethod (c$, "setScore",
\r
122 this.score = value;
\r
124 Clazz.defineMethod (c$, "getValue",
\r
126 if (this.otherDetails == null) {
\r
129 return this.otherDetails.get (key);
\r
131 Clazz.defineMethod (c$, "setValue",
\r
132 function (key, value) {
\r
133 if (value != null) {
\r
134 if (this.otherDetails == null) {
\r
135 this.otherDetails = new java.util.Hashtable ();
\r
136 }this.otherDetails.put (key, value);
\r
138 Clazz.defineMethod (c$, "setStatus",
\r
139 function (status) {
\r
140 this.setValue ("status", status);
\r
142 Clazz.defineMethod (c$, "getStatus",
\r
144 if (this.otherDetails != null) {
\r
145 var stat = this.otherDetails.get ("status");
\r
146 if (stat != null) {
\r
147 return String.instantialize (stat);
\r
150 Clazz.defineMethod (c$, "setPosition",
\r
155 Clazz.defineMethod (c$, "getPosition",
\r
159 Clazz.defineMethod (c$, "getStrand",
\r
162 if (this.otherDetails == null || (str = this.otherDetails.get ("STRAND").toString ()) == null) {
\r
164 }if (str.equals ("-")) {
\r
166 }if (str.equals ("+")) {
\r