gate.creole.annic.test
Class AnnicIndexing

java.lang.Object
  extended by gate.creole.annic.test.AnnicIndexing

public class AnnicIndexing
extends Object

The class is an example of how to index a corpus using the ANNIC functionalities. The class is used by the TestAnnic.java.

Author:
niraj

Constructor Summary
AnnicIndexing()
          Constructor
 
Method Summary
 void execute()
          This method creates a lucene index.
 String getAnnotationSetName()
          Gets the annotation set name to be indexed
 String getBaseTokenAnnotationType()
          Gets the base token annotation type
 Corpus getCorpus()
          Gets the corpus to index
 List getFeaturesToExclude()
          Gets the features of annotation to be excluded from being indexed
 URL getIndexOutputDirectoryLocation()
          Gets the location of index output directory
 String getIndexUnitAnnotationType()
          Gets the Index Unit Annotation type.
 void setAnnotationSetName(String annotationSetName)
          Sets the annotation set name
 void setBaseTokenAnnotationType(String baseTokenAnnotationType)
          Sets the base token annotation type
 void setCorpus(Corpus corpus)
          Sets the corpus to index
 void setFeaturesToExclude(ArrayList<String> featuresToExclude)
          Sets the features of annotations to be excluded from being indexed
 void setIndexOutputDirectoryLocation(URL dir)
          Sets the location of index output directory
 void setIndexUnitAnnotationType(String indexUnitAnnotationType)
          Sets the Index Unit annotation type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnicIndexing

public AnnicIndexing()
              throws IOException
Constructor

Throws:
IOException
Method Detail

execute

public void execute()
             throws ExecutionException
This method creates a lucene index.

Throws:
ExecutionException

getIndexOutputDirectoryLocation

public URL getIndexOutputDirectoryLocation()
Gets the location of index output directory


setIndexOutputDirectoryLocation

public void setIndexOutputDirectoryLocation(URL dir)
Sets the location of index output directory

Parameters:
dir -

getAnnotationSetName

public String getAnnotationSetName()
Gets the annotation set name to be indexed


setAnnotationSetName

public void setAnnotationSetName(String annotationSetName)
Sets the annotation set name

Parameters:
annotationSetName -

getBaseTokenAnnotationType

public String getBaseTokenAnnotationType()
Gets the base token annotation type


setBaseTokenAnnotationType

public void setBaseTokenAnnotationType(String baseTokenAnnotationType)
Sets the base token annotation type

Parameters:
baseTokenAnnotationType -

setCorpus

public void setCorpus(Corpus corpus)
Sets the corpus to index

Parameters:
corpus -

getCorpus

public Corpus getCorpus()
Gets the corpus to index


getFeaturesToExclude

public List getFeaturesToExclude()
Gets the features of annotation to be excluded from being indexed


setFeaturesToExclude

public void setFeaturesToExclude(ArrayList<String> featuresToExclude)
Sets the features of annotations to be excluded from being indexed

Parameters:
featuresToExclude -

getIndexUnitAnnotationType

public String getIndexUnitAnnotationType()
Gets the Index Unit Annotation type.


setIndexUnitAnnotationType

public void setIndexUnitAnnotationType(String indexUnitAnnotationType)
Sets the Index Unit annotation type.

Parameters:
indexUnitAnnotationType -