/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1)
+ * Copyright (C) 2015 The Jalview Authors
*
* This file is part of Jalview.
*
RNA rna;
-
/**
* This annotation is displayed below the alignment but the positions are tied
* to the residues of this sequence
}
}
}
- if (seq.getPDBId() != null)
+ if (seq.getAllPDBEntries() != null)
{
- Vector ids = seq.getPDBId();
+ Vector ids = seq.getAllPDBEntries();
Enumeration e = ids.elements();
while (e.hasMoreElements())
{
* @return DOCUMENT ME!
*/
@Override
- public Vector<PDBEntry> getPDBId()
+ public Vector<PDBEntry> getAllPDBEntries()
{
return pdbIds;
}
{
if (lastj != -1)
{
- map.add(new int[]
- { lastj, j - 1 });
+ map.add(new int[] { lastj, j - 1 });
lastj = -1;
}
}
}
if (lastj != -1)
{
- map.add(new int[]
- { lastj, j - 1 });
+ map.add(new int[] { lastj, j - 1 });
lastj = -1;
}
return map;
.toArray(new AlignmentAnnotation[annotation.size()]);
}
-
@Override
public boolean hasAnnotation(AlignmentAnnotation ann)
{
// move database references onto dataset sequence
datasetSequence.setDBRef(getDBRef());
setDBRef(null);
- datasetSequence.setPDBId(getPDBId());
+ datasetSequence.setPDBId(getAllPDBEntries());
setPDBId(null);
datasetSequence.updatePDBIds();
if (annotation != null)
for (int si = 0; si < sfs.length; si++)
{
SequenceFeature sf[] = (mp != null) ? mp.locateFeature(sfs[si])
- : new SequenceFeature[]
- { new SequenceFeature(sfs[si]) };
+ : new SequenceFeature[] { new SequenceFeature(sfs[si]) };
if (sf != null && sf.length > 0)
{
for (int sfi = 0; sfi < sf.length; sfi++)
}
// transfer PDB entries
- if (entry.getPDBId() != null)
+ if (entry.getAllPDBEntries() != null)
{
- Enumeration e = entry.getPDBId().elements();
+ Enumeration e = entry.getAllPDBEntries().elements();
while (e.hasMoreElements())
{
PDBEntry pdb = (PDBEntry) e.nextElement();
return result;
}
+ public String toString()
+ {
+ return getDisplayId(false);
+ }
+
+ @Override
+ public PDBEntry getPDBEntry(String pdbIdStr)
+ {
+ if (getDatasetSequence() == null
+ || getDatasetSequence().getAllPDBEntries() == null)
+ {
+ return null;
+ }
+ List<PDBEntry> entries = getDatasetSequence().getAllPDBEntries();
+ for (PDBEntry entry : entries)
+ {
+ if (entry.getId().equalsIgnoreCase(pdbIdStr))
+ {
+ return entry;
+ }
+ }
+ return null;
+ }
}