gate.creole.gazetteer
Class LinearNode

java.lang.Object
  |
  +--gate.creole.gazetteer.LinearNode

public class LinearNode
extends Object

Linear node specifies an entry of the type : list:major:minor:language


Constructor Summary
LinearNode(String node)
          Parses and create a linear node from a string
LinearNode(String aList, String aMajor, String aMinor, String aLanguage)
          Constructs a linear node given its elements
 
Method Summary
 boolean equals(Object o)
          Checks this node vs another one for equality.
 String getLanguage()
          Gets the language of the node (the language is optional)
 String getList()
          Get the gazetteer list filename from the node
 String getMajorType()
          Gets the major type
 String getMinorType()
          Gets the minor type
 void setLanguage(String aLanguage)
          Sets the language of the node
 void setList(String aList)
          Sets the gazetteer list filename for the node
 void setMajorType(String majorType)
          Sets the major type
 void setMinorType(String minorType)
          Sets the minor type
 String toString()
          Gets the string representation of this node
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinearNode

public LinearNode(String aList,
                  String aMajor,
                  String aMinor,
                  String aLanguage)
Constructs a linear node given its elements
Parameters:
aList - the gazetteer list file name
aMajor - the major type
aMinor - the minor type
aLanguage - the language(s)

LinearNode

public LinearNode(String node)
           throws InvalidFormatException
Parses and create a linear node from a string
Parameters:
node - the linear node to be parsed
Throws:
InvalidFormatException -  
Method Detail

getList

public String getList()
Get the gazetteer list filename from the node
Returns:
the gazetteer list filename

setList

public void setList(String aList)
Sets the gazetteer list filename for the node
Parameters:
aList - the gazetteer list filename

getLanguage

public String getLanguage()
Gets the language of the node (the language is optional)
Returns:
the language of the node

setLanguage

public void setLanguage(String aLanguage)
Sets the language of the node
Parameters:
aLanguage - the language of the node

getMinorType

public String getMinorType()
Gets the minor type
Returns:
the minor type

setMinorType

public void setMinorType(String minorType)
Sets the minor type
Returns:
the minor type

getMajorType

public String getMajorType()
Gets the major type
Returns:
the major type

setMajorType

public void setMajorType(String majorType)
Sets the major type
Parameters:
majorType - the major type

toString

public String toString()
Gets the string representation of this node
Overrides:
toString in class Object
Returns:
the string representation of this node

equals

public boolean equals(Object o)
Checks this node vs another one for equality.
Overrides:
equals in class Object
Parameters:
o - another node
Returns:
true if languages,list,major type and minor type match.