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