edu.mit.jwi.item
Class Synset.WordBuilder

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

public static class Synset.WordBuilder
extends java.lang.Object
implements Synset.IWordBuilder

Holds information about word objects before they are instantiated.

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

Field Summary
protected  int lexID
           
 
Constructor Summary
Synset.WordBuilder(int num, java.lang.String lemma, int lexID, AdjMarker marker)
          Constructs a new word builder object.
 
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
 

Field Detail

lexID

protected final int lexID
Constructor Detail

Synset.WordBuilder

public Synset.WordBuilder(int num,
                          java.lang.String lemma,
                          int lexID,
                          AdjMarker marker)
Constructs a new word builder object. The constructor does not check its arguments - this is done when the word is created.

Parameters:
num - the word number
lemma - the lemma
lexID - the id of the lexical file in which the word is listed
marker - the adjective marker for the word
Since:
JWI 1.0
Method Detail

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

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

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


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