aminePlatform.engines.dynamicKnowledgeIntegration
Class IntegrateCS

java.lang.Object
  extended byaminePlatform.engines.dynamicKnowledgeIntegration.IntegrateCS
All Implemented Interfaces:
AmineConstants
Direct Known Subclasses:
IntegrateCSRule, IntegrateSituation

public abstract class IntegrateCS
extends java.lang.Object
implements AmineConstants

IntegrateCS is an abstract class that provides the basic process for CS integration. It is specialized in IntegrationSituation in the case of Situations Integration, and specialized in IntegrationCSRule in the case of CSRules Integration. There are three modes of Integration of a CS: classification-based integration, generalization-based integration, and information retrieval based integration. Copyright: Copyright (c) 2004-2009 Adil KABBAJ


Field Summary
static byte ABDUCTIVE_INTEGRATION_MODE
           
static byte ANALOGICAL_INTEGRATION_MODE
           
 CGOperations cgOperations
           
(package private)  boolean classify
           
(package private)  java.util.HashMap compareNodesHshMap
           
static byte DEDUCTIVE_INTEGRATION_MODE
           
(package private)  java.util.HashMap focusHshMap
           
 AmineList integratedNodesList
          This ArrayList is used for GUI purposes.
 Lexicon lexicon
          The current lexicon used of the integration.
(package private)  CS newOntNode
           
 Ontology ontology
          The current ontology used during the integration
(package private)  boolean simulation
           
(package private)  boolean trace
           
 javax.swing.JTextArea traceArea
          This variable is used to know in which JTextArea the trace will be displayed
 
Fields inherited from interface aminePlatform.util.AmineConstants
ANALOGY, B_ASSIGN, B_DSPLY_WT_DELAY, B_DSPLY_WTT_DELAY, B_TRIGGER, B_WTT_DSPLY, BLOCK_BACKWARD_PROPAGATION, BLOCK_FORWARD_PROPAGATION, CANON, CGIF, CGRAPHIC, CHECK_PRECONDITIONS, COMPARE, COMPOSED_GOAL, CONCEPT_TYPE_IDENT, CONTEXT, COVERED_BY, CPLTE_CONTRACT, DEFINITION, EQ_OR_MORE_SPCFQ, EQUAL, EXPAND, FALSE_FOCUS_LIST, FUNCTIONAL, GENERALISE, GENERALIZE, HAVE_AN_INTERSECTION, ID_ADD, ID_DIV, ID_EQ, ID_INF, ID_IS, ID_MESSAGE, ID_MUL, ID_NOT, ID_NULL, ID_OPER_AND, ID_OPER_OR, ID_SUB, ID_SUP, IN_ACTIVATION, IN_MODE, IN_MODE2, INDIVIDUAL, INDIVIDUAL_IDENT, INTEGRATED, IS_CANONIC, KEY_GLOBAL_RULE, LC_ADD, LC_AMINE_BOOLEAN, LC_AMINE_DOUBLE, LC_AMINE_INTEGER, LC_AND, LC_BOOLEAN, LC_CG, LC_CLOSE_BRKT, LC_CLOSE_PARENT, LC_CLOSE_SET, LC_COMMA, LC_COMMA_SEMI, LC_CONCEPT, LC_CONSTRUCTOR, LC_CS, LC_CUT, LC_DIFF, LC_DIV, LC_DOUBLE, LC_DSBL_BKWRD_PRPGTN, LC_DSBL_FRWRD_PRPGTN, LC_EOF, LC_EQ, LC_FOUR_POINTS, LC_IDENTIFIER, LC_IF, LC_INF, LC_INTEGER, LC_INTEROG, LC_IS, LC_JAVA_OBJECT, LC_LEFT_ARROW, LC_LIST, LC_NULL, LC_OPEN_BRKT, LC_OPEN_PARENT, LC_OPEN_SET, LC_OPER_AND, LC_OPER_OR, LC_POINT, LC_RELATION, LC_RGHT_ARROW, LC_SEMI_COMMA, LC_SET, LC_STAR, LC_STATE, LC_STRING, LC_SUB, LC_SUP, LC_TERM, LC_TWO_POINTS, LC_VAR_LIST_CONSTRUCTOR, LC_VARIABLE, LF, MAXIMAL_JOIN, MORE_GENERAL, MORE_SPECIFIC, NOTHING_TO_INTEGRATE, OPERS_WITH_RSLT, OUT_MODE, OUT_MODE2, PARTIAL_CONTRACT, PARTIAL_SUBSUME, PRJCT_OPERS, PROJECT, READ, READ_SENTENCE, RELATION_TYPE_IDENT, S_AND, S_BOOLEAN, S_CG, S_CLOSE_BRKT, S_CLOSE_PARENT, S_CLOSE_SET, S_COMMA, S_CONCEPT, S_CONSTRUCTOR, S_CUT, S_DIFF, S_DOUBLE, S_EOF, S_EQUAL, S_EXPAND, S_FALSE, S_FOUR_POINTS, S_GENERALISE, S_GENERALIZE, S_IDENTIFIER, S_IF, S_INTEGER, S_INTEROG, S_IS, S_IS_CANONIC, S_LEFT_ARROW, S_LIST, S_MAXIMAL_JOIN, S_OPEN_BRKT, S_OPEN_PARENT, S_OPEN_SET, S_POINT, S_RGHT_ARROW, S_SEMI_COMMA, S_SOURCE, S_SPECIALIZE, S_STATE, S_STRING, S_SUBSUME, S_SUBSUME_WITH_RESULT, S_SUPER, S_TARGET, S_TERM, S_THIS, S_TRUE, S_TWO_POINTS, S_UNIFY, S_VARIABLE, SITUATION, SPECIALIZE, STEADY, SUBSUME, SUBSUME_WITH_RSLT, TRIGGER, UNCOMPARABLE, UNIFY, VAR_SUPER, WAIT_ASSIGNMENT, WAIT_END_OF_ASSIGNMENT, WAIT_PRECONDITIONS, WAIT_VALUE
 
