edu.mit.jverbnet.index
Interface IVerbIndex

All Superinterfaces:
IHasLifecycle, Iterable<IVerbClass>
All Known Implementing Classes:
VerbIndex

public interface IVerbIndex
extends IHasLifecycle, Iterable<IVerbClass>

A verb index, usually Verbnet.

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface edu.mit.jverbnet.util.IHasLifecycle
IHasLifecycle.ObjectClosedException
 
Method Summary
 Set<IMember> getMembers(IWordnetKey key)
          Returns all members in the index with the specified wordnet key.
 Set<IMember> getMembers(String grouping)
          Returns all members in the index with the specified grouping.
 IVerbClass getRootVerb(String id)
          Returns the root verb class with the specified id, or null if no such verb class can be found in the index.
 IVerbClass getVerb(String id)
          Returns the verb class with the specified id, or null if no such verb class can be found in the index.
 IVersion getVersion()
          The version of the index.
 Iterator<IVerbClass> iterator()
          Returns an iterator over all verb classes in the index, in the order they are encountered in the data files.
 Iterator<String> iteratorGroups()
          Returns an iterator over all groupings in the index, in their natural order.
 Iterator<IVerbClass> iteratorRoots()
          Returns an iterator over all root verb classes in the index, in the order they are encountered in the data files.
 Iterator<IWordnetKey> iteratorWordnetKeys()
          Returns an iterator over all wordnet keys in the index, in their natural order.
 
Methods inherited from interface edu.mit.jverbnet.util.IHasLifecycle
close, isOpen, open
 

Method Detail

getVersion

IVersion getVersion()
The version of the index. If the version cannot be determined, should return IVersion.UNKNOWN.

Returns:
the version of the index, or IVersion.UNKNOWN
Since:
JVerbnet 1.0.0

getVerb

IVerbClass getVerb(String id)
Returns the verb class with the specified id, or null if no such verb class can be found in the index. Ids are usually of the form 'verb-##.#', e.g., 'accompany-51.7'.

Parameters:
id - the id of the class
Returns:
the verb with the specified id, or null if none
Throws:
NullPointerException - if the specified id is null
IllegalArgumentException - if the specified id is empty or all whitespace
Since:
JVerbnet 1.0.0

getRootVerb

IVerbClass getRootVerb(String id)
Returns the root verb class with the specified id, or null if no such verb class can be found in the index. Ids are usually of the form 'verb-##.#', e.g., 'accompany-51.7'.

Parameters:
id - the id of the class
Returns:
the verb with the specified id, or null if none
Throws:
NullPointerException - if the specified id is null
IllegalArgumentException - if the specified id is empty or all whitespace
Since:
JVerbnet 1.0.0

getMembers

Set<IMember> getMembers(IWordnetKey key)
Returns all members in the index with the specified wordnet key. A null key indicates all members that have no key specified.

Parameters:
key - the key for which members should be retrieved; may be null
Returns:
a set of members with the specified wordnet keys, or an empty set if none; will never return null
Since:
JVerbnet 1.0.0

getMembers

Set<IMember> getMembers(String grouping)
Returns all members in the index with the specified grouping. A null, empty, or all whitespace grouping indicates all members that have no grouping specified.

Parameters:
grouping - the grouping for which members should be retrieved; may be null, empty, or all whitespace.
Returns:
a set of members with the specified grouping, or an empty set if none; will never return null
Since:
JVerbnet 1.0.0

iterator

Iterator<IVerbClass> iterator()
Returns an iterator over all verb classes in the index, in the order they are encountered in the data files.

Specified by:
iterator in interface Iterable<IVerbClass>
Returns:
an iterator over all verb classes in the index
Since:
JVerbnet 1.0.0

iteratorRoots

Iterator<IVerbClass> iteratorRoots()
Returns an iterator over all root verb classes in the index, in the order they are encountered in the data files.

Returns:
an iterator over all root verb classes in the index
Since:
JVerbnet 1.0.0

iteratorWordnetKeys

Iterator<IWordnetKey> iteratorWordnetKeys()
Returns an iterator over all wordnet keys in the index, in their natural order. The iterator will not return the 'null' wordnet key.

Returns:
an iterator over all wordnet keys in the index
Since:
JVerbnet 1.0.0

iteratorGroups

Iterator<String> iteratorGroups()
Returns an iterator over all groupings in the index, in their natural order. The iterator will not return the 'null' grouping.

Returns:
an iterator over all wordnet keys in the index
Since:
JVerbnet 1.0.0


Copyright © 2012 Massachusetts Institute of Technology. All Rights Reserved.