treebolic.provider.wn.ejb
Class Provider

java.lang.Object
  extended by treebolic.provider.wn.ejb.Provider
All Implemented Interfaces:
IProvider

public class Provider
extends java.lang.Object
implements IProvider

Provider factory implementation for WordNet

Author:
Bernard Bou

Field Summary
private static boolean hardContext
          Recursive queries
private static boolean recurse
          Recursive queries
protected  IProviderContext theContext
          Context used to query for Url
 
Constructor Summary
Provider()
          Constructor
 
Method Summary
 void connect(IProviderContext thisContext)
          Called by framework to pass context reference (may default to void action if provider does not need it)
protected  javax.naming.Context getInitialContext()
          Get the initial naming context
protected  org.w3c.dom.Document makeDocument(java.lang.String thisWord)
          Make treebolic document.
 Model makeModel(java.lang.String thisSource)
          Make model
 Tree makeTree(java.lang.String thisSource, boolean checkRecursion)
          Make tree.
protected  org.w3c.dom.Document makeWordNetDocument(java.lang.String thisWord)
          Get WordNet document
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theContext

protected IProviderContext theContext
Context used to query for Url


recurse

private static final boolean recurse
Recursive queries

See Also:
Constant Field Values

hardContext

private static final boolean hardContext
Recursive queries

See Also:
Constant Field Values
Constructor Detail

Provider

public Provider()
Constructor

Method Detail

connect

public void connect(IProviderContext thisContext)
Description copied from interface: IProvider
Called by framework to pass context reference (may default to void action if provider does not need it)

Specified by:
connect in interface IProvider
Parameters:
thisContext - context

makeModel

public Model makeModel(java.lang.String thisSource)
Description copied from interface: IProvider
Make model

Specified by:
makeModel in interface IProvider
Parameters:
thisSource - source (a string that refers to the data in a was that the provider implementation will understand)
Returns:
model

makeTree

public Tree makeTree(java.lang.String thisSource,
                     boolean checkRecursion)
Description copied from interface: IProvider
Make tree. Settings are not parsed. This is used in mounting.

Specified by:
makeTree in interface IProvider
Parameters:
thisSource - source (a string that refers to the data in a was that the provider implementation will understand)
checkRecursion - whether immediate recursion is checked (avoid mount-now infinite recursion)
Returns:
tree

makeDocument

protected org.w3c.dom.Document makeDocument(java.lang.String thisWord)
Make treebolic document. Get WordNet docuemnt and transform it.

Parameters:
thisWord - queried word
Returns:
DOM document in treebolic format

getInitialContext

protected javax.naming.Context getInitialContext()
                                          throws java.lang.Exception
Get the initial naming context

Throws:
java.lang.Exception

makeWordNetDocument

protected org.w3c.dom.Document makeWordNetDocument(java.lang.String thisWord)
Get WordNet document

Parameters:
thisWord - queried word
Returns:
DOM document in WordNet format