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-2015 parse/write Jalview feature format pushed into FeatureColour,
[jalview.git]
/
src
/
jalview
/
datamodel
/
SequenceFeature.java
diff --git
a/src/jalview/datamodel/SequenceFeature.java
b/src/jalview/datamodel/SequenceFeature.java
index
9e1399a
..
1b6498f
100755
(executable)
--- a/
src/jalview/datamodel/SequenceFeature.java
+++ b/
src/jalview/datamodel/SequenceFeature.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*
* This file is part of Jalview.
*
@@
-20,7
+20,8
@@
*/
package jalview.datamodel;
*/
package jalview.datamodel;
-import java.util.*;
+import java.util.Hashtable;
+import java.util.Vector;
/**
* DOCUMENT ME!
/**
* DOCUMENT ME!
@@
-42,7
+43,7
@@
public class SequenceFeature
public Hashtable otherDetails;
public Hashtable otherDetails;
- public java.util.Vector links;
+ public Vector<String> links;
// Feature group can be set from a features file
// as a group of features between STARTGROUP and ENDGROUP markers
// Feature group can be set from a features file
// as a group of features between STARTGROUP and ENDGROUP markers
@@
-90,7
+91,7
@@
public class SequenceFeature
}
if (cpy.links != null && cpy.links.size() > 0)
{
}
if (cpy.links != null && cpy.links.size() > 0)
{
- links = new Vector();
+ links = new Vector<String>();
for (int i = 0, iSize = cpy.links.size(); i < iSize; i++)
{
links.addElement(cpy.links.elementAt(i));
for (int i = 0, iSize = cpy.links.size(); i < iSize; i++)
{
links.addElement(cpy.links.elementAt(i));
@@
-211,7
+212,7
@@
public class SequenceFeature
{
if (links == null)
{
{
if (links == null)
{
- links = new java.util.Vector();
+ links = new Vector<String>();
}
links.insertElementAt(labelLink, 0);
}
links.insertElementAt(labelLink, 0);
@@
-283,7
+284,9
@@
public class SequenceFeature
{
String stat = (String) otherDetails.get("status");
if (stat != null)
{
String stat = (String) otherDetails.get("status");
if (stat != null)
+ {
return new String(stat);
return new String(stat);
+ }
}
return null;
}
}
return null;
}
@@
-299,4
+302,23
@@
public class SequenceFeature
return begin;
}
return begin;
}
+ public int getStrand()
+ {
+ String str;
+ if (otherDetails == null
+ || (str = otherDetails.get("STRAND").toString()) == null)
+ {
+ return 0;
+ }
+ if (str.equals("-"))
+ {
+ return -1;
+ }
+ if (str.equals("+"))
+ {
+ return 1;
+ }
+ return 0;
+ }
+
}
}