treebolic.provider.wn
Class Provider

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

public class Provider
extends java.lang.Object
implements IProvider

Provider for WordNet

Author:
Bernard Bou

Field Summary
private  IProviderContext theContext
          Provider client
private static java.awt.Image theFocusImage
          Focus image
private  XWordNet theWn
          Extended WordNet interface
 
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)
 Model makeModel(java.lang.String thisSource)
          Make model
 Tree makeTree(java.lang.String thisSource, boolean checkRecursion)
          Make tree.
 Node walkHorizontalLinks(Node thisParentNode, edu.princeton.wordnet.Synset thisSynset, int thisLevel)
          Walk horizontal links
 Node walkLinks(Node thisParentNode, edu.princeton.wordnet.Synset thisSynset, int thisIdx)
          Walk links
 Node walkLinks(java.lang.String thisWord, boolean recurse)
          Walk links
 Node walkSynsets(Node thisParentNode, edu.princeton.wordnet.Synset thisSynset, int thisLevel)
          Walk synsets
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theFocusImage

private static final java.awt.Image theFocusImage
Focus image


theContext

private IProviderContext theContext
Provider client


theWn

private XWordNet theWn
Extended WordNet interface

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

walkLinks

public Node walkLinks(java.lang.String thisWord,
                      boolean recurse)
Walk links

Parameters:
thisWord - target word
recurse - whether to recurse
Returns:
result node

walkSynsets

public Node walkSynsets(Node thisParentNode,
                        edu.princeton.wordnet.Synset thisSynset,
                        int thisLevel)
Walk synsets

Parameters:
thisParentNode - parent node
thisSynset - synset
thisLevel - recursion level
Returns:
parent node

walkLinks

public Node walkLinks(Node thisParentNode,
                      edu.princeton.wordnet.Synset thisSynset,
                      int thisIdx)
Walk links

Parameters:
thisParentNode - parent node
thisSynset - synset
thisIdx - index
Returns:
parent node

walkHorizontalLinks

public Node walkHorizontalLinks(Node thisParentNode,
                                edu.princeton.wordnet.Synset thisSynset,
                                int thisLevel)
Walk horizontal links

Parameters:
thisParentNode - parent node
thisSynset - synset
thisLevel - recursion level
Returns:
parent node