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