net.sf.extjwnl.princeton.data
Class AbstractPrincetonDictionaryElementFactory

java.lang.Object
  extended by net.sf.extjwnl.princeton.data.AbstractPrincetonDictionaryElementFactory
All Implemented Interfaces:
Owned
Direct Known Subclasses:
AbstractPrincetonDatabaseDictionaryElementFactory, AbstractPrincetonFileDictionaryElementFactory

public abstract class AbstractPrincetonDictionaryElementFactory
extends Object
implements Owned

Base class for element factories. Holds some common code.

Author:
Aliaksandr Autayeu

Field Summary
protected  Dictionary dictionary
           
 
Constructor Summary
AbstractPrincetonDictionaryElementFactory(Dictionary dictionary)
           
 
Method Summary
protected  Word createWord(Synset synset, int index, String lemma)
          Creates a word.
 Dictionary getDictionary()
          Returns the dictionary this object belongs to.
 void setDictionary(Dictionary dictionary)
          Sets the dictionary this object belongs to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dictionary

protected Dictionary dictionary
Constructor Detail

AbstractPrincetonDictionaryElementFactory

public AbstractPrincetonDictionaryElementFactory(Dictionary dictionary)
Method Detail

createWord

protected Word createWord(Synset synset,
                          int index,
                          String lemma)
Creates a word.

Parameters:
synset - synset
index - index
lemma - lemma
Returns:
word

setDictionary

public void setDictionary(Dictionary dictionary)
                   throws JWNLException
Description copied from interface: Owned
Sets the dictionary this object belongs to.

Specified by:
setDictionary in interface Owned
Parameters:
dictionary - the dictionary this object belongs to
Throws:
JWNLException - JWNLException

getDictionary

public Dictionary getDictionary()
Description copied from interface: Owned
Returns the dictionary this object belongs to.

Specified by:
getDictionary in interface Owned
Returns:
the dictionary this object belongs to


Copyright © 2011. All Rights Reserved.