edu.princeton.wordnet.ejb
Class Synset

java.lang.Object
  extended by edu.princeton.wordnet.ejb.Synset
Direct Known Subclasses:
Link

 class Synset
extends java.lang.Object

Synset

Author:
Bernard Bou

Field Summary
 java.lang.String theDefinition
          theDefinition is the synset's definition
 int theLexDomainId
          theLexDomainId is the synset's lexdomain
 java.lang.String theSample
          theSample is a string concatenating the synset's samples
 long theSynsetId
          theSynsetId is the synset's id in the database
 
Constructor Summary
protected Synset(LinksQueryCommand thisQuery)
          Constructor from query for linked synsets
protected Synset(long thisSynsetId, java.lang.String thisDefinition, int thisLexDomainId, java.lang.String thisSample)
           
protected Synset(SynsetsQueryCommand thisQuery)
          Constructor from query for synsets
protected Synset(TypedLinksQueryCommand thisQuery)
          Constructor from query for synsets linked through a given relation type
protected Synset(TypedSynsetsQueryCommand thisQuery)
          Constructor from query for synsets of a given type
 
Method Summary
 java.lang.String getLexDomainName()
          Get the synset's lexdomain name
 java.util.List<Link> getLinks(java.sql.Connection thisConnection, long thisWordId)
          Get synsets linked to the synset
 java.lang.String getPosName()
          Get the synset's part-of-speech
 java.util.List<Word> getSynsetWords(java.sql.Connection thisConnection)
          Get words in the synset as a list
 java.lang.String getSynsetWordsAsString(java.sql.Connection thisConnection)
          Get words in the synset as a string
 java.util.List<Link> getTypedLinks(java.sql.Connection thisConnection, long thisWordId, int thisLinkType)
          Get synsets linked to the synset through a given relation type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theSynsetId

public long theSynsetId
theSynsetId is the synset's id in the database


theDefinition

public java.lang.String theDefinition
theDefinition is the synset's definition


theLexDomainId

public int theLexDomainId
theLexDomainId is the synset's lexdomain


theSample

public java.lang.String theSample
theSample is a string concatenating the synset's samples

Constructor Detail

Synset

protected Synset(long thisSynsetId,
                 java.lang.String thisDefinition,
                 int thisLexDomainId,
                 java.lang.String thisSample)
Parameters:
thisSynsetId - is the synset id
thisDefinition - is the definition
thisLexDomainId - is the lexdomainid
thisSample - is the sample

Synset

protected Synset(SynsetsQueryCommand thisQuery)
          throws java.sql.SQLException
Constructor from query for synsets

Parameters:
thisQuery - is a query for synsets
Throws:
java.sql.SQLException

Synset

protected Synset(TypedSynsetsQueryCommand thisQuery)
          throws java.sql.SQLException
Constructor from query for synsets of a given type

Parameters:
thisQuery - is a query for synsets of a given type
Throws:
java.sql.SQLException

Synset

protected Synset(LinksQueryCommand thisQuery)
          throws java.sql.SQLException
Constructor from query for linked synsets

Parameters:
thisQuery - is a query for linked synsets
Throws:
java.sql.SQLException

Synset

protected Synset(TypedLinksQueryCommand thisQuery)
          throws java.sql.SQLException
Constructor from query for synsets linked through a given relation type

Parameters:
thisQuery - is a query for synsets linked through a given relation type
Throws:
java.sql.SQLException
Method Detail

getSynsetWords

public java.util.List<Word> getSynsetWords(java.sql.Connection thisConnection)
Get words in the synset as a list

Parameters:
thisConnection - is the connection to the database
Returns:
list of words in synset

getSynsetWordsAsString

public java.lang.String getSynsetWordsAsString(java.sql.Connection thisConnection)
Get words in the synset as a string

Parameters:
thisConnection - is the connection to the database
Returns:
list of words in synset as a comma-separated string

getPosName

public java.lang.String getPosName()
Get the synset's part-of-speech

Returns:
synset's part-of-speech

getLexDomainName

public java.lang.String getLexDomainName()
Get the synset's lexdomain name

Returns:
synset's lexdomain name

getLinks

public java.util.List<Link> getLinks(java.sql.Connection thisConnection,
                                     long thisWordId)
Get synsets linked to the synset

Parameters:
thisConnection - is the database connection
thisWordId - is the word id (for lexical links)
Returns:
list of synsets linked to the synset

getTypedLinks

public java.util.List<Link> getTypedLinks(java.sql.Connection thisConnection,
                                          long thisWordId,
                                          int thisLinkType)
Get synsets linked to the synset through a given relation type

Parameters:
thisConnection - is the database connection
thisWordId - is the word id (for lexical links)
thisLinkType - is the link type
Returns:
list of synsets linked to the synset through a given relation type