JAL-1432 updated copyright notices
[jalview.git] / src / jalview / structure / StructureMapping.java
index 06e6bc3..c66b740 100644 (file)
-/*\r
- * Jalview - A Sequence Alignment Editor and Viewer\r
- * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
- *\r
- * This program is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU General Public License\r
- * as published by the Free Software Foundation; either version 2\r
- * of the License, or (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
- */\r
-\r
-package jalview.structure;\r
-\r
-import jalview.datamodel.*;\r
-\r
-public class StructureMapping\r
-{\r
-  String mappingDetails;\r
-  SequenceI sequence;\r
-  String pdbfile;\r
-  String pdbid;\r
-  String pdbchain;\r
-\r
-  //Mapping index 0 is resNum, index 1 is atomNo\r
-  int[][] mapping;\r
-\r
-  public StructureMapping(SequenceI seq,\r
-                          String pdbfile,\r
-                          String pdbid,\r
-                          String chain,\r
-                          int[][] mapping,\r
-                          String mappingDetails)\r
-  {\r
-    sequence = seq;\r
-    this.pdbfile = pdbfile;\r
-    this.pdbid = pdbid;\r
-    this.pdbchain = chain;\r
-    this.mapping = mapping;\r
-    this.mappingDetails = mappingDetails;\r
-  }\r
-\r
-  public SequenceI getSequence()\r
-  {\r
-    return sequence;\r
-  }\r
-\r
-  public String getChain()\r
-  {\r
-    return pdbchain;\r
-  }\r
-\r
-  public String getPdbId()\r
-  {\r
-    return pdbid;\r
-  }\r
-\r
-  public int getAtomNum(int seqpos)\r
-  {\r
-    if (mapping.length > seqpos)\r
-    {\r
-      return mapping[seqpos][1];\r
-    }\r
-    else\r
-    {\r
-      return 0;\r
-    }\r
-  }\r
-\r
-  public int getPDBResNum(int seqpos)\r
-  {\r
-    if (mapping.length > seqpos)\r
-    {\r
-      return mapping[seqpos][0];\r
-    }\r
-    else\r
-    {\r
-      return 0;\r
-    }\r
-  }\r
-\r
-  public int getSeqPos(int pdbResNum)\r
-  {\r
-    for (int i = 0; i < mapping.length; i++)\r
-    {\r
-      if (mapping[i][0] == pdbResNum)\r
-      {\r
-        return i;\r
-      }\r
-    }\r
-    return -1;\r
-  }\r
-}\r
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
+ * Copyright (C) 2014 The Jalview Authors
+ * 
+ * This file is part of Jalview.
+ * 
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License 
+ * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ *  
+ * Jalview is distributed in the hope that it will be useful, but 
+ * WITHOUT ANY WARRANTY; without even the implied warranty 
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ * PURPOSE.  See the GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
+package jalview.structure;
+
+import jalview.datamodel.*;
+
+public class StructureMapping
+{
+  String mappingDetails;
+
+  SequenceI sequence;
+
+  String pdbfile;
+
+  String pdbid;
+
+  String pdbchain;
+
+  // Mapping index 0 is resNum, index 1 is atomNo
+  int[][] mapping;
+
+  public StructureMapping(SequenceI seq, String pdbfile, String pdbid,
+          String chain, int[][] mapping, String mappingDetails)
+  {
+    sequence = seq;
+    this.pdbfile = pdbfile;
+    this.pdbid = pdbid;
+    this.pdbchain = chain;
+    this.mapping = mapping;
+    this.mappingDetails = mappingDetails;
+  }
+
+  public SequenceI getSequence()
+  {
+    return sequence;
+  }
+
+  public String getChain()
+  {
+    return pdbchain;
+  }
+
+  public String getPdbId()
+  {
+    return pdbid;
+  }
+
+  public int getAtomNum(int seqpos)
+  {
+    if (mapping.length > seqpos)
+    {
+      return mapping[seqpos][1];
+    }
+    else
+    {
+      return 0;
+    }
+  }
+
+  public int getPDBResNum(int seqpos)
+  {
+    if (mapping.length > seqpos)
+    {
+      return mapping[seqpos][0];
+    }
+    else
+    {
+      return 0;
+    }
+  }
+
+  public int getSeqPos(int pdbResNum)
+  {
+    for (int i = 0; i < mapping.length; i++)
+    {
+      if (mapping[i][0] == pdbResNum)
+      {
+        return i;
+      }
+    }
+    return -1;
+  }
+}