edu.princeton.wordnet.ejb
Class Link

java.lang.Object
  extended by edu.princeton.wordnet.ejb.Synset
      extended by edu.princeton.wordnet.ejb.Link

 class Link
extends Synset

Link, a linked synset

Author:
Bernard Bou

Field Summary
 long theFromSynsetId
          theFromSynsetId is the source synset id
 int theLinkType
          theLinkType is the relation type
 
Fields inherited from class edu.princeton.wordnet.ejb.Synset
theDefinition, theLexDomainId, theSample, theSynsetId
 
Constructor Summary
  Link(LinksQueryCommand thisQuery)
          Constructor from query for synsets linked to a given synset
protected Link(TypedLinksQueryCommand thisQuery)
          Constructor from query for synsets linked to a given synset through a given relation type
 
Method Summary
 boolean canRecurse()
          Get whether link can recurse
 java.lang.String getLinkName()
          Get link name
 java.util.List<Link> getLinks(java.sql.Connection thisConnection, long thisWordId)
          Override : recurse only on links of the same link type
 
Methods inherited from class edu.princeton.wordnet.ejb.Synset
getLexDomainName, getPosName, getSynsetWords, getSynsetWordsAsString, getTypedLinks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theLinkType

public int theLinkType
theLinkType is the relation type


theFromSynsetId

public long theFromSynsetId
theFromSynsetId is the source synset id

Constructor Detail

Link

public Link(LinksQueryCommand thisQuery)
     throws java.sql.SQLException
Constructor from query for synsets linked to a given synset

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

Link

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

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

getLinkName

public java.lang.String getLinkName()
Get link name

Returns:
link name

canRecurse

public boolean canRecurse()
Get whether link can recurse

Returns:
true if the link can recurse

getLinks

public java.util.List<Link> getLinks(java.sql.Connection thisConnection,
                                     long thisWordId)
Override : recurse only on links of the same link type

Overrides:
getLinks in class Synset
Parameters:
thisConnection - is the database connection
thisWordId - is the word id (for lexical links)
Returns:
list of synsets linked to the synset
See Also:
Synset.getLinks(java.sql.Connection, long)