public class TypeManager extends Object
Type
wrapper. This class contains
most used interrogations (such as getTypeById
and methods for saving an
object of this class.
IMPORTANT: this class has no public constructor. A singleton instance of this class is contained
in KCSessionManager
class
Modifier and Type | Method and Description |
---|---|
Type |
getTypeByClassInstance(KnowledgeChunk type,
KnowledgeChunk instance)
Returns a Type given the instance KnowledgeChunk and its type.
|
Type |
getTypeById(Integer id)
Returns a Type given its id.
|
protected static TypeManager |
getTypeManager() |
protected static TypeManager getTypeManager()
public Type getTypeById(Integer id)
id
- the identifier of the required Type.id
as identifier if such Type exists, null
otherwise.public Type getTypeByClassInstance(KnowledgeChunk type, KnowledgeChunk instance)
instance
- The KnowledgeChunk that should have this Type in its type list.type
- The KnowledgeChunk representing a class of instance
.null
if such Type doesn't exist.