aminePlatform.kernel.ontology
Class CS

java.lang.Object
  extended byaminePlatform.kernel.ontology.CS
All Implemented Interfaces:
Node, java.io.Serializable, ToString
Direct Known Subclasses:
CSRule, Individual, Situation, Type

public class CS
extends java.lang.Object
implements java.io.Serializable, ToString, Node

Title : ontology.CS Class

Description : As introduced in the class Ontology, an ontology in AminePlatform is a graph of nodes called Conceptual Structures (CS) defined by this class. Moreover, the nodes correspond to five categories of Conceptual Structures : Type, RelationType, Individual, Context, Situation and Rule. These categories are implemented as five subclasses of the class CS :

* Type CS/node (the class Type) : Each concept type and relation type is represented by this type of CS in the ontology. The definition and/or the canon of a type are stored in that node that represents the type in the ontology.

* RelationType CS/node (the class RelationType) : this a specialization of Type and it concerns Relation Type

* Individual CS/node (the class Individual) : An individual of a concept type is represented by an 'individual CS' that is immediately related to its type. The description of an individual is stored in this individual node.

* Situation CS/node (the class Situation) : A situation is stored in a situation node. A situation can be related to types, individuals and/or to other situations.

* Context CS/node (the class Context) : A Context is stored in a Context node.

* Rule CS/node (the class CSRule) : A Rule is stored in a CSRule node.

As noted in the comment about the class ontology.Ontology, it is important to note that the kind of description of a CS, i.e. description of a definition, a canon, an individual or a situation is not fixed at this level; a description could be any Java Object (see the declaration of the attribute 'description' below and the definition of the classes Type, Individual and Situation).

Thus, Lexicon, Ontology and Conceptual Structures are not committed to a particular knowledge description scheme.

Note also that the conceptual structures (CS) attached to identifiers, like definition, canon, individual or situation (indirectly), are not composed of identifiers but of references to other CSs and so they are 'natural language free descriptions'. The use of identifiers and hence languages occurs when the system has to communicate or express its knowledge (descriptions) to other language-based systems (like human).

As nodes of a graph, each CS cs refeers to the immediate CSs that cs specialize (the direct fathers of the CS cs) and to the immediate CSs that are specialization of the CS cs (the immediate children of the CS cs). Thus, the graph structure of the ontology is encoded implicitly by the links that are specified in each CS.

Note that the methods getDescription(), as well as setDescription() and removeDescription() are protected (not public) because they should not be public for any user of the class Type: public versions of them are provided by Individual and Situation classes, and Type class redefines them as getDefinition(), setDefinition() and removeDefinition() respectively. So, the three methods are not used by other classes (except the three subclasses) and are not public to other classes.

Subclasses : Type, RelationType, Individual, and Situation

Copyright: Copyright (c) Adil KABBAJ, 2004-2009

See Also:
Serialized Form

Field Summary
static java.lang.String S_CONTEXT
           
static java.lang.String S_CSRULE
           
static java.lang.String S_SITUATION
           
static java.lang.String S_TYPE
           
 
Constructor Summary
protected CS()
          Constructors of CS are protected since only its subclasses can instantiate it
protected CS(java.lang.Object description)
          Create a CS with the specified description.
 
Method Summary
 boolean addCSRule(CSRule rule)
           
 boolean addCSRule(java.lang.Object ante, java.lang.Object consq)
          Add a new rule to the current CS.
 void addIncomeEdge(Edge edge)
           
 void addOutcomeEdge(Edge edge)
          Implementation of Node Interface
 boolean addSituation(java.lang.Object obj)
          Add a new situation to the current CS.
 boolean canBeRemoved()
          Check if the current CS can be removed, i.e. if it has no children.
 void clear()
          clear the fathers and children lists and the description of the current CS.
 Node copyNode()
          This method is defined to implement the method copyNode of Node, but it should not be used directly since it returns null.
 void detach()
          Detach the current CS from its fathers and children : remove all the links that relate the current CS, as a child, to its fathers, and remove all the links that relate the current CS, as a father, to its children.
 void finalize()
          clear the fathers and children lists as well as the description of the current CS.
 java.util.ArrayList getAdjacentNodes()
           
 java.util.ArrayList getArrayOfChildren()
           
 java.util.ArrayList getArrayOfFathers()
           
 java.util.Enumeration getChildren()
          Get the children (the immediate specializations) of the current CS
 java.lang.Object getContent()
          It returns the content of a CS ontNode depending on its type (Type, Situation, COntext or Individual).
 CSRule getCSRuleAt(int range)
          Get the rule with the specified range among the rules of the current CS.
 java.util.ArrayList getCSRules()
          Get all the CSRules that are attached directly to the current CS.
 java.util.ArrayList getCSRulesAntecedent()
          Get all the rules antecedents that are attached directly to the current CS.
 java.util.ArrayList getCSRulesConcequence()
          Get all the rules consequences that are attached directly to the current CS.
protected  java.lang.Object getDescription()
          Get the description of the current CS.
 java.util.Enumeration getEdges()
           
 java.util.Enumeration getFathers()
          Get the fathers (the immediate generalizations) of the current CS
protected  void getImmSubTypes(Type type, java.util.ArrayList imdtSubTypes)
          Put in the ArrayList imdtSubTypes all the Immediate subTypes of type.
protected  void getImmSuperTypes2(java.util.ArrayList imdtSuperTypes)
           
 java.util.Enumeration getIncomeEdges()
           
 java.awt.Point getLeftTopPoint()
           
 java.util.Enumeration getMetaphors()
          Get an Enumeration over all the metaphors (An ArrayList of metaphors) that are attached directly to the current CS.
 int getNbrChildren()
           
 int getNbrCSRules()
          Get the number of rules attached directly to the current CS.
 int getNbrFathers()
           
 int getNbrSituations()
          Get the number of situations attached directly to the current CS.
 int getNumberofEdges()
           
 java.util.Enumeration getOutcomeEdges()
           
 Situation getSituationAt(int range)
          Get the situation with the specified range among the situations of the current CS.
 java.util.Enumeration getSituations()
          Get an Enumeration over all the situations (An ArrayList of Situation) that are attached directly to the current CS.
 java.util.Enumeration getSituationsDescription()
          Get an Enumeration over all the situations description that are attached directly to the current CS.
 boolean hasContentToDisplay()
           
 boolean isAntecedent(CS cs)
          Check if the current CS is equal or an antecedent of the specified CS cs.
 boolean isChild(CS child)
          Check if the specified child is among the children of the current CS
 boolean isConceptType()
          Check if the current cs is a Concept Type CS
 boolean isContext()
           
static boolean isCS(java.lang.Object obj)
          Check if the specified Object obj is a CS (Conceptual Structure); a concept type, a relation type, an individual or a situation.
 boolean isCSRule()
          Check if the current CS is in fact a CSRule.
 boolean isDescendant(CS cs)
          In general, a node has less fathers than children, that is why this method is defined in terms of isAntecedent().
 boolean isFather(CS father)
          Check if the specified father is among the fathers of the current CS.
 boolean isIndexedType()
           
 boolean isIndividual()
          Check if the current CS is in fact an Individual CS.
 boolean isMetaphor()
           
 boolean isRelationType()
          Check if the current CS is in fact a Relation Type CS.
 boolean isSituation()
          Check if the current CS is in fact a Situation CS.
 boolean isType()
          Check if the current CS is in fact a Type CS.
 boolean link(CS child)
          add a father-child link between two CSs ; father (the current CS : this) and child (the parameter).
 CSRule removeCSRuleAt(int range)
          Locate the rule with the specified range among the rules of the current CS, remove the link that relates the current CS to the rule and returns the rule.
protected  void removeDescription()
          Nullify the description value of the current CS.
 boolean removeLink(CS cs)
          Remove the link between the current CS (this) and the specified CS cs.
 boolean removeLink(Type subType, Ontology ontology)
          Deprecated. Use instead removeLink(CS cs)
 boolean removeLinkToSituation(Situation situation)
          Remove the link between the current type (this) and the specified Situation if the situation is related to more than one CS
 Situation removeSituationAt(int range)
          Locate the situation with the specified range among the situations of the current CS, remove the link that relates the current CS to the situation and returns the situation.
 boolean setChildren(java.util.ArrayList newChildren)
          Set children as the children of the current CS.
