edu.princeton.wordnet.ejb
Class TypedSynsetsQueryCommand

java.lang.Object
  extended by edu.princeton.wordnet.ejb.DBQueryCommand
      extended by edu.princeton.wordnet.ejb.TypedSynsetsQueryCommand

 class TypedSynsetsQueryCommand
extends DBQueryCommand

Query command for synsets of a given part-of-speech or lexdomain type and containing a given word

Author:
Bernard Bou

Field Summary
private static java.lang.String theLexDomainQuery
          theLexDomainQuery is the (lexdomain based) SQL statement
private static java.lang.String thePosQuery
          thePosQuery is the (part-of-speech based) SQL statement
 
Fields inherited from class edu.princeton.wordnet.ejb.DBQueryCommand
theResultSet, theStatement
 
Constructor Summary
TypedSynsetsQueryCommand(java.sql.Connection thisConnection, boolean lexDomainBased)
          Constructor
 
Method Summary
 java.lang.String getDefinition()
          Get synset definition
 int getLexDomainId()
          Get synset lexdomain id
 java.lang.String getSample()
          Get sample data
 long getSynsetId()
          Get synset id
(package private) static void init()
          Init data (resources, ...)
 void setLexDomainType(int thisType)
          Set lexdomain type parameter in prepared SQL statement
 void setPosType(int thisType)
          Set part-of-speech type parameter in prepared SQL statement
 void setWordId(long thisWordId)
          Set word parameter in prepared SQL statement
 
Methods inherited from class edu.princeton.wordnet.ejb.DBQueryCommand
execute, next, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

thePosQuery

private static java.lang.String thePosQuery
thePosQuery is the (part-of-speech based) SQL statement


theLexDomainQuery

private static java.lang.String theLexDomainQuery
theLexDomainQuery is the (lexdomain based) SQL statement

Constructor Detail

TypedSynsetsQueryCommand

public TypedSynsetsQueryCommand(java.sql.Connection thisConnection,
                                boolean lexDomainBased)
                         throws java.sql.SQLException
Constructor

Parameters:
thisConnection - is the database connection
lexDomainBased - is whether the query is lexdomain based
Throws:
java.sql.SQLException
Method Detail

init

static void init()
Init data (resources, ...)


setWordId

public void setWordId(long thisWordId)
               throws java.sql.SQLException
Set word parameter in prepared SQL statement

Parameters:
thisWordId - is the target word
Throws:
java.sql.SQLException

setPosType

public void setPosType(int thisType)
                throws java.sql.SQLException
Set part-of-speech type parameter in prepared SQL statement

Parameters:
thisType - is the target part-of-speech type
Throws:
java.sql.SQLException

setLexDomainType

public void setLexDomainType(int thisType)
                      throws java.sql.SQLException
Set lexdomain type parameter in prepared SQL statement

Parameters:
thisType - is the target lexdomain type
Throws:
java.sql.SQLException

getSynsetId

public long getSynsetId()
                 throws java.sql.SQLException
Get synset id

Returns:
synset id
Throws:
java.sql.SQLException

getDefinition

public java.lang.String getDefinition()
                               throws java.sql.SQLException
Get synset definition

Returns:
definition
Throws:
java.sql.SQLException

getLexDomainId

public int getLexDomainId()
                   throws java.sql.SQLException
Get synset lexdomain id

Returns:
synset lexdomain id
Throws:
java.sql.SQLException

getSample

public java.lang.String getSample()
                           throws java.sql.SQLException
Get sample data

Returns:
samples in a semicolon-separated string
Throws:
java.sql.SQLException