DefaultIndexDefinition.java
001 /*
002  *  DefaultIndexDefinition.java
003  *
004  *  Copyright (c) 1995-2010, The University of Sheffield. See the file
005  *  COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
006  *
007  *  This file is part of GATE (see http://gate.ac.uk/), and is free
008  *  software, licenced under the GNU Library General Public License,
009  *  Version 2, June 1991 (in the distribution as file licence.html,
010  *  and also available at http://gate.ac.uk/gate/licence.html).
011  *
012  *  Rosen Marinov, 19/Apr/2002
013  *
014  */
015 
016 package gate.creole.ir;
017 
018 import java.util.*;
019 
020 public class DefaultIndexDefinition implements IndexDefinition{
021 
022   /** List of IndexField - objects for indexing */
023   private List fields;
024 
025   /** Location (path) of the index store directory */
026   private String location;
027 
028   /* Niraj */
029   // Annic Specific Changes
030   private ArrayList featuresToExclude;
031   private String annotationSet;
032   private String baseTokenAnnotationType;
033   /* End */
034 
035 
036 //  /**  Type of index see GateConstants.java*/
037 //  private int indexType;
038 
039   /**  Sets the location of index
040    @param location - index directory path
041    */
042   public void setIndexLocation(String location){
043     this.location = location;
044   }
045   /** @return String  path of index store directory*/
046   public String getIndexLocation(){
047     return location;
048   }
049 
050 
051   /* Niraj */
052   // Annic specific changes
053   public void setFeaturesToExclude(ArrayList featuresToExclude) {
054     this.featuresToExclude = featuresToExclude;
055   }
056 
057   public ArrayList getFeaturesToExclude() {
058     return featuresToExclude;
059   }
060 
061   public void setAnnotationSetName(String annotSetName) {
062     this.annotationSet = annotSetName;
063   }
064 
065   public String getAnnotationSetName() {
066     return this.annotationSet;
067   }
068 
069   public void setBaseTokenAnnotationType(String baseTokenAnnotationType) {
070     this.baseTokenAnnotationType = baseTokenAnnotationType;
071   }
072 
073   public String getBaseTokenAnnotationType() {
074     return this.baseTokenAnnotationType;
075   }
076   /* End */
077 
078 
079 //  /**  @return int index type*/
080 //  public int getIndexType(){
081 //    return indexType;
082 //  }
083 //
084 //  /**  Sets the index type.
085 //   *  @param type - index type
086 //   */
087 //  public void setIndexType(int type){
088 //    this.indexType = type;
089 //  }
090 
091   /**  @return Iterator of IndexFields, fileds for indexing. */
092   public Iterator getIndexFields(){
093     return fields.iterator();
094   }
095 
096   /**  Add new IndexField object to fields list.*/
097   public void addIndexField(IndexField fld){
098     if (fields==null){
099       fields = new Vector();
100     }
101     fields.add(fld);
102   }
103 
104   /**
105    * Sets the fully qualified class name for the IR engine to be used.
106    @param irEngineClassName a String.
107    */
108   public void setIrEngineClassName(String irEngineClassName) {
109     this.irEngineClassName = irEngineClassName;
110   }
111 
112   /**
113    * Gets the fully qualified class name for the IR engine to be used.
114    @return a String.
115    */
116   public String getIrEngineClassName() {
117     return irEngineClassName;
118   }
119 
120   /**Serialisation ID*/
121   static final long serialVersionUID = 2925395897153647322L;
122   private String irEngineClassName;
123 }