public interface IlrTerm extends IlrNotifier
A term defines a set of properties used for the verbalization of a verbalizable element. These properties may be the plural form of a word, the articles that may be used with it, and so on. Not all properties may not be useful in all languages. The term is identified by its label.
A verbalizable element is attached to a term with its label. When a concept or a role is verbalized, an associated term is retrieved from the glossary of the vocabulary using:
IlrTerm term = verbalizable.getTerm(vocabulary);
Note that the methods getGender() and getPluralLabel()
are helpers to get those two properties for the list of properties of the term.
IlrGlossary| Modifier and Type | Method and Description |
|---|---|
void |
addTermProperty(java.lang.String key,
java.lang.String value)
Adds a property to the term.
|
java.util.Set |
getAllDefinedTermProperties()
Gets the list of property keys for this term.
|
IlrGender |
getGender()
Gets the gender of this term.
|
java.lang.String |
getLabel()
Gets the label of this term.
|
java.lang.String |
getPluralLabel()
Gets the plural label of this term.
|
java.util.Map |
getTermProperties()
Gets the term properties as a map.
|
java.lang.String |
getTermPropertyValue(java.lang.String key)
Gets the value of a property.
|
void |
removeTermProperty(java.lang.String key)
Removes a term property by its key.
|
void |
setGender(IlrGender gender)
Sets the gender of this term.
|
void |
setLabel(java.lang.String label)
Sets the label of this term.
|
void |
setPluralLabel(java.lang.String pluralLabel)
Sets the plural label of this term.
|
void |
setTermProperties(java.util.Map termProps)
Sets term properties as a map.
|
addListener, getListeners, notify, removeListenerjava.lang.String getLabel()
void setLabel(java.lang.String label)
label - The new label.java.lang.String getPluralLabel()
void setPluralLabel(java.lang.String pluralLabel)
pluralLabel - The new plural label.IlrGender getGender()
void setGender(IlrGender gender)
gender - The new gender of this term.void addTermProperty(java.lang.String key,
java.lang.String value)
key - The property key.value - The property value.java.lang.String getTermPropertyValue(java.lang.String key)
key - The key of the term property.void removeTermProperty(java.lang.String key)
key - A String that represents the key of the term property.java.util.Set getAllDefinedTermProperties()
void setTermProperties(java.util.Map termProps)
termProps - The map of term properties.java.util.Map getTermProperties()
© Copyright IBM Corp. 1987, 2017