GATE
Version 3.1-2270

gate.creole.gazetteer
Class FSMState

java.lang.Object
  extended by gate.creole.gazetteer.FSMState
All Implemented Interfaces:
Serializable

public class FSMState
extends Object
implements Serializable

Implements a state of the deterministic finite state machine of the gazetter.

See Also:
Serialized Form

Field Summary
protected  Set lookupSet
           
protected  int myIndex
          The unique id of this state.
protected  DefaultGazetteer.CharMap transitionFunction
          The transition function of this state.
 
Constructor Summary
FSMState(DefaultGazetteer owner)
          Constructs a new FSMState object and adds it to the list of states of the DefaultGazetteer provided as owner.
 
Method Summary
 void addLookup(Lookup lookup)
          Adds a new looup description to this state's lookup descriptions set
 String getEdgesGML()
          Returns a GML (Graph Modelling Language) representation of the edges emerging from this state.
 int getIndex()
          Returns the unique ID of this state.
 Set getLookupSet()
          Returns a set of Lookup objects describing the types of lookups the phrase for which this state is the final one belongs to
 boolean isFinal()
          Checks whether this state is a final one
 FSMState next(char chr)
          This method is used to access the transition function of this state.
 void put(char chr, FSMState state)
          Adds a new value to the transition function
 void removeLookup(Lookup lookup)
          Removes a looup description from this state's lookup descriptions set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transitionFunction

protected DefaultGazetteer.CharMap transitionFunction
The transition function of this state.


lookupSet

protected Set lookupSet

myIndex

protected int myIndex
The unique id of this state. This value is never used by the algorithms but it can be useful for graphical representations.

Constructor Detail

FSMState

public FSMState(DefaultGazetteer owner)
Constructs a new FSMState object and adds it to the list of states of the DefaultGazetteer provided as owner.

Parameters:
owner - a DefaultGazetteer object
Method Detail

put

public void put(char chr,
                FSMState state)
Adds a new value to the transition function


next

public FSMState next(char chr)
This method is used to access the transition function of this state.


getEdgesGML

public String getEdgesGML()
Returns a GML (Graph Modelling Language) representation of the edges emerging from this state.


isFinal

public boolean isFinal()
Checks whether this state is a final one


getLookupSet

public Set getLookupSet()
Returns a set of Lookup objects describing the types of lookups the phrase for which this state is the final one belongs to


addLookup

public void addLookup(Lookup lookup)
Adds a new looup description to this state's lookup descriptions set


removeLookup

public void removeLookup(Lookup lookup)
Removes a looup description from this state's lookup descriptions set


getIndex

public int getIndex()
Returns the unique ID of this state.


GATE
Version 3.1-2270