GATE
Version 3.1-2270

gate.creole.gazetteer
Class Lookup

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

public class Lookup
extends Object
implements Serializable

Used to describe a type of lookup annotations. A lookup is described by a major type a minor type and a list of languages. Added members are : ontologyClass and list. All these values are strings (the list of languages is a string and it is intended to represesnt a comma separated list).

See Also:
Serialized Form

Field Summary
 String languages
          The languages for this lookup, e.g.
 String list
          the list represented by this lookup
 String majorType
          Tha major type for this lookup, e.g.
 String minorType
          The minor type for this lookup, e.g.
 String oClass
          the ontology class of this lookup according to the mapping between list and ontology
 String ontology
          the ontology ID
 
Constructor Summary
Lookup(String theList, String major, String minor, String theLanguages)
          Creates a new Lookup value with the given major and minor types and languages.
 
Method Summary
 boolean equals(Object obj)
          Two lookups are equal if they have the same string representation (major type and minor type).
 int hashCode()
           
 String toString()
          Returns a string representation of this lookup in the format This method is used in equals() that caused this method to implement dualistic behaviour : i.e. whenever class and ontology are filled then use the long version,incl. list, ontology and class; else return just majorType.minorType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

majorType

public String majorType
Tha major type for this lookup, e.g. "Organisation"


minorType

public String minorType
The minor type for this lookup, e.g. "Company"


languages

public String languages
The languages for this lookup, e.g. "English, French"


oClass

public String oClass
the ontology class of this lookup according to the mapping between list and ontology


ontology

public String ontology
the ontology ID


list

public String list
the list represented by this lookup

Constructor Detail

Lookup

public Lookup(String theList,
              String major,
              String minor,
              String theLanguages)
Creates a new Lookup value with the given major and minor types and languages.

Parameters:
major - major type
minor - minor type
theLanguages - the languages
Method Detail

toString

public String toString()
Returns a string representation of this lookup in the format This method is used in equals() that caused this method to implement dualistic behaviour : i.e. whenever class and ontology are filled then use the long version,incl. list, ontology and class; else return just majorType.minorType

Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Two lookups are equal if they have the same string representation (major type and minor type).

Overrides:
equals in class Object
Parameters:
obj -

hashCode

public int hashCode()
Overrides:
hashCode in class Object

GATE
Version 3.1-2270