X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequence.java;h=b50e5af92191c7cd2df24696f40a95db15634d7a;hb=e44876a5a8801c0118b67793ebd57d21079be7b0;hp=bb634665c3f9c11e8b034b50b117b97a4ded2ae2;hpb=141eaf3859dbd8304fe664b37ef81848353406e0;p=jalview.git diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index bb63466..b50e5af 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -28,6 +28,7 @@ import jalview.util.StringUtils; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.Enumeration; import java.util.List; import java.util.Vector; @@ -59,8 +60,6 @@ public class Sequence extends ASequence implements SequenceI String vamsasId; - DBRefEntryI sourceDBRef; - DBRefEntry[] dbrefs; RNA rna; @@ -1424,12 +1423,12 @@ public class Sequence extends ASequence implements SequenceI } if (dbrefs==null || dbrefs.length==0) { - return Arrays.asList(new DBRefEntry[0]); + return Collections.emptyList(); } synchronized (dbrefs) { List primaries = new ArrayList(); - DBRefEntry tmp[] = new DBRefEntry[1], res[] = null; + DBRefEntry[] tmp = new DBRefEntry[1]; for (DBRefEntry ref : dbrefs) { if (!ref.isPrimary()) @@ -1451,13 +1450,12 @@ public class Sequence extends ASequence implements SequenceI { // PDB dbrefs imply there should be a PDBEntry associated // TODO: tighten PDB dbrefs - // formally imply Jalview has actually downlaoded and + // formally imply Jalview has actually downloaded and // parsed the pdb file. That means there should be a cached file // handle on the PDBEntry, and a real mapping between sequence and // extracted sequence from PDB file PDBEntry pdbentry = getPDBEntry(ref.getAccessionId()); - if (pdbentry != null && pdbentry.getType() != null - && pdbentry.getType().equalsIgnoreCase("PDB")) + if (pdbentry != null && pdbentry.getFile() != null) { primaries.add(ref); } @@ -1465,7 +1463,7 @@ public class Sequence extends ASequence implements SequenceI } // check standard protein or dna sources tmp[0] = ref; - res = DBRefUtils.selectDbRefs(!isProtein(), tmp); + DBRefEntry[] res = DBRefUtils.selectDbRefs(!isProtein(), tmp); if (res != null && res[0] == tmp[0]) { primaries.add(ref);