public class TermManager extends Object
Term wrapper. This class contains
most used interrogations (such as getTermById.
IMPORTANT: this class has no public constructor. A singleton instance of this class is contained
in KCSessionManager class
| Modifier and Type | Method and Description |
|---|---|
Term |
getTermById(Integer id)
Returns a Term given its id.
|
Term |
getTermByKcValue(KnowledgeChunk own,
String value)
Returns a Term given the owner KnowledgeChunk and its String value.
|
protected static TermManager |
getTermManager() |
boolean |
removeTerm(Term t)
Perform the same operation of
removeTermById() using the identifier of t. |
Boolean |
removeTermById(Integer id)
Removes the EsTerm having
id as identifier. |
protected static TermManager getTermManager()
public Term getTermById(Integer id)
id - the identifier of the required Term.id as identifier if such Term exists, null otherwise.public Term getTermByKcValue(KnowledgeChunk own, String value)
own - The KnowledgeChunk that should have this Term in its Terminological equipment.value - The term value. This is the "keyword" connected to the own kc.null if such Term doesn't exist.public Boolean removeTermById(Integer id)
id as identifier.id - the identifier of the term to be removed.public boolean removeTerm(Term t)
removeTermById() using the identifier of t.t - the EsTerm instance representing the term to be removed.t has been correctly removed.removeTermById(Integer)