updated jalview version of dasobert 1.53e client and added Das Sequence Source discov...
[jalview.git] / src / org / biojava / dasobert / eventmodel / FeatureEvent.java
1 /*
2  *                  BioJava development code
3  *
4  * This code may be freely distributed and modified under the
5  * terms of the GNU Lesser General Public Licence.  This should
6  * be distributed with the code.  If you do not have a copy,
7  * see:
8  *
9  *      http://www.gnu.org/copyleft/lesser.html
10  *
11  * Copyright for this code is held jointly by the individual
12  * authors.  These should be listed in @author doc comments.
13  *
14  * For more information on the BioJava project and its aims,
15  * or to join the biojava-l mailing list, visit the home page
16  * at:
17  *
18  *      http://www.biojava.org/
19  *
20  * Created on Oct 28, 2005
21  *
22  */
23 package org.biojava.dasobert.eventmodel;
24
25 import java.util.*;
26
27 import org.biojava.dasobert.dasregistry.*;
28
29 public class FeatureEvent extends AbstractDasEvent
30 {
31
32   Map[] features;
33   int comeBackLater;
34     String version;
35     
36   public FeatureEvent(Map[] features, Das1Source dasSource, String version)
37   {
38     super();
39     this.features = features;
40     this.dasSource = dasSource;
41     comeBackLater = -1;
42     this.version = version;
43   }
44
45   public int getComeBackLater()
46   {
47     return comeBackLater;
48   }
49
50   public void setComeBackLater(int comeBackLater)
51   {
52     this.comeBackLater = comeBackLater;
53   }
54
55   /** get the features that have been found.
56    *
57    * do something like
58    * Map[] features = event.getFeatures();
59    * <pre>
60    * for (int i = 0 ; i< features;i++) {
61    *      Map f = features[i];
62    *      String type = (String) f.get("TYPE") ;
63    *      System.out.println(type);
64    * }
65    * </pre>
66    * @return a Map containng the features
67    */
68   public Map[] getFeatures()
69   {
70     return features;
71   }
72
73     /** Get the version of the reference object that has been annotated.
74      * Compare the version string with the version string obtained from the reference server.
75      * If they don;t match there is a version problem between the annotation and the reference!
76      * @return the version string (e.g. an MD5 digest of the reference sequence)
77      */
78         public String getVersion() {
79                 return version;
80         }
81
82         public void setVersion(String version) {
83                 this.version = version;
84         }
85
86 }