public class Pointer extends Object implements IPointer
IPointer interface. This class
includes, as public fields, all pointers, lexical and semantic, defined in
the standard WordNet distribution.
This class in not implemented as an Enum so that clients may
instantiate their own pointers using this implementation.
| Modifier and Type | Field and Description |
|---|---|
static Pointer |
ALSO_SEE |
static Pointer |
ANTONYM |
static Pointer |
ATTRIBUTE |
static Pointer |
CAUSE |
static Pointer |
DERIVATIONALLY_RELATED |
static Pointer |
DERIVED_FROM_ADJ |
static Pointer |
DOMAIN |
static Pointer |
ENTAILMENT |
static Pointer |
HOLONYM_MEMBER |
static Pointer |
HOLONYM_PART |
static Pointer |
HOLONYM_SUBSTANCE |
static Pointer |
HYPERNYM |
static Pointer |
HYPERNYM_INSTANCE |
static Pointer |
HYPONYM |
static Pointer |
HYPONYM_INSTANCE |
static Pointer |
MEMBER |
static Pointer |
MERONYM_MEMBER |
static Pointer |
MERONYM_PART |
static Pointer |
MERONYM_SUBSTANCE |
static Pointer |
PARTICIPLE |
static Pointer |
PERTAINYM |
static Pointer |
REGION |
static Pointer |
REGION_MEMBER |
static Pointer |
SIMILAR_TO |
static Pointer |
TOPIC |
static Pointer |
TOPIC_MEMBER |
static Pointer |
USAGE |
static Pointer |
USAGE_MEMBER |
static Pointer |
VERB_GROUP |
| Constructor and Description |
|---|
Pointer(String symbol,
String name)
Constructs a new pointer object with the specified symbol and name.
|
| Modifier and Type | Method and Description |
|---|---|
protected static String |
checkString(String str)
Throws an exception if the specified string is
null, empty,
or all whitespace. |
String |
getName()
Returns a user-friendly name of this pointer type for identification
purposes.
|
static Pointer |
getPointerType(String symbol,
POS pos)
Returns the pointer type (static final instance) that matches the
specified pointer symbol.
|
String |
getSymbol()
The symbol in the Wordnet data files that is used to indicate this
pointer type.
|
protected Object |
readResolve()
This utility method implements the appropriate deserialization for this
object.
|
String |
toString() |
static Collection<Pointer> |
values()
Emulates the
Enum#values() function. |
public static final Pointer ALSO_SEE
public static final Pointer ANTONYM
public static final Pointer ATTRIBUTE
public static final Pointer CAUSE
public static final Pointer DERIVATIONALLY_RELATED
public static final Pointer DERIVED_FROM_ADJ
public static final Pointer DOMAIN
public static final Pointer ENTAILMENT
public static final Pointer HYPERNYM
public static final Pointer HYPERNYM_INSTANCE
public static final Pointer HYPONYM
public static final Pointer HYPONYM_INSTANCE
public static final Pointer HOLONYM_MEMBER
public static final Pointer HOLONYM_SUBSTANCE
public static final Pointer HOLONYM_PART
public static final Pointer MEMBER
public static final Pointer MERONYM_MEMBER
public static final Pointer MERONYM_SUBSTANCE
public static final Pointer MERONYM_PART
public static final Pointer PARTICIPLE
public static final Pointer PERTAINYM
public static final Pointer REGION
public static final Pointer REGION_MEMBER
public static final Pointer SIMILAR_TO
public static final Pointer TOPIC
public static final Pointer TOPIC_MEMBER
public static final Pointer USAGE
public static final Pointer USAGE_MEMBER
public static final Pointer VERB_GROUP
public String getSymbol()
IPointernull, empty, or all whitespace.public String getName()
IPointernull, empty, or all whitespace.protected Object readResolve()
protected static String checkString(String str)
null, empty,
or all whitespace. Returns a trimmed form of the string.str - the string to be checkedNullPointerException - if the specified string is nullIllegalArgumentException - if the specified string is empty or all whitespacepublic static Collection<Pointer> values()
Enum#values() function. Returns an unmodifiable collection
of all the pointers declared in this class, in the order they are
declared.public static Pointer getPointerType(String symbol, POS pos)
symbol - the symbol to look uppos - the part of speech for the symbol; may be null
except for ambiguous symbolsIllegalArgumentException - if the symbol does not correspond to a known pointer.Copyright © 2018. All rights reserved.