~krause/annis/vers3

« back to all changes in this revision

Viewing changes to annis-service-impl/src/main/java/annis/dao/Match.java

  • Committer: Benjamin Weißenfels
  • Date: 2012-05-21 16:39:25 UTC
  • mfrom: (861.1.22 lazytable)
  • Revision ID: b.pixeldrama@googlemail.com-20120521163925-w9pce6rylfaqv8tg
Add find to rest api.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
import java.util.ArrayList;
19
19
import java.util.List;
20
 
import java.util.HashMap;
21
 
import java.util.Properties;
22
 
 
 
20
import javax.xml.bind.annotation.XmlElement;
 
21
import javax.xml.bind.annotation.XmlElementWrapper;
 
22
import javax.xml.bind.annotation.XmlRootElement;
23
23
 
24
24
@SuppressWarnings("serial")
25
 
public class Match extends ArrayList<Long>
 
25
@XmlRootElement
 
26
public class Match
26
27
{
27
 
  
28
 
  private long toplevelCorpusId;
29
 
  private HashMap<Long, Properties> corpusConfiguration;
30
 
  
 
28
  @XmlElementWrapper(name="salt-ids")
 
29
  @XmlElement(name="id")
 
30
  private List<String> saltIDs;
 
31
 
31
32
  public Match()
32
33
  {
33
 
    corpusConfiguration = new HashMap<Long, Properties>();
34
 
  }
35
 
 
36
 
  public Match(List<Long> nodes)
37
 
  {
38
 
    corpusConfiguration = new HashMap<Long, Properties>();
39
 
    addAll(nodes);
40
 
  }
41
 
 
42
 
  public long getToplevelCorpusId()
43
 
  {
44
 
    return toplevelCorpusId;
45
 
  }
46
 
 
47
 
  public void setToplevelCorpusId(long toplevelCorpusId)
48
 
  {
49
 
    this.toplevelCorpusId = toplevelCorpusId;
50
 
  }
51
 
 
52
 
  public HashMap<Long, Properties> getCorpusConfiguration()
53
 
  {
54
 
    return corpusConfiguration;
55
 
  }
56
 
 
57
 
  public void setCorpusConfiguration(HashMap<Long, Properties> corpusConfiguration)
58
 
  {
59
 
    this.corpusConfiguration = corpusConfiguration;
60
 
  }
61
 
  
 
34
    saltIDs = new ArrayList<String>();
 
35
  }
 
36
 
 
37
  public void setSaltId(String id)
 
38
  {
 
39
    saltIDs.add(id);
 
40
  }
 
41
 
 
42
  public String getSaltId(int i)
 
43
  {
 
44
    return saltIDs.get(i);
 
45
  }
62
46
}