X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceFeature.java;h=4043f38d33c40dda9128a779cc3c7ee34df45c10;hb=c19d2a91ca05e052e3408bf5852d88eb5d0608f1;hp=2610ed64587830ff110e6d1d5bd7f9247df66510;hpb=ab43013b7e357b84b4abade0dba949668dfb2a0e;p=jalview.git diff --git a/src/jalview/datamodel/SequenceFeature.java b/src/jalview/datamodel/SequenceFeature.java index 2610ed6..4043f38 100755 --- 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.2b1) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -20,7 +20,8 @@ */ package jalview.datamodel; -import java.util.*; +import java.util.Hashtable; +import java.util.Vector; /** * DOCUMENT ME! @@ -42,7 +43,7 @@ public class SequenceFeature public Hashtable otherDetails; - public java.util.Vector links; + public Vector links; // 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) { - links = new Vector(); + links = new Vector(); 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) { - links = new java.util.Vector(); + links = new Vector(); } links.insertElementAt(labelLink, 0); @@ -283,7 +284,9 @@ public class SequenceFeature { String stat = (String) otherDetails.get("status"); if (stat != null) + { return new String(stat); + } } return null; } @@ -299,4 +302,23 @@ public class SequenceFeature 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; + } + }