protected  void setDescription(java.lang.Object description)
          Set description as the description of the current CS.
 boolean setFathers(java.util.ArrayList newFathers)
          Set the parameter fathers as the fathers of the current CS.
 void setIncomeEdges(java.util.ArrayList edges)
           
 void setLeftTopPoint(java.awt.Point point)
           
 void setOutcomeEdges(java.util.ArrayList edges)
           
 void setRectangle(java.awt.Rectangle rectangle)
           
protected  org.jdom.Element toChildren(Ontology ontology)
          Parse the liste of CS's children to an element of the ontology document.
protected  org.jdom.Element toContent(Ontology ontology)
          This method will be overriden by CS subclasses: Parse the content of the current cs to an element of the ontology document.
protected  org.jdom.Element toCSKind(java.lang.String key)
          This method will be overriden by CS subclasses: it each CS should construct and return its XML header.
 java.lang.String toDisplayString(Lexicon currentLexicon)
           
protected  org.jdom.Element toFathers(Ontology ontology)
          Parse the list of CS's fathers to an element of the ontology document.
protected  org.jdom.Element toLexicon(Ontology ontology)
          Return the XML format of the lexicon associated to the current cs which can be type or an individual.
 java.lang.String toString(Lexicon lexicon)
          Implement the method toString(Lexicon) specified in the interface ToString.
 org.jdom.Element toXml(Ontology ontology, java.lang.String key)
          Parse the current cs to an element of the ontology document.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

S_TYPE

public static final java.lang.String S_TYPE
See Also:
Constant Field Values

S_SITUATION

public static final java.lang.String S_SITUATION
See Also:
Constant Field Values

S_CONTEXT

public static final java.lang.String S_CONTEXT
See Also:
Constant Field Values

S_CSRULE

public static final java.lang.String S_CSRULE
See Also:
Constant Field Values
Constructor Detail

CS

protected CS()
Constructors of CS are protected since only its subclasses can instantiate it


CS

protected CS(java.lang.Object description)
Create a CS with the specified description.

Parameters:
description - An Object
Method Detail

finalize

public void finalize()
clear the fathers and children lists as well as the description of the current CS.


clear

public void clear()
clear the fathers and children lists and the description of the current CS.


getDescription

protected java.lang.Object getDescription()
Get the description of the current CS.

Returns:
the description of the current CS. The user of this method should cast the returned object to a specific description scheme, CG for instance.

setDescription

protected void setDescription(java.lang.Object description)
Set description as the description of the current CS. If this later has already a description, the method will destroy it first.

Parameters:
description - An Object

removeDescription

protected void removeDescription()
Nullify the description value of the current CS.


getFathers

public java.util.Enumeration getFathers()
Get the fathers (the immediate generalizations) of the current CS

Returns:
an Enumeration over an ArrayList of CS (the value of the attribute fathers)

getArrayOfFathers

public java.util.ArrayList getArrayOfFathers()

getNbrFathers

public int getNbrFathers()

getNbrChildren

public int getNbrChildren()

setFathers

public boolean setFathers(java.util.ArrayList newFathers)
Set the parameter fathers as the fathers of the current CS. If the current CS has already a list of fathers, the list is destroyed first.

Parameters:
newFathers - An ArrayList of CS to be set as fathers of the current CS
Returns:
false if an element of the parameter fathers is not a CS.

isFather

public boolean isFather(CS father)
Check if the specified father is among the fathers of the current CS.

Parameters:
father - A CS
Returns:
true if father is among the fathers of the current CS.

getChildren

public java.util.Enumeration getChildren()
Get the children (the immediate specializations) of the current CS

Returns:
an Enumeration over an ArrayList of CS; the value of the attribute children

getNumberofEdges

public int getNumberofEdges()

getArrayOfChildren

public java.util.ArrayList getArrayOfChildren()

setChildren

public boolean setChildren(java.util.ArrayList newChildren)
Set children as the children of the current CS. If the CS has already a list of children, the list is destroyed first.

Parameters:
newChildren - An ArrayList of CS to be set as children of the current CS
Returns:
false if an element of the parameter children is not a CS.

isChild

public boolean isChild(CS child)
Check if the specified child is among the children of the current CS

Parameters:
child - A CS
Returns:
true if child is among the children of the current CS.

isCS

public static boolean isCS(java.lang.Object obj)
Check if the specified Object obj is a CS (Conceptual Structure); a concept type, a relation type, an individual or a situation.

