edu.princeton.wordnet.ejb
Class WordNetBean

java.lang.Object
  extended by edu.princeton.wordnet.ejb.WordNetBean
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class WordNetBean
extends java.lang.Object
implements javax.ejb.SessionBean

Enterprise Java Bean for WordNet

Author:
Bernard Bou
See Also:
Serialized Form

Constructor Summary
WordNetBean()
          Default constructor
 
Method Summary
 void ejbActivate()
           
 void ejbCreate()
          Default create method
 void ejbPassivate()
           
 void ejbRemove()
           
 org.w3c.dom.Document queryDoc(java.lang.String thisWord, boolean withLinks, boolean recurse)
          Business method that returns WordNet data as a Document
 org.w3c.dom.Document queryDoc(java.lang.String thisWord, java.lang.String thisPosName, java.lang.String thisCategoryName, java.lang.String thisLinkName, boolean withLinks, boolean recurse)
          Business method that returns WordNet overview data as DOM document
 org.w3c.dom.Document queryDocVn(long thisWordId, long thisSynsetId)
          Business method that returns VerbNet data as DOM document
 org.w3c.dom.Document queryDocWnVn(java.lang.String thisWord)
          Business method the returns VerbNet overview data as DOM document
 org.w3c.dom.Document queryDocWnXWn(java.lang.String thisWord)
          Business method that returns XWordNet overview data as DOM document
 org.w3c.dom.Document queryDocXWn(long thisSynsetId)
          Business method that returns XWordNet data as DOM document
 org.w3c.dom.Document queryOverviewDoc(java.lang.String thisWord)
          Business method that returns WordNet overview data as DOM document
 java.lang.String queryOverviewXML(java.lang.String thisWord)
          Business method that returns WordNet overview data as XML
 java.lang.String queryXML(java.lang.String thisWord, boolean withLinks, boolean recurse)
          Business method that returns complete data as XML
 java.lang.String queryXML(java.lang.String thisWord, java.lang.String thisPosName, java.lang.String thisCategoryName, java.lang.String thisLinkName, boolean withLinks, boolean recurse)
          Business method that returns WordNet overview data as XML
 java.lang.String queryXMLVn(long thisWordId, long thisSynsetId)
          Business method that returns VerbNet data as XML
 java.lang.String queryXMLWnVn(java.lang.String thisWord)
          Business method that returns XWordnet overview data as XML
 java.lang.String queryXMLWnXWn(java.lang.String thisWord)
          Business method that returns XWordNet overview data as XML
 java.lang.String queryXMLXWn(long thisSynsetId)
          Business method returns XWordNet data as XML data
 void setSessionContext(javax.ejb.SessionContext ctx)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordNetBean

public WordNetBean()
Default constructor

Method Detail

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
                       throws javax.ejb.EJBException,
                              java.rmi.RemoteException
Specified by:
setSessionContext in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException,
                      java.rmi.RemoteException
Specified by:
ejbRemove in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException,
                        java.rmi.RemoteException
Specified by:
ejbActivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException,
                         java.rmi.RemoteException
Specified by:
ejbPassivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Default create method

Throws:
javax.ejb.CreateException

queryDoc

public org.w3c.dom.Document queryDoc(java.lang.String thisWord,
                                     boolean withLinks,
                                     boolean recurse)
Business method that returns WordNet data as a Document

Parameters:
thisWord - is the target word
withLinks - determines if queries are to include links
recurse - determines if queries are to follow links recursively
Returns:
WordNet data as a DOM Document

queryXML

public java.lang.String queryXML(java.lang.String thisWord,
                                 boolean withLinks,
                                 boolean recurse)
Business method that returns complete data as XML

Parameters:
thisWord - is the target word
withLinks - determines if queries are to include links
recurse - determines if queries are to follow links recursively
Returns:
WordNet data as XML

queryDoc

public org.w3c.dom.Document queryDoc(java.lang.String thisWord,
                                     java.lang.String thisPosName,
                                     java.lang.String thisCategoryName,
                                     java.lang.String thisLinkName,
                                     boolean withLinks,
                                     boolean recurse)
Business method that returns WordNet overview data as DOM document

Parameters:
thisWord - is the target word
thisPosName - is the target part-of-speech
thisCategoryName - is the target category
thisLinkName - is the target link type
withLinks - determines if queries are to include links
recurse - determines if queries are to follow links recursively
Returns:
WordNet overview data as DOM document

queryXML

public java.lang.String queryXML(java.lang.String thisWord,
                                 java.lang.String thisPosName,
                                 java.lang.String thisCategoryName,
                                 java.lang.String thisLinkName,
                                 boolean withLinks,
                                 boolean recurse)
Business method that returns WordNet overview data as XML

Parameters:
thisWord - is the target word
thisPosName - is the target part-of-speech
thisCategoryName - is the target category
thisLinkName - is the target link type
withLinks - determines if queries are to include links
recurse - determines if queries are to follow links recursively
Returns:
WordNet overview data as XML data

queryOverviewDoc

public org.w3c.dom.Document queryOverviewDoc(java.lang.String thisWord)
Business method that returns WordNet overview data as DOM document

Parameters:
thisWord - is the target word
Returns:
WordNet overview data as DOM document

queryOverviewXML

public java.lang.String queryOverviewXML(java.lang.String thisWord)
Business method that returns WordNet overview data as XML

Parameters:
thisWord - is the target word
Returns:
WordNet overview data as XML

queryDocXWn

public org.w3c.dom.Document queryDocXWn(long thisSynsetId)
Business method that returns XWordNet data as DOM document

Parameters:
thisSynsetId - is the target synset id
Returns:
XWordNet data as DOM document

queryXMLXWn

public java.lang.String queryXMLXWn(long thisSynsetId)
Business method returns XWordNet data as XML data

Parameters:
thisSynsetId - is the target synset id
Returns:
XWordNet data as XML data

queryDocWnXWn

public org.w3c.dom.Document queryDocWnXWn(java.lang.String thisWord)
Business method that returns XWordNet overview data as DOM document

Parameters:
thisWord - is the target word
Returns:
XWordNet overview as DOM document

queryXMLWnXWn

public java.lang.String queryXMLWnXWn(java.lang.String thisWord)
Business method that returns XWordNet overview data as XML

Parameters:
thisWord - is the target word
Returns:
XWordNet overview data as XML

queryDocVn

public org.w3c.dom.Document queryDocVn(long thisWordId,
                                       long thisSynsetId)
Business method that returns VerbNet data as DOM document

Parameters:
thisWordId - is the word id to build query from
thisSynsetId - is the synset id to build query from (-1 if any)
Returns:
VerbNet data as DOM document

queryXMLVn

public java.lang.String queryXMLVn(long thisWordId,
                                   long thisSynsetId)
Business method that returns VerbNet data as XML

Parameters:
thisWordId - is the target word id
thisSynsetId - is the target synset id (-1 if any)
Returns:
VerbNet data as XML

queryDocWnVn

public org.w3c.dom.Document queryDocWnVn(java.lang.String thisWord)
Business method the returns VerbNet overview data as DOM document

Parameters:
thisWord - is the target word
Returns:
VerbNet overview data as DOM document

queryXMLWnVn

public java.lang.String queryXMLWnVn(java.lang.String thisWord)
Business method that returns XWordnet overview data as XML

Parameters:
thisWord - is the target word
Returns:
VerbNet overview data as XML