|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectaminePlatform.kernel.ontology.CS
aminePlatform.kernel.ontology.Type
Title : ontology.Type Class
Description : Information on a Type can be its definition and/or its canon. Hence a Type object has two attributes : the inherited attribute 'description' which is used to store the definition and a new attribute for the canon (its specification is optional).
A particular type can be any combination of the two information: an 'empty' type without definition nor canon, a type with definition only, a type with canon only or a type with both definition and canon.
The attribute 'canon' is declared also as an Object to enable the use of any particular description scheme (we have developed tools for CG but other tools can be developed for other notations and used in combination with our definition of an Ontology).
Subclasses : RelationType
Copyright: Copyright (c) Adil KABBAJ, 2004-2009
Field Summary |
Fields inherited from class aminePlatform.kernel.ontology.CS |
S_CONTEXT, S_CSRULE, S_SITUATION, S_TYPE |
Constructor Summary | |
Type()
Create an 'empty' Type CS |
|
Type(java.lang.Object definition)
Create a new Type with the specified definition. |
|
Type(java.lang.Object definition,
java.lang.Object canon)
Create a new Type with the specified definition and canon. |
Method Summary | |
void |
clear()
Clear the content of the current Type |
void |
finalize()
clear the fathers and children lists as well as the description of the current CS. |
java.util.ArrayList |
getArraySubTypes()
Get all the subtypes of the current Type. |
java.util.ArrayList |
getArraySuperTypes()
Get all the super types of the current Type. |
java.lang.Object |
getCanon()
Get the canon of the current Type. |
java.util.Enumeration |
getComSubTypes(Type type2)
Get (in a breadth-first order) the common subTypes of the current type and the specified type type2. |
java.util.Enumeration |
getComSuperTypes(Type type2)
Get (in a breadth-first order) the common superTypes of the current type and the specified type type2. |
java.lang.Object |
getDefinition()
Get the definition of the current Type. |
java.util.Enumeration |
getDirectSubTypes()
Get the direct subtypes of the current Type. |
java.util.Enumeration |
getDirectSuperTypes()
Get the direct super types of the current Type. |
java.util.Enumeration |
getIndividuals()
Get the individuals of the current type. |
Type |
getMaxComSubType(Type type2)
Get the maximal common subtype (a Type CS) of the current Type and the Type type2. |
Type |
getMinComSuperType(Type type2)
For both minComSuperType and maxComSubType, a progressive breadth-first traversal of the ontology is done to get super(sub)types of both the current Type and the parameter Type type2. |
java.util.Enumeration |
getSubTypes()
Get all the subtypes of the current Type. |
java.util.Enumeration |
getSuperTypes()
Get all the super types of the current Type. |
static boolean |
hasCanon(java.lang.Object obj)
Check if the specified Object obj is a type and it has a canon |
static boolean |
hasDefinition(java.lang.Object obj)
Check if the specified Object obj is a defined type |
static boolean |
isConceptType(java.lang.Object obj)
Check if the specified Object obj is a Concept Type CS |
static boolean |
isRelationType(java.lang.Object obj)
Check if the specified Object obj is a Type CS |
boolean |
isSubType(Type type)
Check if the current type is equal or is a subtype of the Type type. |
boolean |
isSuperType(Type type)
Check if the current type is equal or is a superType of the specified Type. |
static boolean |
isType(java.lang.Object obj)
Check if the specified Object obj is a Type CS |
void |
removeCanon()
Remove the description of the canon of the current Type. |
void |
removeDefinition()
Remove the definition of the current Type. |
void |
setCanon(java.lang.Object description)
Set the canon of the current Type to description. |
void |
setDefinition(java.lang.Object definition)
Set the definition of the current Type to the specified definition. |
protected org.jdom.Element |
toContent(Ontology ontology)
For the current type add the element that specifies its content to the XML ontology document. |
protected org.jdom.Element |
toCSKind(java.lang.String key)
For the current type add the element that specifies its kind to the XML ontology document. |
java.lang.String |
toString(Lexicon lexicon)
Implement the method toString(Lexicon) specified in the interface ToString. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Type()
public Type(java.lang.Object definition, java.lang.Object canon)
definition
- The definition of the current type. It could be null.canon
- The canon of the current type. It could be null.public Type(java.lang.Object definition)
definition
- The definition of the current type. It could be null.Method Detail |
public void finalize()
CS
finalize
in class CS
public java.lang.String toString(Lexicon lexicon) throws ToStringException
CS
toString
in interface ToString
toString
in class CS
lexicon
- Lexicon to use for the textual formulation
ToStringException
public void clear()
clear
in class CS
public static boolean isType(java.lang.Object obj)
obj
- An object
public static boolean isConceptType(java.lang.Object obj)
obj
- An object
public static boolean isRelationType(java.lang.Object obj)
obj
- An object
public static boolean hasDefinition(java.lang.Object obj)
obj
- An object
public static boolean hasCanon(java.lang.Object obj)
obj
- An object
public java.lang.Object getDefinition()
public void setDefinition(java.lang.Object definition)
definition
- The (new) definition of the current Typepublic void removeDefinition()
public java.lang.Object getCanon()
public void setCanon(java.lang.Object description)
description
- The (new) description of the canon of the current Typepublic void removeCanon()
public java.util.Enumeration getIndividuals()
public boolean isSuperType(Type type)
type
- A Type CS
public boolean isSubType(Type type)
type
- A Type CS
public java.util.Enumeration getDirectSubTypes()
public java.util.Enumeration getSubTypes()
public java.util.ArrayList getArraySubTypes()
public java.util.Enumeration getDirectSuperTypes()
public java.util.Enumeration getSuperTypes()
public java.util.ArrayList getArraySuperTypes()
public Type getMinComSuperType(Type type2)
type2
- A Type
public java.util.Enumeration getComSubTypes(Type type2)
type2
- A Type CS
public java.util.Enumeration getComSuperTypes(Type type2)
type2
- A Type CS
public Type getMaxComSubType(Type type2)
type2
- A Type
protected org.jdom.Element toCSKind(java.lang.String key)
toCSKind
in class CS
key
-
protected org.jdom.Element toContent(Ontology ontology)
toContent
in class CS
ontology
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |