git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1752 structure highlight scoped to only its mapped sequences
[jalview.git]
/
src
/
jalview
/
datamodel
/
Sequence.java
diff --git
a/src/jalview/datamodel/Sequence.java
b/src/jalview/datamodel/Sequence.java
index
65d8179
..
cab1ac7
100755
(executable)
--- a/
src/jalview/datamodel/Sequence.java
+++ b/
src/jalview/datamodel/Sequence.java
@@
-121,7
+121,7
@@
public class Sequence implements SequenceI
.println("POSSIBLE IMPLEMENTATION ERROR: null sequence name passed to constructor.");
name = "";
}
.println("POSSIBLE IMPLEMENTATION ERROR: null sequence name passed to constructor.");
name = "";
}
- // Does sequence have the /start-end signiature?
+ // Does sequence have the /start-end signature?
if (limitrx.search(name))
{
name = limitrx.left();
if (limitrx.search(name))
{
name = limitrx.left();
@@
-355,19
+355,32
@@
public class Sequence implements SequenceI
{
pdbIds = new Vector<PDBEntry>();
}
{
pdbIds = new Vector<PDBEntry>();
}
- if (!pdbIds.contains(entry))
+ if (pdbIds.contains(entry))
+ {
+ updatePDBEntry(pdbIds.get(pdbIds.indexOf(entry)), entry);
+ }
+ else
{
pdbIds.addElement(entry);
}
}
{
pdbIds.addElement(entry);
}
}
+ private static void updatePDBEntry(PDBEntry oldEntry, PDBEntry newEntry)
+ {
+ if (newEntry.getFile() != null)
+ {
+ oldEntry.setFile(newEntry.getFile());
+ }
+ }
+
/**
* DOCUMENT ME!
*
* @param id
* DOCUMENT ME!
*/
/**
* DOCUMENT ME!
*
* @param id
* DOCUMENT ME!
*/
- public void setPDBId(Vector id)
+ @Override
+ public void setPDBId(Vector<PDBEntry> id)
{
pdbIds = id;
}
{
pdbIds = id;
}
@@
-377,7
+390,8
@@
public class Sequence implements SequenceI
*
* @return DOCUMENT ME!
*/
*
* @return DOCUMENT ME!
*/
- public Vector getPDBId()
+ @Override
+ public Vector<PDBEntry> getPDBId()
{
return pdbIds;
}
{
return pdbIds;
}
@@
-935,7
+949,7
@@
public class Sequence implements SequenceI
{
if (this.annotation == null)
{
{
if (this.annotation == null)
{
- this.annotation = new Vector();
+ this.annotation = new Vector<AlignmentAnnotation>();
}
if (!this.annotation.contains(annotation))
{
}
if (!this.annotation.contains(annotation))
{