aminePlatform.kernel.ontology
Class Situation

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

public class Situation
extends CS
implements java.io.Serializable

Title : ontology.Situation Class

Description : It implements the CS for a situation. Situation has a description, inherited from its superclass CS.

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

See Also:
Serialized Form

Field Summary
 
Fields inherited from class aminePlatform.kernel.ontology.CS
S_CONTEXT, S_CSRULE, S_SITUATION, S_TYPE
 
Constructor Summary
Situation()
          Create an 'empty' Situation CS
Situation(java.lang.Object description)
          Create a Situation CS with the specified description
 
Method Summary
 java.lang.Object getDescription()
          Get the description of the current Situation.
 java.util.Enumeration getIndexingTypes()
          Get the immediate types for which the current situation is a situation.
static boolean isSituation(java.lang.Object obj)
          Check if the specified Object obj is a Type CS
 void removeDescription()
          Remove the description of the current Situation.
 void setDescription(java.lang.Object description)
          Set the description of the current Situation to description.
protected  org.jdom.Element toContent(Ontology ontology)
          For the current situation add the element that is specified its content to the XML ontology document.
protected  org.jdom.Element toCSKind(java.lang.String key)
          For the current situation add the element that is specified 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 aminePlatform.kernel.ontology.CS
addCSRule, addCSRule, addIncomeEdge, addOutcomeEdge, addSituation, canBeRemoved, clear, copyNode, detach, finalize, getAdjacentNodes, getArrayOfChildren, getArrayOfFathers, getChildren, getContent, getCSRuleAt, getCSRules, getCSRulesAntecedent, getCSRulesConcequence, getEdges, getFathers, getImmSubTypes, getImmSuperTypes2, getIncomeEdges, getLeftTopPoint, getMetaphors, getNbrChildren, getNbrCSRules, getNbrFathers, getNbrSituations, getNumberofEdges, getOutcomeEdges, getSituationAt, getSituations, getSituationsDescription, hasContentToDisplay, isAntecedent, isChild, isConceptType, isContext, isCS, isCSRule, isDescendant, isFather, isIndexedType, isIndividual, isMetaphor, isRelationType, isSituation, isType, link, removeCSRuleAt, removeLink, removeLink, removeLinkToSituation, removeSituationAt, setChildren, setFathers, setIncomeEdges, setLeftTopPoint, setOutcomeEdges, setRectangle, toChildren, toDisplayString, toFathers, toLexicon, toXml
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Situation

public Situation()
Create an 'empty' Situation CS


Situation

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

Method Detail

isSituation

public static boolean isSituation(java.lang.Object obj)
Check if the specified Object obj is a Type CS

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

getDescription

public java.lang.Object getDescription()
Get the description of the current Situation.

Overrides:
getDescription in class CS
Returns:
the description of the current Situation. The returned object should be casted to a particular description scheme (like CG or any other structure implemented in Java).

setDescription

public void setDescription(java.lang.Object description)
Set the description of the current Situation to description.

Overrides:
setDescription in class CS
Parameters:
description - The (new) description for the current Situation

removeDescription

public void removeDescription()
Remove the description of the current Situation.

Overrides:
removeDescription in class CS

getIndexingTypes

public java.util.Enumeration getIndexingTypes()
Get the immediate types for which the current situation is a situation. These types are not mandatory fathers of the current situation since a father of a situation can be another situation. The method performs an upward search in the ontology, looking for the first types that are antecedent of the current situation. This treatment is already done by the method getImmSuperTypes2(), so the current method is basically a call to getImmSuperTypes2().

Returns:

toString

public java.lang.String toString(Lexicon lexicon)
                          throws ToStringException
Description copied from class: CS
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
Overrides:
toString in class CS
Parameters:
lexicon - Lexicon to use for the textual formulation
Returns:
a textual formulation of the current CS
Throws:
ToStringException

toCSKind

protected org.jdom.Element toCSKind(java.lang.String key)
For the current situation add the element that is specified its kind to the XML ontology document.

Overrides:
toCSKind in class CS
Parameters:
key -
Returns:
content.

toContent

protected org.jdom.Element toContent(Ontology ontology)
For the current situation add the element that is specified its content to the XML ontology document.

Overrides:
toContent in class CS
Parameters:
ontology -
Returns:
content.