JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / j2s / jalview / datamodel / PDBEntry.js
1 Clazz.declarePackage ("jalview.datamodel");\r
2 Clazz.load (["java.lang.Enum"], "jalview.datamodel.PDBEntry", null, function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.file = null;\r
5 this.type = null;\r
6 this.id = null;\r
7 this.chainCode = null;\r
8 this.properties = null;\r
9 Clazz.instantialize (this, arguments);\r
10 }, jalview.datamodel, "PDBEntry");\r
11 Clazz.overrideMethod (c$, "equals", \r
12 function (obj) {\r
13 if (obj == null || !(Clazz.instanceOf (obj, jalview.datamodel.PDBEntry))) {\r
14 return false;\r
15 }if (obj === this) {\r
16 return true;\r
17 }var o = obj;\r
18 return (this.type === o.type || (this.type != null && o.type != null && o.type.equals (this.type))) && (this.id === o.id || (this.id != null && o.id != null && o.id.equalsIgnoreCase (this.id))) && (this.chainCode === o.chainCode || (this.chainCode != null && o.chainCode != null && o.chainCode.equalsIgnoreCase (this.chainCode))) && (this.properties === o.properties || (this.properties != null && o.properties != null && this.properties.equals (o.properties)));\r
19 }, "~O");\r
20 Clazz.makeConstructor (c$, \r
21 function () {\r
22 });\r
23 Clazz.makeConstructor (c$, \r
24 function (pdbId, chain, type, filePath) {\r
25 this.id = pdbId;\r
26 this.chainCode = chain;\r
27 this.type = type == null ? null : type.toString ();\r
28 this.file = filePath;\r
29 }, "~S,~S,jalview.datamodel.PDBEntry.Type,~S");\r
30 Clazz.makeConstructor (c$, \r
31 function (entry) {\r
32 this.file = entry.file;\r
33 this.type = entry.type;\r
34 this.id = entry.id;\r
35 this.chainCode = entry.chainCode;\r
36 if (entry.properties != null) {\r
37 this.properties = entry.properties.clone ();\r
38 }}, "jalview.datamodel.PDBEntry");\r
39 Clazz.defineMethod (c$, "setFile", \r
40 function (file) {\r
41 this.file = file;\r
42 }, "~S");\r
43 Clazz.defineMethod (c$, "getFile", \r
44 function () {\r
45 return this.file;\r
46 });\r
47 Clazz.defineMethod (c$, "setType", \r
48 function (t) {\r
49 this.type = t;\r
50 }, "~S");\r
51 Clazz.defineMethod (c$, "setType", \r
52 function (type) {\r
53 this.type = type == null ? null : type.toString ();\r
54 }, "jalview.datamodel.PDBEntry.Type");\r
55 Clazz.defineMethod (c$, "getType", \r
56 function () {\r
57 return this.type;\r
58 });\r
59 Clazz.defineMethod (c$, "setId", \r
60 function (id) {\r
61 this.id = id;\r
62 }, "~S");\r
63 Clazz.defineMethod (c$, "getId", \r
64 function () {\r
65 return this.id;\r
66 });\r
67 Clazz.defineMethod (c$, "setProperty", \r
68 function (property) {\r
69 this.properties = property;\r
70 }, "java.util.Hashtable");\r
71 Clazz.defineMethod (c$, "getProperty", \r
72 function () {\r
73 return this.properties;\r
74 });\r
75 Clazz.defineMethod (c$, "getChainCode", \r
76 function () {\r
77 return this.chainCode;\r
78 });\r
79 Clazz.defineMethod (c$, "setChainCode", \r
80 function (chainCode) {\r
81 this.chainCode = chainCode;\r
82 }, "~S");\r
83 Clazz.pu$h(self.c$);\r
84 c$ = Clazz.declareType (jalview.datamodel.PDBEntry, "Type", Enum);\r
85 Clazz.defineEnumConstant (c$, "PDB", 0, []);\r
86 Clazz.defineEnumConstant (c$, "FILE", 1, []);\r
87 c$ = Clazz.p0p ();\r
88 });\r