*/\r
public class Sequence implements SequenceI\r
{\r
- protected String name;\r
- protected String sequence;\r
- protected String description;\r
- protected int start;\r
- protected int end;\r
- protected String displayId;\r
- protected Color color = Color.white;\r
+ SequenceI datasetSequence;\r
+ String name;\r
+ String sequence;\r
+ String description;\r
+ int start;\r
+ int end;\r
+ String displayId;\r
+ Color color = Color.white;\r
String pdbId;\r
String vamsasId;\r
Vector dbrefs;\r
this.end = end;\r
\r
checkValidRange();\r
-\r
- setDisplayId();\r
}\r
\r
void checkValidRange()\r
this.end = endRes;\r
}\r
\r
- setDisplayId();\r
}\r
\r
/**\r
*\r
* @return DOCUMENT ME!\r
*/\r
- public String getDisplayId()\r
+ public String getDisplayId(boolean dbref, boolean jvsuffix)\r
{\r
- return displayId;\r
- }\r
+ StringBuffer result = new StringBuffer();\r
+ if (dbref && dbrefs != null)\r
+ {\r
+ for (int i = 0; i < dbrefs.size(); i++)\r
+ {\r
+ DBRefEntry entry = (DBRefEntry) dbrefs.elementAt(i);\r
+ result.append(entry.getSource() + "|" + entry.getAccessionId() + "|");\r
+ }\r
+ }\r
\r
- /**\r
- * DOCUMENT ME!\r
- */\r
- public void setDisplayId()\r
- {\r
- displayId = name + "/" + start + "-" + end;\r
+ result.append(name);\r
+\r
+ if (jvsuffix)\r
+ {\r
+ result.append("/" + start + "-" + end);\r
+ }\r
+\r
+ return result.toString();\r
}\r
\r
/**\r
public void setName(String name)\r
{\r
this.name = name;\r
- setDisplayId();\r
}\r
\r
/**\r
public void setStart(int start)\r
{\r
this.start = start;\r
- setDisplayId();\r
}\r
\r
/**\r
public void setEnd(int end)\r
{\r
this.end = end;\r
- setDisplayId();\r
}\r
\r
/**\r
vamsasId = id;\r
}\r
\r
+ public void setDBRef(Vector dbref)\r
+ {\r
+ dbrefs = dbref;\r
+ }\r
public Vector getDBRef()\r
{\r
return dbrefs;\r
dbrefs.addElement(entry);\r
}\r
\r
+ public void setDatasetSequence(SequenceI seq)\r
+ {\r
+ datasetSequence = seq;\r
+ }\r
+\r
+ public SequenceI getDatasetSequence()\r
+ {\r
+ return datasetSequence;\r
+ }\r
+\r
}\r
*\r
* @return DOCUMENT ME!\r
*/\r
- public String getDisplayId();\r
+ public String getDisplayId(boolean dbref, boolean jvsuffix);\r
\r
/**\r
* DOCUMENT ME!\r
\r
public void setVamsasId(String id);\r
\r
+ public void setDBRef(Vector dbs);\r
+\r
public Vector getDBRef();\r
\r
public void addDBRef(DBRefEntry entry);\r
\r
public void addSequenceFeature(SequenceFeature sf);\r
+\r
+ public void setDatasetSequence(SequenceI seq);\r
+\r
+ public SequenceI getDatasetSequence();\r
}\r