GATE
Version 3.1-2270

gate.creole.gazetteer
Interface Gazetteer

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

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
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, interrupt, isInterrupted
 

Method Detail

lookup

Set lookup(String singleItem)
Looks-up a string

Parameters:
singleItem - the string
Returns:
set of Lookups

setAnnotationSetName

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

String getAnnotationSetName()
Gets the AnnotationSet that will be used at the next run for the newly produced annotations.

Returns:
the current AnnotationSet name

setEncoding

void setEncoding(String newEncoding)

getEncoding

String getEncoding()

getListsURL

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

Returns:
the url of the lists.def file

setListsURL

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

void setCaseSensitive(Boolean newCaseSensitive)
Triggers case sensitive

Parameters:
newCaseSensitive - turn on or off case sensitivity

getCaseSensitive

Boolean getCaseSensitive()
Gets the current case sensitivity

Returns:
the current case sensitivity

setMappingDefinition

void setMappingDefinition(MappingDefinition mapping)
Sets the mapping definition if such to this gazetteer

Parameters:
mapping - a mapping definition

getMappingDefinition

MappingDefinition getMappingDefinition()
Gets the mapping definition of this gazetteer,if such

Returns:
the mapping definition of this gazetteer,if such otherwise null

getLinearDefinition

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

void fireGazetteerEvent(GazetteerEvent ge)
Fires a Gazetteer Event

Parameters:
ge - Gazetteer Event to be fired

addGazetteerListener

void addGazetteerListener(GazetteerListener gl)
Registers a Gazetteer Listener

Parameters:
gl - Gazetteer Listener to be registered

add

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

boolean remove(String singleItem)
Removes a string from the gazetteer

Parameters:
singleItem -
Returns:
true if the operation was successful

GATE
Version 3.1-2270