aminePlatform.kernel.ontology
Class Individual

java.lang.Object
  extended byaminePlatform.kernel.ontology.CS
      extended byaminePlatform.kernel.ontology.Individual
All Implemented Interfaces:
Node, java.io.Serializable, ToString

public class Individual
extends CS
implements java.io.Serializable

Title : ontology.Individual Class

Description : It implements the CS for an individual. Individual 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
Individual(Type type)
          Create an Individual with the specified type as Type of the Individual
Individual(Type type, java.lang.Object description)
           
 
Method Summary
 java.lang.Object getDescription()
          Get the description of the current Individual.
 Type getType()
          Get the (immediate) type of the current individual.
 boolean isConform(Type typeCS)
          Check if the current individual is conform to the specified type (the parameter typeCS) : check that typeCS is the immediate type or a superType of the immediate type of the current individual.
static boolean isIndividual(java.lang.Object obj)
          Check if the specified Object obj is an Individual CS
 boolean isType(Type type)
          Check if the specified type is the (immediate) type of the current Individual
 void removeDescription()
          Remove the description of the current Individual.
 void setDescription(java.lang.Object description)
          Set the description of the current Individual to description.
 void setType(Type type)
          Set the specified type as the type of the current Individual
protected  org.jdom.Element toContent(Ontology ontology)
          For the current individual add the element that specifies its content to the XML ontology document.
protected  org.jdom.Element toCSKind(java.lang.String key)
          For the current individual 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 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

Individual

public Individual(Type type)
Create an Individual with the specified type as Type of the Individual

Parameters:
type - The Type of the current Individual

Individual

public Individual(Type type,
                  java.lang.Object description)
Method Detail

isIndividual

public static boolean isIndividual(java.lang.Object obj)
Check if the specified Object obj is an Individual CS

Parameters:
obj - An object
Returns:
true if obj is an Individual CS

getDescription

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

Overrides:
getDescription in class CS
Returns:
the description of the current Individual. 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 Individual to description.

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

removeDescription

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

Overrides:
removeDescription in class CS

getType

public Type getType()
Get the (immediate) type of the current individual.

Returns:
the (immediate) type of the individual. Return null if the individual has no father.

setType

public void setType(Type type)
Set the specified type as the type of the current Individual

Parameters:
type - A Type CS

isType

public boolean isType(Type type)
Check if the specified type is the (immediate) type of the current Individual

Parameters:
type - A Type CS
Returns:
true if type is not null and type is the immediate type of the current Individual

isConform

public boolean isConform(Type typeCS)
Check if the current individual is conform to the specified type (the parameter typeCS) : check that typeCS is the immediate type or a superType of the immediate type of the current individual.

Parameters:
typeCS - A Type CS
Returns:
true if typeCS is not null and the current individual is conform to typeCS.

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 individual add the element that specifies its kind to the XML ontology document.

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

toContent

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

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