Parameters:
obj - An object
Returns:
true if obj is a CS.

isType

public boolean isType()
Check if the current CS is in fact a Type CS.

Returns:
true if the current CS is a Type CS

isIndexedType

public boolean isIndexedType()

isConceptType

public boolean isConceptType()
Check if the current cs is a Concept Type CS

Returns:
true if the current cs is a Concept Type CS

isRelationType

public boolean isRelationType()
Check if the current CS is in fact a Relation Type CS.

Returns:
true if the current CS is a Relation Type CS

isIndividual

public boolean isIndividual()
Check if the current CS is in fact an Individual CS.

Returns:
true if the current CS is an Individual CS

isCSRule

public boolean isCSRule()
Check if the current CS is in fact a CSRule.

Returns:
true if the current CS is a CSRule

isContext

public boolean isContext()

isMetaphor

public boolean isMetaphor()

isSituation

public boolean isSituation()
Check if the current CS is in fact a Situation CS.

Returns:
true if the current CS is a Situation CS

canBeRemoved

public boolean canBeRemoved()
Check if the current CS can be removed, i.e. if it has no children. Note that the root and the relation root can not be removed, even if they have no children. The test is not done by this method however.

Returns:
true if the current CS has no children

getContent

public java.lang.Object getContent()
It returns the content of a CS ontNode depending on its type (Type, Situation, COntext or Individual). If it is a type, the object returned represents its Definition or Canon (in case the Definition is null). If it is a situation, context or individual, the object represents its description. If it is a CSRule, the object returned represents is the CSRule itself. If ontNode is null, null is returned.

Returns:
an object representing the content of ontNode

link

public boolean link(CS child)
add a father-child link between two CSs ; father (the current CS : this) and child (the parameter). If child is already a child of father then nothing is done and the method returns true. The method checks however that child is not already known as antecedent of father, in order to avoid cyclic references of CSs.

Parameters:
child - A CS that play the role of a child for the current CS
Returns:
true if child is not null and child is not already known as an antedecent of father (to avoid cycle).

detach

public void detach()
Detach the current CS from its fathers and children : remove all the links that relate the current CS, as a child, to its fathers, and remove all the links that relate the current CS, as a father, to its children. The current CS itself is not destroyed.


isAntecedent

public boolean isAntecedent(CS cs)
Check if the current CS is equal or an antecedent of the specified CS cs. A progressive computation is done to determine the next antecedents and to check if the current CS is among the computed antecedents.

Parameters:
cs - A CS
Returns:
true if the current CS is equal or an antecedent of the specified CS cs.

isDescendant

public boolean isDescendant(CS cs)
In general, a node has less fathers than children, that is why this method is defined in terms of isAntecedent().

Parameters:
cs - A CS
Returns:
true if the current CS is equal to the specified CS cs or it is a descendant of it.

getImmSuperTypes2

protected void getImmSuperTypes2(java.util.ArrayList imdtSuperTypes)

getImmSubTypes

protected void getImmSubTypes(Type type,
                              java.util.ArrayList imdtSubTypes)
Put in the ArrayList imdtSubTypes all the Immediate subTypes of type. This method is used especially by the subclass Type. A CS cs is a direct (immediate) subType of type if cs is a Type, and it has no definition or its is a relation type, or its definition is not a DescriptionWithGenus or its definition contains a genus with type as type. This specific definition of direct subType is important because an Ontology in Amine is an integration of two layers where description specialization/generalization stand for the first layer. See the Web Site and Ontology page for more detail.


getSituations

public java.util.Enumeration getSituations()
Get an Enumeration over all the situations (An ArrayList of Situation) that are attached directly to the current CS.

Returns:
an Enumeration over all the Situations CSs that are attached directly to the current CS. The method returns null if the current CS has no direct situations.

getSituationsDescription

public java.util.Enumeration getSituationsDescription()
Get an Enumeration over all the situations description that are attached directly to the current CS.

Returns:
an Enumeration over all the situations description that are attached directly to the current CS. The method returns null if the current CS has no direct situations.

getSituationAt

public Situation getSituationAt(int range)
Get the situation with the specified range among the situations of the current CS.

