edu.princeton.wordnet.ejb
Class Word

java.lang.Object
  extended by edu.princeton.wordnet.ejb.Word

public class Word
extends java.lang.Object

Word

Author:
Bernard Bou

Field Summary
 long theId
          theId is the database id
 java.lang.String theLemma
          theLemma is the string
 
Constructor Summary
Word(java.lang.String thisLemma, long thisId)
          Word
Word(WordQueryCommand thisQuery)
          Constructor
 
Method Summary
static java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> getLinkTypes(java.sql.Connection thisConnection, java.lang.String thisWord)
          Get category-link type map for a given word
 java.util.List<edu.princeton.wordnet.ejb.Synset> getSynsets(java.sql.Connection thisConnection)
          Get synsets containing a given word
 java.util.List<edu.princeton.wordnet.ejb.Synset> getTypedSynsets(java.sql.Connection thisConnection, int thisTargetType, boolean categoryBased)
          Get synsets containing a given word and of a given part-of-speech or category id
static Word make(java.sql.Connection thisConnection, java.lang.String thisLemma)
          Make word
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theLemma

public java.lang.String theLemma
theLemma is the string


theId

public long theId
theId is the database id

Constructor Detail

Word

public Word(java.lang.String thisLemma,
            long thisId)
Word

Parameters:
thisLemma - is the word string
thisId - is the database id

Word

public Word(WordQueryCommand thisQuery)
     throws java.sql.SQLException
Constructor

Parameters:
thisQuery - is the database query
Throws:
java.sql.SQLException
Method Detail

make

public static Word make(java.sql.Connection thisConnection,
                        java.lang.String thisLemma)
Make word

Parameters:
thisConnection - is the database connection
thisLemma - is the target string
Returns:
Word or null

getSynsets

public java.util.List<edu.princeton.wordnet.ejb.Synset> getSynsets(java.sql.Connection thisConnection)
Get synsets containing a given word

Parameters:
thisConnection - is the database connection
Returns:
list of synsets containing a given word

getTypedSynsets

public java.util.List<edu.princeton.wordnet.ejb.Synset> getTypedSynsets(java.sql.Connection thisConnection,
                                                                        int thisTargetType,
                                                                        boolean categoryBased)
Get synsets containing a given word and of a given part-of-speech or category id

Parameters:
thisConnection - is the database connection
thisTargetType - is the target type to restrict search to
categoryBased - is whether the query is category based
Returns:
list of synsets for a given word

getLinkTypes

public static java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> getLinkTypes(java.sql.Connection thisConnection,
                                                                                             java.lang.String thisWord)
Get category-link type map for a given word

Parameters:
thisConnection - is the database connection
thisWord - is the target word
Returns:
category-link type map for a given word