1   /*
2    *  DefaultIndexDefinition.java
3    *
4    *  Copyright (c) 1998-2005, The University of Sheffield.
5    *
6    *  This file is part of GATE (see http://gate.ac.uk/), and is free
7    *  software, licenced under the GNU Library General Public License,
8    *  Version 2, June 1991 (in the distribution as file licence.html,
9    *  and also available at http://gate.ac.uk/gate/licence.html).
10   *
11   *  Rosen Marinov, 19/Apr/2002
12   *
13   */
14  
15  package gate.creole.ir;
16  
17  import java.util.*;
18  
19  public class DefaultIndexDefinition implements IndexDefinition{
20  
21    /** List of IndexField - objects for indexing */
22    private List fields;
23  
24    /** Location (path) of the index store directory */
25    private String location;
26  
27    /* Niraj */
28    // Annic Specific Changes
29    private ArrayList featuresToExclude;
30    private String annotationSet;
31    private String baseTokenAnnotationType;
32    /* End */
33  
34  
35  //  /**  Type of index see GateConstants.java*/
36  //  private int indexType;
37  
38    /**  Sets the location of index
39     * @param location - index directory path
40     */
41    public void setIndexLocation(String location){
42      this.location = location;
43    }
44    /** @return String  path of index store directory*/
45    public String getIndexLocation(){
46      return location;
47    }
48  
49  
50    /* Niraj */
51    // Annic specific changes
52    public void setFeaturesToExclude(ArrayList featuresToExclude) {
53      this.featuresToExclude = featuresToExclude;
54    }
55  
56    public ArrayList getFeaturesToExclude() {
57      return featuresToExclude;
58    }
59  
60    public void setAnnotationSetName(String annotSetName) {
61      this.annotationSet = annotSetName;
62    }
63  
64    public String getAnnotationSetName() {
65      return this.annotationSet;
66    }
67  
68    public void setBaseTokenAnnotationType(String baseTokenAnnotationType) {
69      this.baseTokenAnnotationType = baseTokenAnnotationType;
70    }
71  
72    public String getBaseTokenAnnotationType() {
73      return this.baseTokenAnnotationType;
74    }
75    /* End */
76  
77  
78  //  /**  @return int index type*/
79  //  public int getIndexType(){
80  //    return indexType;
81  //  }
82  //
83  //  /**  Sets the index type.
84  //   *  @param type - index type
85  //   */
86  //  public void setIndexType(int type){
87  //    this.indexType = type;
88  //  }
89  
90    /**  @return Iterator of IndexFields, fileds for indexing. */
91    public Iterator getIndexFields(){
92      return fields.iterator();
93    }
94  
95    /**  Add new IndexField object to fields list.*/
96    public void addIndexField(IndexField fld){
97      if (fields==null){
98        fields = new Vector();
99      }
100     fields.add(fld);
101   }
102 
103   /**
104    * Sets the fully qualified class name for the IR engine to be used.
105    * @param irEngineClassName a String.
106    */
107   public void setIrEngineClassName(String irEngineClassName) {
108     this.irEngineClassName = irEngineClassName;
109   }
110 
111   /**
112    * Gets the fully qualified class name for the IR engine to be used.
113    * @return a String.
114    */
115   public String getIrEngineClassName() {
116     return irEngineClassName;
117   }
118 
119   /**Serialisation ID*/
120   static final long serialVersionUID = 2925395897153647322L;
121   private String irEngineClassName;
122 }
123