edu.mit.jverbnet.data
Class ThematicRoleType

java.lang.Object
  extended by edu.mit.jverbnet.data.ThematicRoleType
All Implemented Interfaces:
IVerbnetType, ISemanticArgType, INounPhraseType, IHasID

public class ThematicRoleType
extends java.lang.Object
implements INounPhraseType, ISemanticArgType

Selection restriction value types. The values in this enum correspond to the elements of <xsd:simpleType name="themRoleType"> in the Verbnet xsd file.

Since:
JVerbnet 1.0.0
Version:
1.2.0
Author:
Mark A. Finlayson

Field Summary
static java.lang.String XSD_TYPE_NAME
          The name of the xsd:simpleType entry that describes this verbnet type in the XSD file.
 
Fields inherited from interface edu.mit.jverbnet.data.IVerbnetType
FIELD_NAME_XSD_TYPE_NAME, METHOD_NAME_getById
 
Constructor Summary
protected ThematicRoleType(java.lang.String id)
          Constructor that creates a new frame type.
 
Method Summary
 ArgType getArgType()
          Returns the argument type of which this type is the subtype.
static ThematicRoleType getById(java.lang.String id)
          Returns the object corresponding to the specified xsd name.
 java.lang.String getID()
          Returns the id of the type, as defined in the xsd file.
 java.lang.String toString()
           
static java.lang.String toString(ThematicRoleType themRole)
          Formats a thematic role type into a string suitable for display within a predicate string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

XSD_TYPE_NAME

public static final java.lang.String XSD_TYPE_NAME
The name of the xsd:simpleType entry that describes this verbnet type in the XSD file.

Since:
JVerbnet 1.0.0
See Also:
Constant Field Values
Constructor Detail

ThematicRoleType

protected ThematicRoleType(java.lang.String id)
Constructor that creates a new frame type.

Parameters:
id - The id of the value
Throws:
java.lang.NullPointerException - if the id is null
java.lang.IllegalArgumentException - if the id is empty or all whitespace
Since:
JVerbnet 1.0.0
Method Detail

getID

public java.lang.String getID()
Description copied from interface: IHasID
Returns the id of the type, as defined in the xsd file. Will never be null or empty.

Specified by:
getID in interface IHasID
Returns:
the id of the type

getArgType

public ArgType getArgType()
Description copied from interface: ISemanticArgType
Returns the argument type of which this type is the subtype. Never null.

Specified by:
getArgType in interface ISemanticArgType
Returns:
the non-null argument type of which this type is a specialization

getById

public static ThematicRoleType getById(java.lang.String id)
Returns the object corresponding to the specified xsd name. The id is matched to values without regard to case. If no value has the specified id, a new value is created with that id and returned. If the VerbnetTypes.isPrintingIdWarnings() flag is set, the method will print a warning to standard out if there is a value with the specified id was created, or if the specified id is not identical to the returned value's id.

Parameters:
id - the id of the type value as found in the xsd file and in the xml data files.
Returns:
the type corresponding to the specified xsd name, or null if none
Throws:
java.lang.NullPointerException - if the id is null
java.lang.IllegalArgumentException - if the id is empty or all whitespace
Since:
JVerbnet 1.0.0

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public static java.lang.String toString(ThematicRoleType themRole)
Formats a thematic role type into a string suitable for display within a predicate string.

Parameters:
themRole - the thematic role to be formatted; may not be null
Returns:
the string representing this thematic role
Throws:
java.lang.NullPointerException - if the argument is null
Since:
JVerbnet 1.2.0


Copyright © 2012 ${project.organization.name}. All Rights Reserved.