net.sourceforge.chaperon.model.lexicon
Class Lexicon

java.lang.Object
  extended by net.sourceforge.chaperon.model.lexicon.Lexicon

public class Lexicon
extends java.lang.Object

The lexicon represents a collection of lexemes.

Version:
CVS $Id: Lexicon.java,v 1.3 2003/12/09 19:55:52 benedikta Exp $
Author:
Stephan Michels

Constructor Summary
Lexicon()
           
 
Method Summary
 void addLexeme(Lexeme lexeme)
          Add a lexeme to this lexicon.
 java.lang.Object clone()
          Create a clone of this lexicon.
 Lexeme getLexeme(int index)
          Return a lexeme given by an index.
 int getLexemeCount()
          Return the count of lexemes in this lexicon.
 java.lang.String getLocation()
          Returns the location from the input source.
 void removeLexeme(Lexeme lexeme)
          Remove a lexeme from this lexicon.
 void setLocation(java.lang.String location)
          Set the location from the input source.
 Violations validate()
          Validates the lexicon.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lexicon

public Lexicon()
Method Detail

addLexeme

public void addLexeme(Lexeme lexeme)
Add a lexeme to this lexicon.

Parameters:
lexeme - Lexeme, which should be added.

removeLexeme

public void removeLexeme(Lexeme lexeme)
Remove a lexeme from this lexicon.

Parameters:
lexeme - Lexeme, which should be removed.

getLexeme

public Lexeme getLexeme(int index)
Return a lexeme given by an index.

Parameters:
index - Index of the lexeme.
Returns:
Lexeme.

getLexemeCount

public int getLexemeCount()
Return the count of lexemes in this lexicon.

Returns:
Count of lexemes.

setLocation

public void setLocation(java.lang.String location)
Set the location from the input source.

Parameters:
location - Location in the input source.

getLocation

public java.lang.String getLocation()
Returns the location from the input source.

Returns:
Location in the input source.

validate

public Violations validate()
Validates the lexicon.

Returns:
Return a list of violations, if this object isn't valid.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Create a clone of this lexicon.

Overrides:
clone in class java.lang.Object
Returns:
Clone of this lexicon.
Throws:
java.lang.CloneNotSupportedException - If an exception occurs during the cloning.


Copyright ? 2003 Chaperon project. All Rights Reserved.