1   /*
2    *  DefaultIndexDefinition.java
3    *
4    *  Copyright (c) 1998-2004, 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    private ArrayList featuresToExclude;
29    private String annotationSet;
30    /* End */
31  
32  
33  //  /**  Type of index see GateConstants.java*/
34  //  private int indexType;
35  
36    /**  Sets the location of index
37     * @param location - index directory path
38     */
39    public void setIndexLocation(String location){
40      this.location = location;
41    }
42    /** @return String  path of index store directory*/
43    public String getIndexLocation(){
44      return location;
45    }
46  
47  
48    /* Niraj */
49    public void setFeaturesToExclude(ArrayList featuresToExclude) {
50      this.featuresToExclude = featuresToExclude;
51    }
52  
53    public ArrayList getFeaturesToExclude() {
54      return featuresToExclude;
55    }
56  
57    public void setAnnotationSetName(String annotSetName) {
58      this.annotationSet = annotSetName;
59    }
60  
61    public String getAnnotationSetName() {
62      return this.annotationSet;
63    }
64  
65    /* End */
66  
67  
68  //  /**  @return int index type*/
69  //  public int getIndexType(){
70  //    return indexType;
71  //  }
72  //
73  //  /**  Sets the index type.
74  //   *  @param type - index type
75  //   */
76  //  public void setIndexType(int type){
77  //    this.indexType = type;
78  //  }
79  
80    /**  @return Iterator of IndexFields, fileds for indexing. */
81    public Iterator getIndexFields(){
82      return fields.iterator();
83    }
84  
85    /**  Add new IndexField object to fields list.*/
86    public void addIndexField(IndexField fld){
87      if (fields==null){
88        fields = new Vector();
89      }
90      fields.add(fld);
91    }
92  
93    /**
94     * Sets the fully qualified class name for the IR engine to be used.
95     * @param irEngineClassName a String.
96     */
97    public void setIrEngineClassName(String irEngineClassName) {
98      this.irEngineClassName = irEngineClassName;
99    }
100 
101   /**
102    * Gets the fully qualified class name for the IR engine to be used.
103    * @return a String.
104    */
105   public String getIrEngineClassName() {
106     return irEngineClassName;
107   }
108 
109   /**Serialisation ID*/
110   static final long serialVersionUID = 2925395897153647322L;
111   private String irEngineClassName;
112 }