Package net.didion.jwnl.data
Class PointerType
- java.lang.Object
-
- net.didion.jwnl.data.PointerType
-
- All Implemented Interfaces:
java.io.Serializable
public final class PointerType extends java.lang.Object implements java.io.Serializable
Instances of this class enumerate the possible WordNet pointer types, and are used to labelPointerType
s. EachPointerType
carries additional information: a human-readable label, an optional reflexive type that labels links pointing the opposite direction, an encoding of parts-of-speech that it applies to, and a short string that represents it in the dictionary files.- See Also:
- Serialized Form
-
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description private
PointerType(java.lang.String label, java.lang.String key, int flags)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
appliesTo(POS pos)
Whether or not this PointerType can be associated withpos
static java.util.List
getAllPointerTypes()
static java.util.List
getAllPointerTypesForPOS(POS pos)
private java.lang.String
getFlagsAsString()
java.lang.String
getKey()
java.lang.String
getLabel()
static PointerType
getPointerTypeForKey(java.lang.String key)
Return thePointerType
whose key matches key.private static int
getPOSMask(POS pos)
PointerType
getSymmetricType()
Returns the pointer type that is symmetric to this type.int
hashCode()
static void
initialize()
boolean
isSymmetric()
static boolean
isSymmetric(PointerType type)
Returns true if type is a symmetric pointer type (it is its own symmetric type).private static void
setSymmetric(PointerType a, PointerType b)
Set a as b's symmetric type, and vice versa.boolean
symmetricTo(PointerType type)
Returns true if type is symmetric to this pointer type.java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
-
N
private static final int N
- See Also:
- Constant Field Values
-
V
private static final int V
- See Also:
- Constant Field Values
-
ADJ
private static final int ADJ
- See Also:
- Constant Field Values
-
ADV
private static final int ADV
- See Also:
- Constant Field Values
-
LEXICAL
private static final int LEXICAL
- See Also:
- Constant Field Values
-
ANTONYM
public static final PointerType ANTONYM
-
CATEGORY
public static final PointerType CATEGORY
-
REGION
public static final PointerType REGION
-
USAGE
public static final PointerType USAGE
-
HYPERNYM
public static final PointerType HYPERNYM
-
HYPONYM
public static final PointerType HYPONYM
-
NOMINALIZATION
public static final PointerType NOMINALIZATION
-
INSTANCE_HYPERNYM
public static final PointerType INSTANCE_HYPERNYM
-
INSTANCES_HYPONYM
public static final PointerType INSTANCES_HYPONYM
-
ATTRIBUTE
public static final PointerType ATTRIBUTE
-
SEE_ALSO
public static final PointerType SEE_ALSO
-
MEMBER_HOLONYM
public static final PointerType MEMBER_HOLONYM
-
SUBSTANCE_HOLONYM
public static final PointerType SUBSTANCE_HOLONYM
-
PART_HOLONYM
public static final PointerType PART_HOLONYM
-
MEMBER_MERONYM
public static final PointerType MEMBER_MERONYM
-
SUBSTANCE_MERONYM
public static final PointerType SUBSTANCE_MERONYM
-
PART_MERONYM
public static final PointerType PART_MERONYM
-
CATEGORY_MEMBER
public static final PointerType CATEGORY_MEMBER
-
REGION_MEMBER
public static final PointerType REGION_MEMBER
-
USAGE_MEMBER
public static final PointerType USAGE_MEMBER
-
ENTAILMENT
public static final PointerType ENTAILMENT
-
ENTAILED_BY
public static final PointerType ENTAILED_BY
-
CAUSE
public static final PointerType CAUSE
-
VERB_GROUP
public static final PointerType VERB_GROUP
-
SIMILAR_TO
public static final PointerType SIMILAR_TO
-
PARTICIPLE_OF
public static final PointerType PARTICIPLE_OF
-
PERTAINYM
public static final PointerType PERTAINYM
-
DERIVED
public static final PointerType DERIVED
-
ALL_TYPES
private static final java.util.List ALL_TYPES
A list of allPointerType
s.
-
POS_TO_MASK_MAP
private static final java.util.Map POS_TO_MASK_MAP
-
KEY_TO_POINTER_TYPE_MAP
private static final java.util.Map KEY_TO_POINTER_TYPE_MAP
-
_initialized
private static boolean _initialized
-
_label
private Resolvable _label
-
_key
private Resolvable _key
-
_flags
private int _flags
-
_symmetricType
private PointerType _symmetricType
The PointerType that is the revers of this PointerType
-
_cachedToString
private transient java.lang.String _cachedToString
-
_flagStringCache
private java.lang.String _flagStringCache
-
-
Method Detail
-
initialize
public static void initialize()
-
isSymmetric
public static boolean isSymmetric(PointerType type)
Returns true if type is a symmetric pointer type (it is its own symmetric type).
-
getPointerTypeForKey
public static PointerType getPointerTypeForKey(java.lang.String key)
Return thePointerType
whose key matches key.
-
getAllPointerTypes
public static java.util.List getAllPointerTypes()
-
getAllPointerTypesForPOS
public static java.util.List getAllPointerTypesForPOS(POS pos)
-
setSymmetric
private static void setSymmetric(PointerType a, PointerType b)
Set a as b's symmetric type, and vice versa.
-
getPOSMask
private static int getPOSMask(POS pos)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getKey
public java.lang.String getKey()
-
getLabel
public java.lang.String getLabel()
-
appliesTo
public boolean appliesTo(POS pos)
Whether or not this PointerType can be associated withpos
-
isSymmetric
public boolean isSymmetric()
-
symmetricTo
public boolean symmetricTo(PointerType type)
Returns true if type is symmetric to this pointer type.
-
getSymmetricType
public PointerType getSymmetricType()
Returns the pointer type that is symmetric to this type.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getFlagsAsString
private java.lang.String getFlagsAsString()
-
-