|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.uzh.ifi.attempto.preditor.text.TextElement
ch.uzh.ifi.attempto.acewiki.core.ontology.OntologyTextElement
public class OntologyTextElement
This class represents a text element that links to an ontology element. The text of the text elements corresponds to one of the word forms of the ontology element.
Constructor Summary | |
---|---|
OntologyTextElement(OntologyElement ontologyElement,
int wordNumber,
java.lang.String category)
Creates a new ontology text element. |
Method Summary | |
---|---|
static OntologyTextElement |
createTextElement(OntologyElement el)
Creates a new text element for the default word form of the given ontology element. |
static OntologyTextElement |
createTextElement(OntologyElement el,
int wordNumber)
Creates a new text element for the given word form (by word form id) of the given ontology element. |
boolean |
equals(java.lang.Object obj)
Two text elements are equals if they share the same text. |
Terminal[] |
getCategories()
Returns the grammatical category of this text element. |
OntologyElement |
getOntologyElement()
Returns the ontology element to which this text element is linked. |
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 |
getUnderscoredText()
Returns the text of this text element in its plain form where underscores are not replaces by blanks. |
int |
getWordNumber()
Returns the id of the word form of the ontology element that is used for this text element. |
void |
include(TextElement textElement)
Includes the categories of the given text element. |
Methods inherited from class ch.uzh.ifi.attempto.preditor.text.TextElement |
---|
applyRestriction, setID, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OntologyTextElement(OntologyElement ontologyElement, int wordNumber, java.lang.String category)
ontologyElement
- The ontology element.wordNumber
- The word number.category
- The category name.Method Detail |
---|
public static OntologyTextElement createTextElement(OntologyElement el, int wordNumber)
el
- The ontology element.wordNumber
- The word form id.
public static OntologyTextElement createTextElement(OntologyElement el)
el
- The ontology element.
public java.lang.String getUnderscoredText()
public java.lang.String getText()
TextElement
getText
in class TextElement
public java.lang.String getOriginalText()
TextElement
getOriginalText
in class TextElement
public int getWordNumber()
public Terminal[] getCategories()
TextElement
getCategories
in class TextElement
public OntologyElement getOntologyElement()
public void include(TextElement textElement)
TextElement
include
in class TextElement
textElement
- The text element whose categories should be included.public boolean equals(java.lang.Object obj)
TextElement
equals
in class TextElement
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |