+/*\r
+ * Jalview - A Sequence Alignment Editor and Viewer\r
+ * Copyright (C) 2006 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
package jalview.io;\r
\r
import jalview.datamodel.SequenceI;\r
import java.util.Vector;\r
-import com.stevesoft.pat.Regex;\r
public class ModellerDescription\r
{\r
/**\r
private resCode validResidueCode(String field)\r
{\r
Integer val = null;\r
- com.stevesoft.pat.Regex r = new Regex("\\s*((([-0-9]+).?)|FIRST|LAST|@)");\r
+ com.stevesoft.pat.Regex r = new com.stevesoft.pat.Regex("\\s*((([-0-9]+).?)|FIRST|LAST|@)");\r
\r
if (!r.search(field))\r
{\r
if (seq.getDatasetSequence() != null &&\r
seq.getDatasetSequence().getDBRef() != null)\r
{\r
- Vector dbr = seq.getDatasetSequence().getDBRef();\r
+ jalview.datamodel.DBRefEntry [] dbr = seq.getDatasetSequence().getDBRef();\r
int i, j;\r
- for (i = 0, j = dbr.size(); i < j; i++)\r
+ for (i = 0, j = dbr.length; i < j; i++)\r
{\r
- jalview.datamodel.DBRefEntry dref = (jalview.datamodel.DBRefEntry)\r
- dbr.elementAt(i);\r
- if (dref != null)\r
+ if (dbr[i] != null)\r
{\r
// JBPNote PDB dbRefEntry needs properties to propagate onto ModellerField\r
// JBPNote Need to get info from the user about whether the sequence is the one being modelled, or if it is a template.\r
- if (dref.getSource().equals("PDB"))\r
+ if (dbr[i].getSource().equals(jalview.datamodel.DBRefSource.PDB))\r
{\r
- fields.put(Fields[LOCALID], dref.getAccessionId());\r
+ fields.put(Fields[LOCALID], dbr[i].getAccessionId());\r
t = 2;\r
break;\r
}\r