|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.mit.jverbnet.data.VerbnetTypes
public class VerbnetTypes
Utility class for verbnet types
Field Summary | |
---|---|
static String |
minus
|
static String |
plus
|
Constructor Summary | |
---|---|
VerbnetTypes()
|
Method Summary | ||
---|---|---|
static
|
getById(Class<T> cls,
String id)
Invokes the static getById method on a given verbnet type. |
|
static INounPhraseType |
getNounPhraseTypeById(String id)
Returns the noun phrase type for the specified id. |
|
static boolean |
getSelectionRestriction(String value)
Returns the selection restriction for a particular string value. |
|
static
|
getTypeByIdNoWarnings(Class<T> cls,
String id)
Invokes the static getById method on a given verbnet type. |
|
static String |
getXSDSimpleTypeName(Class<? extends IVerbnetType> c)
Retrieves the value of the static field containing the XSD type name for a verbnet type. |
|
static boolean |
isPrintingIdWarnings()
Returns the value of the isPringingIdWarnings flag. |
|
static void |
printIdNormalizationWarning(Class<? extends IHasID> type,
String id)
Prints a warning to standard err if the type's id does not match the specified id exactly (e.g., it differs in case). |
|
static void |
printIdUnknownWarning(Class<? extends IHasID> cls,
String id)
Prints a warning to standard err that the specified id is unknown for the specified type |
|
static void |
printIdWarnings(Class<? extends IHasID> cls,
IHasID type,
String id)
Prints a warning to standard err if the type is null or the
type's id does not match the specified id exactly (e.g., it differs in
case). |
|
static void |
setPrintIdWarnings(boolean value)
Sets the isPrintingIdWarnings flag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String plus
public static final String minus
Constructor Detail |
---|
public VerbnetTypes()
Method Detail |
---|
public static <T extends IVerbnetType> T getById(Class<T> cls, String id)
cls
- the verbnet type from which to retrieve the valueid
- the id of the type to retrieve
null
if none found
NullPointerException
- if the class is null
public static <T extends IVerbnetType> T getTypeByIdNoWarnings(Class<T> cls, String id)
cls
- the verbnet type from which to retrieve the valueid
- the id of the type to retrieve
null
if none found
NullPointerException
- if the class is null
IllegalStateException
- if the class does not have an accessible getById methodpublic static String getXSDSimpleTypeName(Class<? extends IVerbnetType> c)
c
- the type for which the name should be retrieved
IllegalStateException
- if the class does not have an accessible xsd type name fieldpublic static boolean getSelectionRestriction(String value)
true
; when passed "-", returns false.
Otherwise, throws an exception
value
- either "+" or "-"
true
when the value is "+"; false
when
the value is "-"
IllegalArgumentException
- if the specified string is not "+" or "-"public static INounPhraseType getNounPhraseTypeById(String id)
id
- the id of the noun phrase type to find.
public static boolean isPrintingIdWarnings()
true
if warnings are being printed to standard err; false
if not.public static void setPrintIdWarnings(boolean value)
public static void printIdWarnings(Class<? extends IHasID> cls, IHasID type, String id)
null
or the
type's id does not match the specified id exactly (e.g., it differs in
case).
cls
- the class of the typetype
- the object with the idid
- the id to checkpublic static void printIdUnknownWarning(Class<? extends IHasID> cls, String id)
cls
- the class of the typeid
- the id to checkpublic static void printIdNormalizationWarning(Class<? extends IHasID> type, String id)
type
- the object with the idid
- the id to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |