|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gate.creole.gazetteer.GazetteerNode
public class GazetteerNode
A node in a gazetteer list allowing an arbitary amount of features to be added as metadata to an entry, e.g.:
With the separator set to '\t', if a gazetteer entry looked like this:
Vodaphone type=mobile phone company
Then the GazetteerNode would consist of an entry "Vodaphone", with a featureMap containing the key "type", mapped to "mobile phone company".
Constructor Summary | |
---|---|
GazetteerNode(String node)
Parses and create a gazetteer node from a string using no separator, i.e. |
|
GazetteerNode(String entry,
Map featureMap)
Constructor. |
|
GazetteerNode(String node,
String separator)
Parses and create a gazetteer node from a string |
|
GazetteerNode(String node,
String separator,
boolean isOrdered)
Parses and create a gazetteer node from a string |
Method Summary | |
---|---|
boolean |
equals(Object o)
Checks this node vs another one for equality. |
String |
featureMapToString(Map featureMap)
Converts a featureMap to separated name value pairs. |
String |
getEntry()
|
Map |
getFeatureMap()
|
String |
getSeparator()
|
int |
hashCode()
|
void |
setEntry(String entry)
|
void |
setFeatureMap(Map featureMap)
|
void |
setSeparator(String separator)
|
String |
toString()
Gets the string representation of this node |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GazetteerNode(String entry, Map featureMap)
entry
- the gazetteer entryfeatureMap
- a map of name-value pairspublic GazetteerNode(String node)
node
- the gazetteer node to be parsedpublic GazetteerNode(String node, String separator)
node
- the gazetteer node to be parsedseparator
- the separator used in the gazetteer node string to delimit
each name-value pair of features. If the separator is null, then the whole
node will be used as the gazetteer entrypublic GazetteerNode(String node, String separator, boolean isOrdered)
node
- the gazetteer node to be parsedseparator
- the separator used in the gazetteer node string to delimit
each name-value pair of features. If the separator is null, then the whole
node will be used as the gazetteer entryisOrdered
- true if the feature maps used should be orderedMethod Detail |
---|
public String featureMapToString(Map featureMap)
featureMap
- map to be converted
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
o
- another node
public int hashCode()
hashCode
in class Object
public String getEntry()
public void setEntry(String entry)
entry
- the entry to setpublic Map getFeatureMap()
public void setFeatureMap(Map featureMap)
featureMap
- the featureMap to setpublic String getSeparator()
public void setSeparator(String separator)
separator
- the separator to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |