ch.uzh.ifi.attempto.base
Class TextElement

java.lang.Object
  extended by ch.uzh.ifi.attempto.base.TextElement
Direct Known Subclasses:
OntologyTextElement

public class TextElement
extends java.lang.Object

This class describes a text element (a word or a phrase) to be used by the predictive editor. Every text element contains a text and one or more grammatical categories. If a text element contains more than one category then this means that it can stand for any of these categories.

Author:
Tobias Kuhn

Constructor Summary
protected TextElement()
          Creates a new text element without initializing the fields of the object.
  TextElement(java.lang.String text)
          Creates a new text element.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Two text elements are equals if they share the same text.
 java.lang.String getOriginalText()
          Returns the original text of this text element.
 java.lang.String getText()
          Returns the text of this text element.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextElement

public TextElement(java.lang.String text)
Creates a new text element.

Parameters:
text - The text of the new text element.

TextElement

protected TextElement()
Creates a new text element without initializing the fields of the object.

Method Detail

getOriginalText

public java.lang.String getOriginalText()
Returns the original text of this text element. This is the unchanged text before the context is checked by the text operator.

Returns:
The original text (before context checking).

getText

public java.lang.String getText()
Returns the text of this text element. The text might have been changed by the context checking of the text operator.

Returns:
The text (after context checking).

equals

public boolean equals(java.lang.Object obj)
Two text elements are equals if they share the same text.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright 2008-2012, AceWiki developers