Constructor Summary
IntegrateCS(Ontology ont)
          This is a minimal specification of IntegrateCS.
IntegrateCS(Ontology ont, Lexicon lex)
          Create a IntegrateCS task with the specified ont as the ontology where the integration should be processed and lex as the lexicon to use among the lexicons available in the ontology.
IntegrateCS(Ontology ont, Lexicon lex, javax.swing.JTextArea txtArea)
          Create a IntegrateCS task with the specified ont as the ontology where the integration should be processed, lex as the lexicon to use among the lexicons available in the ontology and txtArea as the Area where the trace of the integration is displayed.
 
Method Summary
 IntegrationResult ask(java.lang.Object newDescr)
           
 IntegrationResult ask(java.lang.Object newDescr, AmineList pertinentTypes)
           
 IntegrationResult ask(java.lang.Object newDescr, AmineList pertinentTypes, AmineList superTypesPertinentTypes)
           
static IntegrationResult ask(Ontology ontology, java.lang.Object newDescr)
           
static IntegrationResult ask(Ontology ontology, java.lang.Object newDescr, AmineList pertinentTypes)
           
protected  java.util.ArrayList children(CS ontologyNode)
          returns an ArrayList of all the children of an Ontology Node except those that are Individual
 IntegrationResult classify(java.lang.Object newDescr)
          Basic public and member methods of IntegrateCS
 IntegrationResult classify(java.lang.Object newDescr, AmineList pertinentTypes)
           
 IntegrationResult classify(java.lang.Object newDescr, AmineList pertinentTypes, AmineList superTypesPertinentTypes)
           
static IntegrationResult classify(Ontology ontology, java.lang.Object newDescr)
           
static IntegrationResult classify(Ontology ontology, java.lang.Object situationDescr, AmineList pertinentTypes)
           
protected  CompareCGResult compare(CS newOntNode, Concept entryPoint, CS currentOntNode, CS fatherOntNode)
          compares the new newDescr to classify with a current newDescr using entryPoint as the entry point for the comparison.
