From: amwaterhouse Date: Thu, 10 Nov 2005 11:02:26 +0000 (+0000) Subject: Get and set PDBEntrys X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=37382e89e23d86a2e728c61899904dd97dd07298;p=jalview.git Get and set PDBEntrys --- diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 8e821a2..d90c231 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -39,7 +39,7 @@ public class Sequence implements SequenceI int start; int end; Color color = Color.white; - String pdbId; + Vector pdbIds; String vamsasId; Vector dbrefs; @@ -96,6 +96,7 @@ public class Sequence implements SequenceI { if (st.countTokens() == 2) { + shortName = st.nextToken(); limits = st.nextToken(); @@ -108,6 +109,10 @@ public class Sequence implements SequenceI setEnd(Integer.valueOf(st.nextToken()).intValue()); } } + + // If we're still in this loop, parsing of start and end was ok + // Therefore remove it from the sequence name + name = name.substring(0, name.indexOf("/")); } catch (NumberFormatException ex) { @@ -116,6 +121,7 @@ public class Sequence implements SequenceI shortName += "/" + limits; } } + } void checkValidRange() @@ -196,9 +202,9 @@ public class Sequence implements SequenceI * * @param id DOCUMENT ME! */ - public void setPDBId(String id) + public void setPDBId(Vector id) { - pdbId = id; + pdbIds = id; } /** @@ -206,9 +212,9 @@ public class Sequence implements SequenceI * * @return DOCUMENT ME! */ - public String getPDBId() + public Vector getPDBId() { - return pdbId; + return pdbIds; } /** diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index fe2a859..20aed83 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -224,14 +224,14 @@ public interface SequenceI * * @param id DOCUMENT ME! */ - public void setPDBId(String id); + public void setPDBId(Vector ids); /** * DOCUMENT ME! * * @return DOCUMENT ME! */ - public String getPDBId(); + public Vector getPDBId(); public String getVamsasId();