prototype DBRef and Feature Type semantics (for annotating coding regions and disting...
[jalview.git] / src / jalview / datamodel / FeatureProperties.java
diff --git a/src/jalview/datamodel/FeatureProperties.java b/src/jalview/datamodel/FeatureProperties.java
new file mode 100644 (file)
index 0000000..7eadf7b
--- /dev/null
@@ -0,0 +1,24 @@
+package jalview.datamodel;\r
+\r
+/**\r
+ * A set of feature property constants used by jalview\r
+ * @author JimP\r
+ *\r
+ */\r
+public class FeatureProperties\r
+{\r
+\r
+  public static final String EXONPOS = "exon number";\r
+  public static final String EXONPRODUCT = "product";\r
+  /**\r
+   * lookup feature type for a particular database to see if its a coding region feature\r
+   * @param dbrefsource\r
+   * @param string\r
+   * @return\r
+   */\r
+  public static boolean isCodingFeature(String dbrefsource, String type)\r
+  {\r
+    return ((dbrefsource==null || dbrefsource.equalsIgnoreCase(DBRefSource.EMBL))\r
+            && type.equalsIgnoreCase("CDS"));\r
+  }\r
+}\r