protected  boolean compareAndProceed(Concept entryPoint, CS currentOntNode, CS fatherOntNode, boolean realComparison)
          method for comparing and propagating a new newDescr from a node
protected  CompareCGResult compareCG(CS newOntNode, Concept entryPoint, CS currentOntNode, CS fatherOntNode)
          protected CompareCGResults compareCG(CG newDescr, CG currentCG) throws Exception { CompareCGResults compareCGResult = new CompareCGResults(); if (currentCG == null) { trace("*** The current node has no content; the comparison is considered as UNCOMPARABLE. "); compareCGResult.setCommonCG(null); compareCGResult.setCompareResult(UNCOMPARABLE); return compareCGResult; } if (newDescr.equal(currentCG)) { compareCGResult.setCompareResult(EQUAL); } else if (currentCG.subsume(newDescr)) { // currentCG is more general than newDescr // newDescr is more specific than currentCG compareCGResult.setCompareResult(MORE_SPECIFIC); // check if it is interpreted correctly } else if (newDescr.subsume(currentCG)) { // newDescr is more general than currentCG compareCGResult.setCompareResult(MORE_GENERAL); // check if it is interpreted correctly } else { compareCGResult.setCompareResult(UNCOMPARABLE); // consider as uncomparable } return compareCGResult; } // end of compareCG method
protected static IntegrateCS createIntegrateCS(Ontology ontology, Lexicon lexicon)
           
protected  java.util.ArrayList enum2ArrayList(java.util.Enumeration enum)
          It returns an AmineList containing objects that are contained in an Enumeration enum.
 void finalize()
           
protected abstract  java.util.Enumeration findConceptsWithType(java.lang.Object newDescr, CS pertinentType)
           
protected  boolean firstCompareAndProceed(Concept entryPoint, CS currentOntNode, CS fatherOntNode, boolean realComparison)
           
 IntegrationResult generalize(java.lang.Object newDescr)
           
 IntegrationResult generalize(java.lang.Object newDescr, AmineList pertinentTypes)
           
 IntegrationResult generalize(java.lang.Object newDescr, AmineList pertinentTypes, AmineList superTypesPertinentTypes)
           
static IntegrationResult generalize(Ontology ontology, java.lang.Object newDescr)
           
static IntegrationResult generalize(Ontology ontology, java.lang.Object newDescr, AmineList pertinentTypes)
           
protected  CompareNodesResult getCompareNodesResult(java.util.ArrayList compareCurrentNodeList, Concept entryPoint)
          Auxiliary Methods used by Dynamic Integration Process
protected abstract  java.util.Enumeration getConcepts(java.lang.Object newDescr)
           
protected abstract  AmineList getConceptTypes(java.lang.Object newDescr)
          End of Static Methods
protected  CG getContent(CS node)
           
 byte getIntegrationInferenceMode()
           
 AmineList getResultOfSimulation()
           
 boolean getTrace()
          Get the value of the boolean attribute trace.
 void guiTrace(CS newOntNode)
          In case the integration is called from the dynamicOntologyGUI, currNewOntNode is added to the integratedNodesList to allow the OntologyGUI to add it and display it in Ontology Panel.
protected abstract  boolean identicalTypeOfCS(CS newOntNode, CS currentOntNode)
           
 IntegrationResult integrateCS(java.lang.Object newDescr, AmineList pertinentTypes, AmineList superTypesPertinentTypes, boolean classify)
           
protected abstract  boolean isEmpty(java.lang.Object newDescr)
           
protected abstract  CS newCS(java.lang.Object newDescr)
           
protected  void printFocusHashMap()
           
protected  boolean proceed(Concept entryPoint, CS currentOntNode, CS fatherOntNode, boolean realComparison, CompareCGResult compareCGResult)
          method for proceeding on the real update of the memory
protected  void propagateFromOneFocus(CS oneFocus, AmineList oneEntryPointList)
           
protected  void propagateNewNodeViaFocus()
           
protected abstract  boolean sameTypeOfCS(CS newOntNode, CS currentOntNode)
           
 void saveLog()
          Save the trace of a dynamic integration if the file dynamicOntologyLog.txt which is stored at the same directory as the current ontology.
protected abstract  void setContentOf(CS newOntNode, CS currentOntNode)
           
 void setIntegrationInferenceMode(byte intInfMode)
           
 void setTrace(boolean trace)
          Set the specified value to the boolean attribute trace.
 void setTraceArea(javax.swing.JTextArea txtArea)
           
protected  java.lang.String toString(java.lang.Object ontNode)
          It returns a String representation of the content of a CS ontNode regardless its type (Type, Situation, Context or Individual).
 java.lang.String toStringResultOfSimulation()
           
 void trace(java.lang.String message)
          It appends a String message to the area where the trace is displayed.
 void trace(java.lang.String message, java.lang.Object cg)
           
protected  void updateCompareNodesHshMap(CS oldNewOntNode, CS newOntNode)
           
protected  void updatePertinentTypes(AmineList initialConcTypesSet, AmineList currConcTypesSet, AmineList pertinentTypes)
          Update pertinent types list by adding any type in currConcTypesSet that is not contained in initialConcTypesSet nor in pertinentTypes.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEDUCTIVE_INTEGRATION_MODE

public static final byte DEDUCTIVE_INTEGRATION_MODE
See Also:
Constant Field Values

ABDUCTIVE_INTEGRATION_MODE

public static final byte ABDUCTIVE_INTEGRATION_MODE
See Also:
Constant Field Values

ANALOGICAL_INTEGRATION_MODE

public static final byte ANALOGICAL_INTEGRATION_MODE
See Also:
Constant Field Values

ontology

public Ontology ontology
The current ontology used during the integration


lexicon

public Lexicon lexicon
The current lexicon used of the integration.


cgOperations

public CGOperations cgOperations

compareNodesHshMap

java.util.HashMap compareNodesHshMap

focusHshMap

java.util.HashMap focusHshMap

newOntNode

CS newOntNode

classify

boolean classify

simulation

boolean simulation

traceArea

public javax.swing.JTextArea traceArea
This variable is used to know in which JTextArea the trace will be displayed


integratedNodesList

public AmineList integratedNodesList
This ArrayList is used for GUI purposes. Indeed, when the integration is done, the relationships between the new situationDescr and the ontology are created in the memory. In case the integration is called from the dynamicOntologyGUI all the new ontology nodes and links that are created are sent within this array list to display them in the dynamicOntologyGUI


trace

boolean trace
Constructor Detail

IntegrateCS

public IntegrateCS(Ontology ont)
            throws DynamicKnowledgeIntegrationException
This is a minimal specification of IntegrateCS. Create a IntegrateCS task with the specified ont as the ontology where the integration should be processed. lexicon attribute of the class is set to the main Lexicon of the ontology.

Parameters:
ont - The ontology considered for the integration. ont can not be null.
Throws:
DynamicOntologyException - if ont is null.
DynamicKnowledgeIntegrationException

IntegrateCS

public IntegrateCS(Ontology ont,
                   Lexicon lex)
            throws DynamicKnowledgeIntegrationException
Create a IntegrateCS task with the specified ont as the ontology where the integration should be processed and lex as the lexicon to use among the lexicons available in the ontology. If lex is null then the main Lexicon of the ontology is used.

Parameters:
ont - The ontology considered for the integration. ont can not be null.
lex - The lexicon considered for the integration. lex could be null.
Throws:
DynamicOntologyException - if ont is null.
DynamicKnowledgeIntegrationException

IntegrateCS

public IntegrateCS(Ontology ont,
                   Lexicon lex,
                   javax.swing.JTextArea txtArea)
            throws DynamicKnowledgeIntegrationException
Create a IntegrateCS task with the specified ont as the ontology where the integration should be processed, lex as the lexicon to use among the lexicons available in the ontology and txtArea as the Area where the trace of the integration is displayed. If lex is null then the main Lexicon of the ontology is used. If txtArea is null then System.out is used to display the trace.

Parameters:
ont - The ontology considered for the integration. ont can not be null.
lex - The lexicon considered for the integration. lex could be null.
txtArea - The Area where the trace is displayed. txtArea could be null.
Throws:
DynamicOntologyException - if ont is null.
DynamicKnowledgeIntegrationException
Method Detail

finalize

public void finalize()

getIntegrationInferenceMode

public byte getIntegrationInferenceMode()

setIntegrationInferenceMode

public void setIntegrationInferenceMode(byte intInfMode)

getTrace

public boolean getTrace()
Get the value of the boolean attribute trace.

Returns:
true if the attribute trace is true and false otherwise

setTrace

public void setTrace(boolean trace)
Set the specified value to the boolean attribute trace.

Parameters:
trace -

setTraceArea

public void setTraceArea(javax.swing.JTextArea txtArea)

trace

public void trace(java.lang.String message)
It appends a String message to the area where the trace is displayed. The message informs about a given step of the integration.

Parameters:
message - a String that is sent to the trace Area.

trace

public void trace(java.lang.String message,
                  java.lang.Object cg)
           throws java.lang.Exception
Throws:
java.lang.Exception

toString

protected java.lang.String toString(java.lang.Object ontNode)
                             throws java.lang.Exception
It returns a String representation of the content of a CS ontNode regardless its type (Type, Situation, Context or Individual). If it is a type or individual, the String returned reprensents the name available in the current lexicon. If it is situation or a context, the String represents its linear form LF description. If ontNode is null, an "ERROR" String is returned. This methode is mainly used with the trace() method.

Parameters:
ontNode - a CS
Returns:
a String representing the content of ontNode
Throws:
java.lang.Exception - if an error occurs during the textualization of the content of the CS

guiTrace

public void guiTrace(CS newOntNode)
In case the integration is called from the dynamicOntologyGUI, currNewOntNode is added to the integratedNodesList to allow the OntologyGUI to add it and display it in Ontology Panel.


saveLog

public void saveLog()
Save the trace of a dynamic integration if the file dynamicOntologyLog.txt which is stored at the same directory as the current ontology.


enum2ArrayList

protected java.util.ArrayList enum2ArrayList(java.util.Enumeration enum)
It returns an AmineList containing objects that are contained in an Enumeration enum.

Parameters:
enum - a Enumeration
Returns:
an AmineList containing objects that are contained in an Enumeration enum.

getResultOfSimulation

public AmineList getResultOfSimulation()

toStringResultOfSimulation

public java.lang.String toStringResultOfSimulation()

classify

public IntegrationResult classify(java.lang.Object newDescr)
                           throws java.lang.Exception
Basic public and member methods of IntegrateCS

Throws:
java.lang.Exception

classify

public IntegrationResult classify(java.lang.Object newDescr,
                                  AmineList pertinentTypes)
                           throws java.lang.Exception
Parameters:
newDescr - Object
pertinentTypes - AmineList
Returns:
IntegrationResult
Throws:
java.lang.Exception

classify

public IntegrationResult classify(java.lang.Object newDescr,
                                  AmineList pertinentTypes,
                                  AmineList superTypesPertinentTypes)
                           throws java.lang.Exception
Throws:
java.lang.Exception

generalize

public IntegrationResult generalize(java.lang.Object newDescr)
                             throws java.lang.Exception
Throws:
java.lang.Exception

generalize

public IntegrationResult generalize(java.lang.Object newDescr,
                                    AmineList pertinentTypes)
                             throws java.lang.Exception
Throws:
java.lang.Exception

generalize

public IntegrationResult generalize(java.lang.Object newDescr,
                                    AmineList pertinentTypes,
                                    AmineList superTypesPertinentTypes)
                             throws java.lang.Exception
Throws:
java.lang.Exception

ask

public IntegrationResult ask(java.lang.Object newDescr)
                      throws java.lang.Exception
Throws:
java.lang.Exception

ask

public IntegrationResult ask(java.lang.Object newDescr,
                             AmineList pertinentTypes)
                      throws java.lang.Exception
Throws:
java.lang.Exception

ask

public IntegrationResult ask(java.lang.Object newDescr,
                             AmineList pertinentTypes,
                             AmineList superTypesPertinentTypes)
                      throws java.lang.Exception
Throws:
java.lang.Exception

classify

public static IntegrationResult classify(Ontology ontology,
                                         java.lang.Object situationDescr,
                                         AmineList pertinentTypes)
Parameters:
ontology - Ontology
situationDescr - Object
pertinentTypes - AmineList
Returns:
IntegrationResult

classify

public static IntegrationResult classify(Ontology ontology,
                                         java.lang.Object newDescr)

generalize

public static IntegrationResult generalize(Ontology ontology,
                                           java.lang.Object newDescr,
                                           AmineList pertinentTypes)

generalize

public static IntegrationResult generalize(Ontology ontology,
                                           java.lang.Object newDescr)

ask

public static IntegrationResult ask(Ontology ontology,
                                    java.lang.Object newDescr,
                                    AmineList pertinentTypes)

ask

public static IntegrationResult ask(Ontology ontology,
                                    java.lang.Object newDescr)

createIntegrateCS

protected static IntegrateCS createIntegrateCS(Ontology ontology,
                                               Lexicon lexicon)
                                        throws DynamicKnowledgeIntegrationException
Throws:
DynamicKnowledgeIntegrationException

getConceptTypes

protected abstract AmineList getConceptTypes(java.lang.Object newDescr)
End of Static Methods


isEmpty

protected abstract boolean isEmpty(java.lang.Object newDescr)

newCS

protected abstract CS newCS(java.lang.Object newDescr)

findConceptsWithType

protected abstract java.util.Enumeration findConceptsWithType(java.lang.Object newDescr,
                                                              CS pertinentType)

getConcepts

protected abstract java.util.Enumeration getConcepts(java.lang.Object newDescr)

sameTypeOfCS

protected abstract boolean sameTypeOfCS(CS newOntNode,
                                        CS currentOntNode)

identicalTypeOfCS

protected abstract boolean identicalTypeOfCS(CS newOntNode,
                                             CS currentOntNode)

setContentOf

protected abstract void setContentOf(CS newOntNode,
                                     CS currentOntNode)

integrateCS

public IntegrationResult integrateCS(java.lang.Object newDescr,
                                     AmineList pertinentTypes,
                                     AmineList superTypesPertinentTypes,
                                     boolean classify)
                              throws java.lang.Exception
Parameters:
newDescr - Object
pertinentTypes - AmineList
superTypesPertinentTypes - AmineList
classify - boolean
Returns:
IntegrationResult
Throws:
java.lang.Exception

propagateNewNodeViaFocus

protected void propagateNewNodeViaFocus()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

propagateFromOneFocus

protected void propagateFromOneFocus(CS oneFocus,
                                     AmineList oneEntryPointList)
                              throws java.lang.Exception
Throws:
java.lang.Exception

compareAndProceed

protected boolean compareAndProceed(Concept entryPoint,
                                    CS currentOntNode,
                                    CS fatherOntNode,
                                    boolean realComparison)
                             throws java.lang.Exception
method for comparing and propagating a new newDescr from a node

Parameters:
entryPoint - a Concept contained in the newDescr to integrate. Comparison will take entryPoint as an entry point for newDescr.
currentOntNode - a CS corresponding to the CS that the new newDescr is currently compared with
fatherOntNode - a CS corresponding to the father in the ontology of the currentOntNode
realComparison - a Boolean that specifies if the integration via currentOntNode is effective or not. This parameter is important for Individual node especially.
Returns:
a boolean: true if newDescr of newOntNode have been comparable with newDescr of currentOntNode.
Throws:
java.lang.Exception

firstCompareAndProceed

protected boolean firstCompareAndProceed(Concept entryPoint,
                                         CS currentOntNode,
                                         CS fatherOntNode,
                                         boolean realComparison)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

proceed

protected boolean proceed(Concept entryPoint,
                          CS currentOntNode,
                          CS fatherOntNode,
                          boolean realComparison,
                          CompareCGResult compareCGResult)
                   throws java.lang.Exception
method for proceeding on the real update of the memory

Parameters:
entryPoint - A Concept that represents an Entry Point in the newDescr to integrate.
currentOntNode - a CS corresponding to the CS that the new newDescr is currently proccessed with
fatherOntNode - a CS corresponding to the father in the ontology of the currentOntNode
realComparison - a boolean indicating if we can integrate from the current node or from its father
compareCGResult - a CompareCGResults containing the result of the comparison between the current ontology node and the new newDescr
Throws:
java.lang.Exception

compare

protected CompareCGResult compare(CS newOntNode,
                                  Concept entryPoint,
                                  CS currentOntNode,
                                  CS fatherOntNode)
                           throws java.lang.Exception
compares the new newDescr to classify with a current newDescr using entryPoint as the entry point for the comparison.

Parameters:
entryPoint - a Concept to consider as the entry point for the comparison
currentOntNode - a CS which is the newDescr to compare with
fatherOntNode - a CS which the father ontology node of currentOntNode
Returns:
a CompareCGResults containing the CG as the content of the comparison and a byte representing the type of relationship between the two descriptions to compare
Throws:
java.lang.Exception

compareCG

protected CompareCGResult compareCG(CS newOntNode,
                                    Concept entryPoint,
                                    CS currentOntNode,
                                    CS fatherOntNode)
                             throws java.lang.Exception
protected CompareCGResults compareCG(CG newDescr, CG currentCG) throws Exception { CompareCGResults compareCGResult = new CompareCGResults(); if (currentCG == null) { trace("*** The current node has no content; the comparison is considered as UNCOMPARABLE. "); compareCGResult.setCommonCG(null); compareCGResult.setCompareResult(UNCOMPARABLE); return compareCGResult; } if (newDescr.equal(currentCG)) { compareCGResult.setCompareResult(EQUAL); } else if (currentCG.subsume(newDescr)) { // currentCG is more general than newDescr // newDescr is more specific than currentCG compareCGResult.setCompareResult(MORE_SPECIFIC); // check if it is interpreted correctly } else if (newDescr.subsume(currentCG)) { // newDescr is more general than currentCG compareCGResult.setCompareResult(MORE_GENERAL); // check if it is interpreted correctly } else { compareCGResult.setCompareResult(UNCOMPARABLE); // consider as uncomparable } return compareCGResult; } // end of compareCG method

Throws:
java.lang.Exception

printFocusHashMap

protected void printFocusHashMap()
                          throws java.lang.Exception
Throws:
java.lang.Exception

updatePertinentTypes

protected void updatePertinentTypes(AmineList initialConcTypesSet,
                                    AmineList currConcTypesSet,
                                    AmineList pertinentTypes)
Update pertinent types list by adding any type in currConcTypesSet that is not contained in initialConcTypesSet nor in pertinentTypes. This method is used by elicitate method.

Parameters:
initialConcTypesSet - AmineList
currConcTypesSet - AmineList
pertinentTypes - AmineList
Since:
20/01/06

children

protected java.util.ArrayList children(CS ontologyNode)
returns an ArrayList of all the children of an Ontology Node except those that are Individual

Parameters:
ontologyNode - an CS for which we look for the children that are not of type Individual
Returns:
an ArrayList representing all the children of ontologyNode except those that are Individual

updateCompareNodesHshMap

protected void updateCompareNodesHshMap(CS oldNewOntNode,
                                        CS newOntNode)

getCompareNodesResult

protected CompareNodesResult getCompareNodesResult(java.util.ArrayList compareCurrentNodeList,
                                                   Concept entryPoint)
Auxiliary Methods used by Dynamic Integration Process


getContent

protected CG getContent(CS node)