edu.princeton.wordnet.orm.hibernate
Class WordNetClientImpl

java.lang.Object
  extended by edu.princeton.wordnet.orm.WordNetClient
      extended by edu.princeton.wordnet.orm.hibernate.WordNetClientImpl

public class WordNetClientImpl
extends WordNetClient

Hibernate client

Author:
Bernard Bou

Field Summary
private static org.apache.log4j.Logger LOG
          Logger
 
Fields inherited from class edu.princeton.wordnet.orm.WordNetClient
theConnectionSettings
 
Constructor Summary
private WordNetClientImpl()
          Constructor
 
Method Summary
 java.lang.String[] getLexDomainNames()
          Get lexdomain names
 java.lang.String[] getLinkNames()
          Get link names
 java.util.Collection<edu.princeton.wordnet.pojos.Link> getLinks()
          Get links
 java.lang.String[] getPosNames()
          Get pos names
static WordNetClient make()
          Make client
private  java.util.Collection<edu.princeton.wordnet.pojos.Word> query(org.hibernate.Session thisSession, java.lang.String thisTarget)
          Query
 org.dom4j.Document queryDoc(java.lang.String thisTarget)
          Query for document
 java.util.Collection<org.dom4j.Element> queryElements(java.lang.String thisTarget)
          Query for collection of elements
private  java.util.Collection<java.lang.Object> queryGeneric(org.hibernate.Session thisSession, java.lang.String thisStatement)
          Query
 org.dom4j.Document queryRawDoc(java.lang.String thisTarget)
          Query for document
 javax.swing.tree.TreeModel queryTreeModel(java.lang.String thisTarget)
          Query (from tree model built from Pojos)
 java.lang.String queryXML(java.lang.String thisTarget)
          Query for XML
 javax.swing.tree.TreeModel queryXmlTreeModel(java.lang.String thisTarget)
          Query (from tree model built from element-returning call)
 void shutdown()
          Shutdown
 
Methods inherited from class edu.princeton.wordnet.orm.WordNetClient
get, isQuery, make, makeQuery, reduce, set, setPrintStream, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG
Logger

Constructor Detail

WordNetClientImpl

private WordNetClientImpl()
                   throws java.lang.Exception
Constructor

Throws:
java.lang.Exception
Method Detail

make

public static WordNetClient make()
                          throws java.lang.Exception
Make client

Returns:
wordnet client
Throws:
java.lang.Exception

shutdown

public void shutdown()
Description copied from class: WordNetClient
Shutdown

Specified by:
shutdown in class WordNetClient

query

private java.util.Collection<edu.princeton.wordnet.pojos.Word> query(org.hibernate.Session thisSession,
                                                                     java.lang.String thisTarget)
                                                              throws java.lang.Exception
Query

Parameters:
thisSession - session
thisTarget - query target
Returns:
word list
Throws:
java.lang.Exception

queryGeneric

private java.util.Collection<java.lang.Object> queryGeneric(org.hibernate.Session thisSession,
                                                            java.lang.String thisStatement)
                                                     throws java.lang.Exception
Query

Parameters:
thisSession - session
thisStatement - statement
Returns:
list of objects
Throws:
java.lang.Exception

queryElements

public java.util.Collection<org.dom4j.Element> queryElements(java.lang.String thisTarget)
                                                      throws java.lang.Exception
Description copied from class: WordNetClient
Query for collection of elements

Specified by:
queryElements in class WordNetClient
Parameters:
thisTarget - target
Returns:
collection of dom4j elements
Throws:
java.lang.Exception

queryDoc

public org.dom4j.Document queryDoc(java.lang.String thisTarget)
                            throws java.lang.Exception
Description copied from class: WordNetClient
Query for document

Specified by:
queryDoc in class WordNetClient
Parameters:
thisTarget - word to look up
Returns:
DOM Document
Throws:
java.lang.Exception

queryRawDoc

public org.dom4j.Document queryRawDoc(java.lang.String thisTarget)
                               throws java.lang.Exception
Description copied from class: WordNetClient
Query for document

Specified by:
queryRawDoc in class WordNetClient
Parameters:
thisTarget - target
Returns:
DOM Document
Throws:
java.lang.Exception

queryXML

public java.lang.String queryXML(java.lang.String thisTarget)
                          throws java.lang.Exception
Description copied from class: WordNetClient
Query for XML

Specified by:
queryXML in class WordNetClient
Parameters:
thisTarget - target
Returns:
XML string
Throws:
java.lang.Exception

queryXmlTreeModel

public javax.swing.tree.TreeModel queryXmlTreeModel(java.lang.String thisTarget)
                                             throws java.lang.Exception
Description copied from class: WordNetClient
Query (from tree model built from element-returning call)

Specified by:
queryXmlTreeModel in class WordNetClient
Parameters:
thisTarget - target
Returns:
tree model
Throws:
java.lang.Exception

queryTreeModel

public javax.swing.tree.TreeModel queryTreeModel(java.lang.String thisTarget)
                                          throws java.lang.Exception
Description copied from class: WordNetClient
Query (from tree model built from Pojos)

Specified by:
queryTreeModel in class WordNetClient
Parameters:
thisTarget - target
Returns:
tree model
Throws:
java.lang.Exception

getPosNames

public java.lang.String[] getPosNames()
                               throws java.lang.Exception
Description copied from class: WordNetClient
Get pos names

Specified by:
getPosNames in class WordNetClient
Returns:
array of strings
Throws:
java.lang.Exception

getLexDomainNames

public java.lang.String[] getLexDomainNames()
                                     throws java.lang.Exception
Description copied from class: WordNetClient
Get lexdomain names

Specified by:
getLexDomainNames in class WordNetClient
Returns:
array of strings
Throws:
java.lang.Exception

getLinkNames

public java.lang.String[] getLinkNames()
                                throws java.lang.Exception
Description copied from class: WordNetClient
Get link names

Specified by:
getLinkNames in class WordNetClient
Returns:
array of strings
Throws:
java.lang.Exception

getLinks

public java.util.Collection<edu.princeton.wordnet.pojos.Link> getLinks()
                                                                throws java.lang.Exception
Description copied from class: WordNetClient
Get links

Specified by:
getLinks in class WordNetClient
Returns:
array of strings
Throws:
java.lang.Exception