gate.creole.gazetteer
Interface Gazetteer

All Superinterfaces:
Executable, FeatureBearer, LanguageAnalyser, NameBearer, ProcessingResource, Resource, Serializable
All Known Subinterfaces:
OntoGazetteer
All Known Implementing Classes:
AbstractGazetteer

public interface Gazetteer
extends LanguageAnalyser, ProcessingResource

The Gazetteer interface defines the mandatory methods of a gazetteer PR.


Method Summary
 boolean add(String singleItem, Lookup lookup)
          Adds a new string to the gazetteer
 void addGazetteerListener(GazetteerListener gl)
          Registers a Gazetteer Listener
 void fireGazetteerEvent(GazetteerEvent ge)
          Fires a Gazetteer Event
 String getAnnotationSetName()
          Gets the AnnotationSet that will be used at the next run for the newly produced annotations.
 Boolean getCaseSensitive()
          Gets the current case sensitivity
 String getEncoding()
           
 LinearDefinition getLinearDefinition()
          Gets the linear definition of this gazetteer.
 URL getListsURL()
          Gets the url of the lists.def file
 MappingDefinition getMappingDefinition()
          Gets the mapping definition of this gazetteer,if such
 Set lookup(String singleItem)
          Looks-up a string
 boolean remove(String singleItem)
          Removes a string from the gazetteer
 void setAnnotationSetName(String newAnnotationSetName)
          Sets the AnnotationSet that will be used at the next run for the newly produced annotations.
 void setCaseSensitive(Boolean newCaseSensitive)
          Triggers case sensitive
 void setEncoding(String newEncoding)
           
 void setListsURL(URL newListsURL)
          Sets the url of the lists.def file
 void setMappingDefinition(MappingDefinition mapping)
          Sets the mapping definition if such to this gazetteer
 
Methods inherited from interface gate.LanguageAnalyser
getCorpus, getDocument, setCorpus, setDocument
 
Methods inherited from interface gate.ProcessingResource
interrupt, isInterrupted, reInit
 
Methods inherited from interface gate.Resource
cleanup, getParameterValue, init, setParameterValue, setParameterValues
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, setFeatures
 
Methods inherited from interface gate.util.NameBearer
getName, setName
 
Methods inherited from interface gate.Executable
execute
 

Method Detail

lookup

public Set lookup(String singleItem)
Looks-up a string
Parameters:
singleItem - the string
Returns:
set of Lookups

setAnnotationSetName

public void setAnnotationSetName(String newAnnotationSetName)
Sets the AnnotationSet that will be used at the next run for the newly produced annotations.
Parameters:
newAnnotationSetName - the annotation set name for the annotations that are going to be produced

getAnnotationSetName

public String getAnnotationSetName()
Gets the AnnotationSet that will be used at the next run for the newly produced annotations.
Returns:
the current AnnotationSet name

setEncoding

public void setEncoding(String newEncoding)

getEncoding

public String getEncoding()

getListsURL

public URL getListsURL()
Gets the url of the lists.def file
Returns:
the url of the lists.def file

setListsURL

public void setListsURL(URL newListsURL)
Sets the url of the lists.def file
Parameters:
newListsURL - the url of the lists.def file to be set

setCaseSensitive

public void setCaseSensitive(Boolean newCaseSensitive)
Triggers case sensitive
Parameters:
newCaseSensitive - turn on or off case sensitivity

getCaseSensitive

public Boolean getCaseSensitive()
Gets the current case sensitivity
Returns:
the current case sensitivity

setMappingDefinition

public void setMappingDefinition(MappingDefinition mapping)
Sets the mapping definition if such to this gazetteer
Parameters:
mapping - a mapping definition

getMappingDefinition

public MappingDefinition getMappingDefinition()
Gets the mapping definition of this gazetteer,if such
Returns:
the mapping definition of this gazetteer,if such otherwise null

getLinearDefinition

public LinearDefinition getLinearDefinition()
Gets the linear definition of this gazetteer. There is no parallel set method because the definition is laoded through the listsUrl on init().
Returns:
the linear definition of the gazetteer

fireGazetteerEvent

public void fireGazetteerEvent(GazetteerEvent ge)
Fires a Gazetteer Event
Parameters:
ge - Gazetteer Event to be fired

addGazetteerListener

public void addGazetteerListener(GazetteerListener gl)
Registers a Gazetteer Listener
Parameters:
gl - Gazetteer Listener to be registered

add

public boolean add(String singleItem,
                   Lookup lookup)
Adds a new string to the gazetteer
Parameters:
singleItem -  
lookup - the lookup to be associated with the new string
Returns:
true if the operation was successful

remove

public boolean remove(String singleItem)
Removes a string from the gazetteer
Parameters:
singleItem -  
Returns:
true if the operation was successful