Parameters:
range - This parameter specifies the range of the direct situation among the other situations that are directly attached to the current CS. This parameter doesn't give the range of the situation among all the children of the current CS. Note that range begins from 1 (not 0) : get the first situation (range = 1), get the second situation (range = 2), etc.
Returns:
the situation at the specified range among the direct situations of the current CS, or return null if range is outOfBound or no direct situation exists at the specified range for the current CS.

getNbrSituations

public int getNbrSituations()
Get the number of situations attached directly to the current CS.

Returns:
the number of situations attached directly to the current CS. return 0 if the current CS has no direct situations.

addSituation

public boolean addSituation(java.lang.Object obj)
Add a new situation to the current CS. The operation can receive a Situation directly or only the description in which case, the operation will create a new Situation with the specified description as its description.

Parameters:
obj - An object that could be a situation or a description
Returns:
true if obj is not null

removeLink

public boolean removeLink(Type subType,
                          Ontology ontology)
Deprecated. Use instead removeLink(CS cs)

Remove a subType link between the current CS (this) and the specified Type subType.

Parameters:
subType - A Type CS
ontology - The Current ontology
Returns:
true if subType is not null and there was a link between the current CS (this) and the specified Type subType. If subType has no more father after the remove of the link, then link it as a child to the Root of the ontology

removeLinkToSituation

public boolean removeLinkToSituation(Situation situation)
Remove the link between the current type (this) and the specified Situation if the situation is related to more than one CS

Parameters:
situation - A Situation
Returns:
true if situation is not null, if there was a link between the two nodes and if situation has more than one father.

removeLink

public boolean removeLink(CS cs)
Remove the link between the current CS (this) and the specified CS cs.

Parameters:
cs - A CS
Returns:
true if cs is not null, if there was a link between the two nodes.

removeSituationAt

public Situation removeSituationAt(int range)
Locate the situation with the specified range among the situations of the current CS, remove the link that relates the current CS to the situation and returns the situation. The situation itself is not removed from the ontology.

Parameters:
range - : this parameter gives the range of the situation among the other situations that are directly attached to the current cs. This parameter doesn't give the range of the situation among all the children of the current cs. Note that range begins from 1 (not 0) : remove the first situation (range = 1), remove the second situation (range = 2), etc.
Returns:
: return the situation that is found at the specified range among the situations of the current CS, or return null if range is outOfBound or if no situation exists for the current CS at the specified range.

getMetaphors

public java.util.Enumeration getMetaphors()
Get an Enumeration over all the metaphors (An ArrayList of metaphors) that are attached directly to the current CS.

Returns:
an Enumeration over all the metaphors CSs that are attached directly to the current CS. The method returns null if the current CS has no direct metaphors.

getCSRules

public java.util.ArrayList getCSRules()
Get all the CSRules that are attached directly to the current CS.

Returns:
an ArrayList of all the CSRules that are attached directly to the current CS. The method returns null if the current CS has no direct CSRules.

getCSRulesAntecedent

public java.util.ArrayList getCSRulesAntecedent()
Get all the rules antecedents that are attached directly to the current CS.

Returns:
an ArrayList of all the rules antecedents that are attached directly to the current CS. The method returns null if the current CS has no direct rules.

getCSRulesConcequence

public java.util.ArrayList getCSRulesConcequence()
Get all the rules consequences that are attached directly to the current CS.

Returns:
an ArrayList of all the rules consequences that are attached directly to the current CS. The method returns null if the current CS has no direct rules.

getCSRuleAt

public CSRule getCSRuleAt(int range)
Get the rule with the specified range among the rules of the current CS.

Parameters:
range - This parameter specifies the range of the direct rule among the other rules that are directly attached to the current CS. This parameter doesn't give the range of the rule among all the children of the current CS. Note that range begins from 1 (not 0) : get the first rule (range = 1), get the second rule (range = 2), etc.
Returns:
the rule at the specified range among the direct rules of the current CS, or return null if range is outOfBound or no direct rule exists at the specified range for the current CS.

getNbrCSRules

public int getNbrCSRules()
Get the number of rules attached directly to the current CS.

Returns:
the number of rules attached directly to the current CS. return 0 if the current CS has no direct rules.

addCSRule

public boolean addCSRule(java.lang.Object ante,
                         java.lang.Object consq)
Add a new rule to the current CS. The operation can receive a Regle directly or only the antecedent in which case, the operation will create a new Regle with the specified antecedent as its description.

