edu.princeton.wordnet.client.browser
Class WidgetFactory

java.lang.Object
  extended by edu.princeton.wordnet.client.browser.WidgetFactory

public class WidgetFactory
extends java.lang.Object

Widget factory

Author:
Bernard Bou

Field Summary
static boolean renderAsWordNet
          Rendering option : rendering mode as WordNet
private  Controller theController
          Controller
private  long theDuration
          How long request took
 
Constructor Summary
WidgetFactory(Controller thisController)
          Constructor
 
Method Summary
 long getDuration()
          Getter for duration
 Widget make(java.lang.String thisLookup, boolean withLinks, boolean recurse)
          Make widget from query
 Widget make(java.net.URL thisUrl)
          Make widget from url of XML document
private  org.w3c.dom.Document open(java.net.URL thisUrl)
          Open document
private  org.w3c.dom.Document query(java.lang.String thisLookup, boolean withLinks, boolean recurse)
          Query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theController

private final Controller theController
Controller


renderAsWordNet

public static boolean renderAsWordNet
Rendering option : rendering mode as WordNet


theDuration

private long theDuration
How long request took

Constructor Detail

WidgetFactory

public WidgetFactory(Controller thisController)
Constructor

Parameters:
thisController - controller
Throws:
java.lang.Exception
Method Detail

make

public Widget make(java.net.URL thisUrl)
            throws java.lang.Exception
Make widget from url of XML document

Parameters:
thisUrl - target url
Returns:
W3C Document
Throws:
java.lang.Exception

open

private org.w3c.dom.Document open(java.net.URL thisUrl)
                           throws java.lang.Exception
Open document

Parameters:
thisUrl - url of XML document
Returns:
W3C Document
Throws:
java.lang.Exception

make

public Widget make(java.lang.String thisLookup,
                   boolean withLinks,
                   boolean recurse)
            throws java.lang.Exception
Make widget from query

Parameters:
thisLookup - target lookup
withLinks - want links
recurse - recurse
Returns:
W3C Document
Throws:
java.lang.Exception

query

private org.w3c.dom.Document query(java.lang.String thisLookup,
                                   boolean withLinks,
                                   boolean recurse)
                            throws java.lang.Exception
Query

Parameters:
thisLookup - target lookup
withLinks - want links
recurse - recurse
Returns:
W3C Document
Throws:
java.lang.Exception

getDuration

public long getDuration()
Getter for duration

Returns:
word