edu.mit.jwi
Class RAMDictionary.DictionaryData.WordBuilder

java.lang.Object
  extended by edu.mit.jwi.RAMDictionary.DictionaryData.WordBuilder
All Implemented Interfaces:
Synset.IWordBuilder
Enclosing class:
RAMDictionary.DictionaryData

public class RAMDictionary.DictionaryData.WordBuilder
extends java.lang.Object
implements Synset.IWordBuilder

A utility class that allows us to build word objects

Since:
JWI 2.2.0
Version:
2.4.0
Author:
Mark A. Finlayson

Constructor Summary
RAMDictionary.DictionaryData.WordBuilder(ISynset oldSynset, IWord oldWord)
          Constructs a new word builder object out of the specified old synset and word.
 
Method Summary
 void addRelatedWord(IPointer type, IWordID id)
          Adds a pointer from this word to another word with the specified id.
 void addVerbFrame(IVerbFrame frame)
          Adds the specified verb frame to this word.
 IWord toWord(ISynset synset)
          Creates the word represented by this builder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RAMDictionary.DictionaryData.WordBuilder

public RAMDictionary.DictionaryData.WordBuilder(ISynset oldSynset,
                                                IWord oldWord)
Constructs a new word builder object out of the specified old synset and word.

Parameters:
oldSynset - the old synset that backs this builder; may not be null
oldWord - the old word that backs this builder; may not be null
Throws:
java.lang.NullPointerException - if either argument is null
Since:
2.2.0
Method Detail

toWord

public IWord toWord(ISynset synset)
Description copied from interface: Synset.IWordBuilder
Creates the word represented by this builder. If the builder represents invalid values for a word, this method may throw an exception.

Specified by:
toWord in interface Synset.IWordBuilder
Parameters:
synset - the synset to which this word should be attached
Returns:
the created word

addVerbFrame

public void addVerbFrame(IVerbFrame frame)
Description copied from interface: Synset.IWordBuilder
Adds the specified verb frame to this word.

Specified by:
addVerbFrame in interface Synset.IWordBuilder
Parameters:
frame - the frame to be added, may not be null

addRelatedWord

public void addRelatedWord(IPointer type,
                           IWordID id)
Description copied from interface: Synset.IWordBuilder
Adds a pointer from this word to another word with the specified id.

Specified by:
addRelatedWord in interface Synset.IWordBuilder
Parameters:
type - the pointer type, may not be null
id - the word id, may not be null


Copyright © 2007-2013 Massachusetts Institute of Technology. All Rights Reserved.