Returns:
true if obj is not null

addCSRule

public boolean addCSRule(CSRule rule)

removeCSRuleAt

public CSRule removeCSRuleAt(int range)
Locate the rule with the specified range among the rules of the current CS, remove the link that relates the current CS to the rule and returns the rule. The rule itself is not removed from the ontology.

Parameters:
range - : this parameter gives the range of the rule among the other rules that are directly attached to the current cs. This parameter doesn't give the range of the rule among all the children of the current cs. Note that range begins from 1 (not 0) : remove the first rule (range = 1), remove the second rule (range = 2), etc.
Returns:
: return the rule that is found at the specified range among the rules of the current CS, or return null if range is outOfBound or if no rule exists for the current CS at the specified range.

toString

public java.lang.String toString(Lexicon lexicon)
                          throws ToStringException
Implement the method toString(Lexicon) specified in the interface ToString. It is in fact overriden in the sub-classes of CS

Specified by:
toString in interface ToString
Parameters:
lexicon - Lexicon to use for the textual formulation
Returns:
a textual formulation of the current CS
Throws:
ToStringAndParseException - if an error occurs during the textual formulation
ToStringException

addOutcomeEdge

public void addOutcomeEdge(Edge edge)
Implementation of Node Interface

Specified by:
addOutcomeEdge in interface Node

addIncomeEdge

public void addIncomeEdge(Edge edge)
Specified by:
addIncomeEdge in interface Node

getOutcomeEdges

public java.util.Enumeration getOutcomeEdges()
Specified by:
getOutcomeEdges in interface Node

getIncomeEdges

public java.util.Enumeration getIncomeEdges()
Specified by:
getIncomeEdges in interface Node

getEdges

public java.util.Enumeration getEdges()
Specified by:
getEdges in interface Node

setOutcomeEdges

public void setOutcomeEdges(java.util.ArrayList edges)
Specified by:
setOutcomeEdges in interface Node

setIncomeEdges

public void setIncomeEdges(java.util.ArrayList edges)
Specified by:
setIncomeEdges in interface Node

hasContentToDisplay

public boolean hasContentToDisplay()
Specified by:
hasContentToDisplay in interface Node

toDisplayString

public java.lang.String toDisplayString(Lexicon currentLexicon)
                                 throws ToStringException
Specified by:
toDisplayString in interface Node
Throws:
ToStringException

setLeftTopPoint

public void setLeftTopPoint(java.awt.Point point)
Specified by:
setLeftTopPoint in interface Node

getLeftTopPoint

public java.awt.Point getLeftTopPoint()
Specified by:
getLeftTopPoint in interface Node

setRectangle

public void setRectangle(java.awt.Rectangle rectangle)
Specified by:
setRectangle in interface Node

copyNode

public Node copyNode()
This method is defined to implement the method copyNode of Node, but it should not be used directly since it returns null.

Specified by:
copyNode in interface Node
Returns:
null

getAdjacentNodes

public java.util.ArrayList getAdjacentNodes()
Specified by:
getAdjacentNodes in interface Node

toCSKind

protected org.jdom.Element toCSKind(java.lang.String key)
This method will be overriden by CS subclasses: it each CS should construct and return its XML header.

Parameters:
key -
Returns:
it each CS should construct and return its XML header.

toLexicon

protected org.jdom.Element toLexicon(Ontology ontology)
Return the XML format of the lexicon associated to the current cs which can be type or an individual.

Parameters:
ontology -
Returns:
fathers the element that will be added to the ontology document

toContent

protected org.jdom.Element toContent(Ontology ontology)
This method will be overriden by CS subclasses: Parse the content of the current cs to an element of the ontology document.

Parameters:
ontology -
Returns:
cs

toChildren

protected org.jdom.Element toChildren(Ontology ontology)
Parse the liste of CS's children to an element of the ontology document.

Parameters:
ontology -
Returns:
children the element that will be added to the ontology document

toFathers

protected org.jdom.Element toFathers(Ontology ontology)
Parse the list of CS's fathers to an element of the ontology document.

Parameters:
ontology -
Returns:
fathers the element that will be added to the ontology document

toXml

public org.jdom.Element toXml(Ontology ontology,
                              java.lang.String key)
Parse the current cs to an element of the ontology document.

Parameters:
ontology -
Returns:
CSelt