comments
[jalview.git] / src / org / biojava / dasobert / eventmodel / FeatureEvent.java
index 44de5cc..dd89ef3 100755 (executable)
@@ -26,19 +26,22 @@ import java.util.*;
 
 import org.biojava.dasobert.dasregistry.*;
 
-public class FeatureEvent
+public class FeatureEvent extends AbstractDasEvent
 {
 
   Map[] features;
-  Das1Source dasSource;
+
   int comeBackLater;
 
-  public FeatureEvent(Map[] features, Das1Source dasSource)
+  String version;
+
+  public FeatureEvent(Map[] features, Das1Source dasSource, String version)
   {
     super();
     this.features = features;
     this.dasSource = dasSource;
     comeBackLater = -1;
+    this.version = version;
   }
 
   public int getComeBackLater()
@@ -51,17 +54,20 @@ public class FeatureEvent
     this.comeBackLater = comeBackLater;
   }
 
-  /** get the features that have been found.
-   *
-   * do something like
-   * Map[] features = event.getFeatures();
+  /**
+   * get the features that have been found.
+   * 
+   * do something like Map[] features = event.getFeatures();
+   * 
    * <pre>
-   * for (int i = 0 ; i< features;i++) {
-   *      Map f = features[i];
-   *      String type = (String) f.get("TYPE") ;
-   *      System.out.println(type);
+   * for (int i = 0; i &lt; features; i++)
+   * {
+   *   Map f = features[i];
+   *   String type = (String) f.get(&quot;TYPE&quot;);
+   *   System.out.println(type);
    * }
    * </pre>
+   * 
    * @return a Map containng the features
    */
   public Map[] getFeatures()
@@ -69,9 +75,22 @@ public class FeatureEvent
     return features;
   }
 
-  public Das1Source getDasSource()
+  /**
+   * Get the version of the reference object that has been annotated. Compare
+   * the version string with the version string obtained from the reference
+   * server. If they don;t match there is a version problem between the
+   * annotation and the reference!
+   * 
+   * @return the version string (e.g. an MD5 digest of the reference sequence)
+   */
+  public String getVersion()
+  {
+    return version;
+  }
+
+  public void setVersion(String version)
   {
-    return dasSource;
+    this.version = version;
   }
 
 }