edu.mit.jverbnet.data
Class VerbClass

java.lang.Object
  extended by edu.mit.jverbnet.data.VerbClass
All Implemented Interfaces:
IVerbClass

public class VerbClass
extends java.lang.Object
implements IVerbClass

Default implementation of the IVerbClass interface

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

Constructor Summary
VerbClass(java.lang.String id, java.util.List<IMember.IMemberBuilder> memberBs, java.util.List<IThematicRole.IThematicRoleBuilder> roleBs, java.util.List<IFrame.IFrameBuilder> frameBs, java.util.List<IVerbClass> subclasses)
          Creates a new verb class with the specified parameters
 
Method Summary
protected  void checkParentSet(boolean expectedValue)
          Throws an exception if the isParentSet flag is not the expected value.
 java.util.List<IFrame> getFrames()
          Returns the frames this verb class.
 java.lang.String getID()
          Returns the id of the verbnet class.
 java.util.List<IMember> getMembers()
          Returns the members of this verb class.
 IVerbClass getParent()
          Returns the parent class of this verb class, or null if this class is a root class.
 java.util.List<IVerbClass> getSubclasses()
          Returns the subclasses of this verb class.
 java.util.List<IThematicRole> getThematicRoles()
          Returns the thematic roles of this verb class.
 boolean isRoot()
          Returns true if this verb class has no parent; false otherwise.
 void setParent(IVerbClass parent)
          Sets the parent of this verb class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerbClass

public VerbClass(java.lang.String id,
                 java.util.List<IMember.IMemberBuilder> memberBs,
                 java.util.List<IThematicRole.IThematicRoleBuilder> roleBs,
                 java.util.List<IFrame.IFrameBuilder> frameBs,
                 java.util.List<IVerbClass> subclasses)
Creates a new verb class with the specified parameters

Parameters:
id - the id of the verb class; may not be null, empty, or all whitespace
memberBs - the builders that will create the members;
roleBs - the builders that will create the thematic roles; may not be null, may not contains null, and must have at least one element
frameBs - the builders that will create the frames; may not be null, may not contains null, and must have at least one element
subclasses - the subclasses of this verb class; should not have their parents set; may be null or empty
Since:
JVerbnet 1.0.0
Method Detail

getID

public java.lang.String getID()
Description copied from interface: IVerbClass
Returns the id of the verbnet class.

Specified by:
getID in interface IVerbClass
Returns:
the id of this verbnet class; neither empty, all whitespace, or null

getParent

public IVerbClass getParent()
Description copied from interface: IVerbClass
Returns the parent class of this verb class, or null if this class is a root class.

Specified by:
getParent in interface IVerbClass
Returns:
the parent class of this verb class, or null if this class is a root class.

isRoot

public boolean isRoot()
Description copied from interface: IVerbClass
Returns true if this verb class has no parent; false otherwise.

Specified by:
isRoot in interface IVerbClass
Returns:
true if this verb class has no parent; false otherwise.

setParent

public void setParent(IVerbClass parent)
Description copied from interface: IVerbClass
Sets the parent of this verb class. The parent may be set to null. The parent may only be set once: the method will throw an exception if it is called a second time.

Specified by:
setParent in interface IVerbClass
Parameters:
parent - the parent of the class; may be null, in which case the class will be a root class

checkParentSet

protected void checkParentSet(boolean expectedValue)
Throws an exception if the isParentSet flag is not the expected value.

Parameters:
expectedValue - the expected value of the isParentSet flag
Since:
JVerbnet 1.0.0

getMembers

public java.util.List<IMember> getMembers()
Description copied from interface: IVerbClass
Returns the members of this verb class. Will never return a null or empty list.

Specified by:
getMembers in interface IVerbClass
Returns:
the non-null, non-empty list of members of this verb class.

getThematicRoles

public java.util.List<IThematicRole> getThematicRoles()
Description copied from interface: IVerbClass
Returns the thematic roles of this verb class. Will never return a null or empty list.

Specified by:
getThematicRoles in interface IVerbClass
Returns:
the non-null, non-empty list of thematic roles of this verb class.

getFrames

public java.util.List<IFrame> getFrames()
Description copied from interface: IVerbClass
Returns the frames this verb class. Will never return a null or empty list.

Specified by:
getFrames in interface IVerbClass
Returns:
the non-null, non-empty list of frames of this verb class.

getSubclasses

public java.util.List<IVerbClass> getSubclasses()
Description copied from interface: IVerbClass
Returns the subclasses of this verb class. Will never return a null list, but it may be empty. Each verb class in the returned list will return this object via its IVerbClass.getParent() method.

Specified by:
getSubclasses in interface IVerbClass
Returns:
the non-null list of subclasses of this verb class.


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