aminePlatform.engines.dynamicKnowledgeIntegration
Class DynamicKnowledgeIntegration

java.lang.Object
  extended byaminePlatform.engines.dynamicKnowledgeIntegration.DynamicKnowledgeIntegration
All Implemented Interfaces:
AmineConstants
Direct Known Subclasses:
IndepthDynamicKnowledgeIntegration

public class DynamicKnowledgeIntegration
extends java.lang.Object
implements AmineConstants


Nested Class Summary
(package private)  class DynamicKnowledgeIntegration.CSWrapper
           
 
Field Summary
(package private)  java.util.Stack actions
           
 CGOperations cgOperations
           
(package private)  java.util.HashMap corefContextHmp
           
protected  boolean doContraction
           
protected  boolean doElicitation
           
 AmineList integratedNodesList
          This ArrayList is used for GUI purposes.
 Lexicon lexicon
          The current lexicon used of the integration.
(package private) static java.lang.String LINK
           
(package private) static java.lang.String NEW
           
 Ontology ontology
          The current ontology used of the integration
(package private) static java.lang.String REMOVE_LINK
           
(package private)  boolean trace
           
 javax.swing.JTextArea traceArea
          This variable is used to know in which JTextArea the trace will be displayed
(package private)  java.util.ArrayList typeEntryPoints
           
(package private)  java.util.ArrayList typeFocus
           
 
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
DynamicKnowledgeIntegration(Ontology ont)
          This is a minimal specification of a dynamic ontology.
DynamicKnowledgeIntegration(Ontology ont, Lexicon lex)
          Create a dynamic ontology 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.
DynamicKnowledgeIntegration(Ontology ont, Lexicon lex, javax.swing.JTextArea txtArea)
          Create a dynamic ontology 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
static AmineList ask(Ontology ontology, CG description, AmineList pertinentTypes)
          ask is a static method that implements information retrieval operation: ask if the specified description exists in the specified ontology, using the specified pertinent types. ask corresponds to the method classify.
(package private)  java.util.ArrayList children(CS ontologyNode)
          returns an ArrayList of all the children of an Ontology Node except those that are Individual
static AmineList classify(Ontology ontology, CG description, AmineList pertinentTypes)
          classify is a static method that classify the new information without adding it to the ontology.
static IntegrationResult classifyDefinition(Ontology ontology, Identifier idType, CG description, AmineList pertinentTypes)
          Add the definition to the specified ontology according to its classification.
static IntegrationResult classifySituation(Ontology ontology, CG description, AmineList pertinentTypes)
          Add the situation to the specified ontology according to its classification.
(package private)  boolean compareAndProceed(DynamicKnowledgeIntegration.CSWrapper newOntNodeWrapper, Concept entryPoint, CS currentOntNode, CS fatherOntNode, boolean realComparison, boolean simulation, java.util.HashMap compareNodesHshMap, java.util.ArrayList contextsToIntegrate, CG mainContext, Type typeIndex, AmineList typeIndexes)
          method for comparing and propagating a new description from a node
 CompareCGResult compareCG(CG newCG, Concept entryPoint, CG currentCG, CS fatherOntNode)
           
(package private)  void compression(Type type, java.util.ArrayList childrenList)
          Perform compression of the description of CSs specified in childrenList as well as compression of their descendants.
(package private)  boolean containsContext(CG cg)
          Check if the specified CG contains a context (i.e. a concept with CG as descriptor or if the descriptor is a Context CS).
(package private)  void containsDef(CG newCG, ContainsDefObject result)
          finds if newCG contains a definition.
(package private)  void doContraction(CS node, java.util.ArrayList typeEntryPoints)
           
(package private)  boolean elicitate(CG newCG, ContainsDefObject result, AmineList pertinentTypes)
          elicitates a description in the current ontology.
 void finalize()
           
(package private)  Type findContractBestDef(Type type, Concept entryConcNewCG, CG newCG)
          This method tries to find and then contract the best definition from the newCG.
(package private)  Type findImdtBestDef(Type type, CG newCG, Concept entryConcNewCG)
          Find the best definition among direct subtypes of type that subsumes newCG.
(package private)  Type findMostSpecSubsumer(Type type, CG newCG, Concept entryConcNewCG)
          Find the best definition among subtypes of type that subsumes newCG.
 boolean getDoContraction()
           
 boolean getDoElicitation()
           
 AmineList getResultOfSimulation()
          Get the AmineList of all the links that would be created if a new Situation is integrated in the ontology.
 boolean getTrace()
          Get the value of the boolean attribute trace.
(package private)  boolean hybridSimulation()
           
(package private)  void integrateContexts1(CG newCG, CG mainContext, java.util.ArrayList contextsToIntegrate, CG cg, AmineList pertinentTypes, AmineList superTypesPertinentTypes, java.util.HashMap focusHshMap, java.util.HashMap compareNodesHshMap, DynamicKnowledgeIntegration.CSWrapper newOntNodeWrapper, boolean simulation)
           
static IntegrationResult integrateDefinition(Ontology ontology, Identifier idType, CG description, AmineList pertinentTypes)
          Integrate, in the specified ontology, the specified description of the definition of the specified type identifier, according to the specified pertinent types.
 IntegrationResult integrateDefOrSitOrCtxt(java.lang.Object obj, CG newCG, byte nodeType, AmineList pertinentTypes, AmineList superTypesPertinentTypes, boolean simulation, java.util.ArrayList contextsToIntegrate, CG mainContext)
          integrates the newCG in the current ontology using a list of focus userFocusHshMap.
 IntegrationResult integrateDefOrSituation(Identifier ident, CG newCG, byte nodeType, AmineList pertinentTypes)
          integrates the newCG in the current ontology using a list of focus userFocusHshMap.
 IntegrationResult integrateDefOrSituation(Identifier ident, CG newCG, byte nodeType, AmineList pertinentTypes, AmineList superTypesPertinentTypes)
          integrates the newCG in the current ontology using a list of focus userFocusHshMap.
 void integrateIndividual(Identifier type, Identifier individual)
          Integration of an individual declaration; individual is an individual of type.
 void integrateIndividual(Identifier type, Identifier individual, CG newCG)
          Integration of an individual declaration; individual is an individual of type.
 void integrateIndividual(java.lang.String typeString, java.lang.String individualString)
          Integration of an individual declaration; individualString is an individual of typeString.
 void integrateIndividual(java.lang.String typeString, java.lang.String individualString, CG newCG)
          Integration of an individual declaration; individualString is an individual of typeString.
 void integrateIndividual(java.lang.String typeString, java.lang.String individualString, java.lang.String newCGString)
          Integration of an individual declaration; individualString is an individual of typeString.
 IntegrationResult integrateMetaphor(CG descr, Concept focus)
          Treatment of Metaphor: TO BE DONE - If the new description is to integrate as a description of a metaphor, then only one focus should be given: it refeers to the kernel of the metaphor (the concept that is the source of the metaphor).
static IntegrationResult integrateSituation(Ontology ontology, CG description, AmineList pertinentTypes)
          Integrate in the specified ontology the specified description of a situation, according to the specified pertinent types.
static boolean integrateSitWthNewType(Ontology ontology, CG description, Type newType, Type action)
          Integrate a new situation that contains a new type newType which is a new action.
 void integrateSynonym(Identifier ident1, Identifier ident2)
          Integration of a synonym declaration; ident2 is synonym of ident1. ident2 is added to the list of the synonyms of ident1 (if it isn't already there).
 void integrateSynonym(java.lang.String identString1, java.lang.String identString2)
          Integration of a synonym declaration; identString2 is synonym of identString1. identString2 is added to the list of the synonyms of identString1 (if it isn't already there).
 void integrateTypeSubType(Identifier type, Identifier subType)
          Integration of a type declaration; subType is subtype of type
 void integrateTypeSubType(java.lang.String typeString, java.lang.String subTypeString)
          Integration of a type declaration; subTypeString is subtype of typeString.
static boolean integrateUpdateSit4Type(Ontology ontology, CG description, Type newType, Type action)
          Integrate a new situation (description) for the new type newType.
(package private)  void link(CS cs1, CS cs2)
           
(package private)  boolean newCompareAndProceed(DynamicKnowledgeIntegration.CSWrapper newOntNodeWrapper, Concept entryPoint, CS currentOntNode, CS fatherOntNode, boolean realComparison, boolean simulation, java.util.HashMap compareNodesHshMap, java.util.ArrayList contextsToIntegrate, CG mainContext, Type typeIndex, AmineList typeIndexes)
           
(package private)  void newNode(CS cs1)
           
(package private)  void printFocusHashMap(java.util.HashMap focusHshMap)
           
(package private)  void proceed(DynamicKnowledgeIntegration.CSWrapper newOntNodeWrapper, Concept entryPoint, CS currentOntNode, CS fatherOntNode, boolean realComparison, CompareCGResult compareCGResults, boolean simulation, java.util.HashMap compareNodesHshMap, java.util.ArrayList contextsToIntegrate, CG mainContext, Type typeIndex, AmineList typeIndexes)
          method for proceeding on the real update of the memory
(package private)  void propagateFromOneFocus(CS oneFocus, AmineList oneEntryPointList, DynamicKnowledgeIntegration.CSWrapper newOntNodeWrapper, boolean simulation, java.util.HashMap compareNodesHshMap, java.util.ArrayList contextsToIntegrate, CG mainContext)
           
(package private)  void propagateNewNodeViaFocus(java.util.HashMap focusHshMap, DynamicKnowledgeIntegration.CSWrapper newOntNodeWrapper, boolean simulation, java.util.HashMap compareNodesHshMap, java.util.ArrayList contextsToIntegrate, CG mainContext)
           
(package private)  boolean removeLink(CS cs1, CS cs2)
           
 void setDoContraction(boolean contract)
           
 void setDoElicitation(boolean elicitate)
           
 void setTrace(boolean trace)
          Set the specified value to the boolean attribute trace.
 void setTraceArea(javax.swing.JTextArea txtArea)
           
 IntegrationResult simulateIntegration(CG newCG, AmineList pertinentTypes)
          simulates the integration of newCG in the current ontology using a list of focus userFocusHshMap.
 IntegrationResult simulateIntegration(CG newCG, AmineList pertinentTypes, AmineList superTypesPertinentTypes)
          simulates the integration of newCG in the current ontology using a list of focus userFocusHshMap.
(package private)  void trace(java.lang.String message)
          It appends a String message to the area where the trace is displayed.
(package private)  void trace(java.lang.String message, CG cg)
           
(package private)  void trace(java.lang.String message, CS cs)
           
(package private)  void undo()
           
(package private)  void updateCompareNodesHshMap(java.util.HashMap compareNodesHshMap, CS oldNewOntNode, CS newOntNode)
           
(package private)  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

ontology

public Ontology ontology
The current ontology used of the integration


lexicon

public Lexicon lexicon
The current lexicon used of the integration. It is one of the supported lexicons associated with the current ontology


cgOperations

public CGOperations cgOperations

typeEntryPoints

java.util.ArrayList typeEntryPoints

typeFocus

java.util.ArrayList typeFocus

corefContextHmp

java.util.HashMap corefContextHmp

traceArea

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


doElicitation

protected boolean doElicitation

doContraction

protected boolean doContraction

integratedNodesList

public AmineList integratedNodesList
This ArrayList is used for GUI purposes. Indeed, when the integration is done, the relationships between the new description 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

LINK

static java.lang.String LINK

REMOVE_LINK

static java.lang.String REMOVE_LINK

NEW

static java.lang.String NEW

actions

java.util.Stack actions
Constructor Detail

DynamicKnowledgeIntegration

public DynamicKnowledgeIntegration(Ontology ont)
                            throws DynamicKnowledgeIntegrationException
This is a minimal specification of a dynamic ontology. Create a dynamic ontology 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

DynamicKnowledgeIntegration

public DynamicKnowledgeIntegration(Ontology ont,
                                   Lexicon lex)
                            throws DynamicKnowledgeIntegrationException
Create a dynamic ontology 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

DynamicKnowledgeIntegration

public DynamicKnowledgeIntegration(Ontology ont,
                                   Lexicon lex,
                                   javax.swing.JTextArea txtArea)
                            throws DynamicKnowledgeIntegrationException
Create a dynamic ontology 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

getDoElicitation

public boolean getDoElicitation()

setDoElicitation

public void setDoElicitation(boolean elicitate)

getDoContraction

public boolean getDoContraction()

setDoContraction

public void setDoContraction(boolean contract)

link

void link(CS cs1,
          CS cs2)

removeLink

boolean removeLink(CS cs1,
                   CS cs2)

newNode

void newNode(CS cs1)

undo

void undo()

hybridSimulation

boolean hybridSimulation()

integrateDefinition

public static IntegrationResult integrateDefinition(Ontology ontology,
                                                    Identifier idType,
                                                    CG description,
                                                    AmineList pertinentTypes)
Integrate, in the specified ontology, the specified description of the definition of the specified type identifier, according to the specified pertinent types.

Parameters:
ontology - An Ontology
idType - A Type identifier
description - a CG description
pertinentTypes - An AmineList of pertinent types
Returns:
an IntegrationResult

integrateSituation

public static IntegrationResult integrateSituation(Ontology ontology,
                                                   CG description,
                                                   AmineList pertinentTypes)
Integrate in the specified ontology the specified description of a situation, according to the specified pertinent types.

Parameters:
ontology - An Ontology where the specified situation should be integrated
description - A CG description that should be integrated as a new situation
pertinentTypes - An AmineList of types
Returns:
an IntegrationResult

classifyDefinition

public static IntegrationResult classifyDefinition(Ontology ontology,
                                                   Identifier idType,
                                                   CG description,
                                                   AmineList pertinentTypes)
Add the definition to the specified ontology according to its classification. The method uses a classification algorithm instead of the integration algorithm. Classification does not consider the case of common information between two descriptions and so, does not create common nodes.

Parameters:
ontology - Ontology
description - CG
pertinentTypes - AmineList
Returns:
IntegrationResult
Since:
20/01/06

classifySituation

public static IntegrationResult classifySituation(Ontology ontology,
                                                  CG description,
                                                  AmineList pertinentTypes)
Add the situation to the specified ontology according to its classification. The method uses a classification algorithm instead of the integration algorithm. Classification does not consider the case of common information between two descriptions and so, does not create common nodes.

Parameters:
ontology - Ontology
description - CG
pertinentTypes - AmineList
Returns:
IntegrationResult
Since:
20/01/06

integrateSitWthNewType

public static boolean integrateSitWthNewType(Ontology ontology,
                                             CG description,
                                             Type newType,
                                             Type action)
Integrate a new situation that contains a new type newType which is a new action. The method locates first the more specific action (the more specific subType of Action/Act that subsumes the specified description), then it links the best type located with the new type and then add the new description as a situation for the new type. This method assumes that a Type node (parameter newType) is already created; there is already an entry in the main lexicon for the type, but the type node is related to nothing. Parameter action refeers to the type for Action (or Act) in the ontology.

Parameters:
ontology - Ontology
description - CG Description that contains a new type newType
newType - Type
action - Type that refeers to type Action. newType is assumed to be a subtype of action
Since:
20/01/06

integrateUpdateSit4Type

public static boolean integrateUpdateSit4Type(Ontology ontology,
                                              CG description,
                                              Type newType,
                                              Type action)
Integrate a new situation (description) for the new type newType. The method assumes that the type exists already in the ontology and previous integrations have been done. This new integration may update previous integrations in the following way: 1. Direct super type of new type was induced (and not specified explicitly). So it is an hypothesis that can be contradicted by any new integration (i.e. the current one). 2. Integration of the new situation may lead to some update like any situation integration. First point is implemented as follows: Find the most specific subsumer for the new description. If the localised type is different from the current superType of newType, then we compute the minimal common super type (comSupType), we remove the link that relate superType to newType and we link comSupType to newType.

Parameters:
ontology - Ontology
description - CG
newType - Type
Since:
20/01/06

classify

public static AmineList classify(Ontology ontology,
                                 CG description,
                                 AmineList pertinentTypes)
classify is a static method that classify the new information without adding it to the ontology. Classify has to find fathers (the most specific super nodes -more general- for the new information), children (the most general sub nodes -more specific- than the new information), and nodes that are equal to the new information.

Parameters:
ontology - An Ontology
description - A CG description
pertinentTypes - A List of pertinent types
Returns:
An AmineList that contains possible answers, an element of this list corresponds to a SimulationObject.
Since:
20/01/06

ask

public static AmineList ask(Ontology ontology,
                            CG description,
                            AmineList pertinentTypes)
ask is a static method that implements information retrieval operation: ask if the specified description exists in the specified ontology, using the specified pertinent types. ask corresponds to the method classify.

Parameters:
ontology - An Ontology
description - A CG description
pertinentTypes - A List of pertinent types
Returns:
An AmineList that contains possible answers, an element of this list corresponds to a SimulationObject.
Since:
20/01/06

finalize

public void finalize()

getResultOfSimulation

public AmineList getResultOfSimulation()
Get the AmineList of all the links that would be created if a new Situation is integrated in the ontology. Each element of the AmineList is of type SimulationObject.

Returns:
an AmineList of SimulationObject; Each SimulationObject denotes a link that a new Situation would have with the nodes of the current ontology in case of integration

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

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

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

trace

void trace(java.lang.String message,
           CS cs)
     throws java.lang.Exception
Throws:
java.lang.Exception

integrateTypeSubType

public void integrateTypeSubType(Identifier type,
                                 Identifier subType)
Integration of a type declaration; subType is subtype of type

Parameters:
type - an Identifier to which subType is linked as a subtype
subType - an Identifier to which type is linked as a supertype

integrateTypeSubType

public void integrateTypeSubType(java.lang.String typeString,
                                 java.lang.String subTypeString)
Integration of a type declaration; subTypeString is subtype of typeString. New Identifiers are added in the lexicon for both Strings and the identifiers are linked as a type-subtype link.

Parameters:
typeString - a String to which subTypeString is linked as a subtype
subTypeString - a String to which typeString is linked as a supertype

integrateSynonym

public void integrateSynonym(Identifier ident1,
                             Identifier ident2)
Integration of a synonym declaration; ident2 is synonym of ident1. ident2 is added to the list of the synonyms of ident1 (if it isn't already there).

Parameters:
ident1 - an Identifier to which we add ident2 as a synonym
ident2 - an Identifier that becomes a synonym of ident1

integrateSynonym

public void integrateSynonym(java.lang.String identString1,
                             java.lang.String identString2)
Integration of a synonym declaration; identString2 is synonym of identString1. identString2 is added to the list of the synonyms of identString1 (if it isn't already there).

Parameters:
identString1 - a String to which we add identString2 as a synonym
identString2 - a String that becomes a synonym of identString1

integrateIndividual

public void integrateIndividual(Identifier type,
                                Identifier individual)
Integration of an individual declaration; individual is an individual of type.

Parameters:
type - an Identifier to which we add an individual
individual - an Identifier that becomes an individual of type

integrateIndividual

public void integrateIndividual(Identifier type,
                                Identifier individual,
                                CG newCG)
Integration of an individual declaration; individual is an individual of type. If newCG is not null, it is set as the description of individual.

Parameters:
type - an Identifier to which we add an individual
individual - an Identifier that becomes an individual of type
newCG - a CG that is set as the description of individual. newCG could be null.

integrateIndividual

public void integrateIndividual(java.lang.String typeString,
                                java.lang.String individualString,
                                java.lang.String newCGString)
                         throws java.lang.Exception
Integration of an individual declaration; individualString is an individual of typeString. If newCGString is not null and not empty, it is set as the description of individualString.

Parameters:
typeString - a String to which we add an individual
individualString - a String that becomes an individual of typeString
newCGString - a String that represents the content of the CG that is set as the description of individualString. newCGString could be null.
Throws:
java.lang.Exception - if an error occurs during the parsing of newCGString

integrateIndividual

public void integrateIndividual(java.lang.String typeString,
                                java.lang.String individualString)
                         throws java.lang.Exception
Integration of an individual declaration; individualString is an individual of typeString.

Parameters:
typeString - a String to which we add an individual
individualString - a String that becomes an individual of typeString
Throws:
java.lang.Exception - if an error occurs during the parsing

integrateIndividual

public void integrateIndividual(java.lang.String typeString,
                                java.lang.String individualString,
                                CG newCG)
                         throws java.lang.Exception
Integration of an individual declaration; individualString is an individual of typeString. If newCG is not null, it is set as the description of individualString.

Parameters:
typeString - a String to which we add an individual
individualString - a String that becomes an individual of typeString
newCG - a CG that is set as the description of individualString. newCG could be null.
Throws:
java.lang.Exception - if an error occurs during the parsing of newCG

simulateIntegration

public IntegrationResult simulateIntegration(CG newCG,
                                             AmineList pertinentTypes)
                                      throws java.lang.Exception
simulates the integration of newCG in the current ontology using a list of focus userFocusHshMap. Each element of the userFocusHshMap is of type Concept. it returns a byte denoting the result of the integration: FALSE_FOCUS_LIST, NOTHING_TO_INTEGRATE, INTEGRATED (see integrateDefOrSituation for more details). The consequence of the simulation is that the AmineList resultOfSimulation is populated with links that newCG would have with the nodes of the current ontology if it was actually integrated. The resultOfSimulation AmineList could be got using the method getResultOfSimulation().

Parameters:
newCG - the new description for which the simulation is done
pertinentTypes - An AmineList of pertinent types
Returns:
An IntegrationResult : the result of the integration, a byte value and the new ontology node created for newCG
Throws:
java.lang.Exception

simulateIntegration

public IntegrationResult simulateIntegration(CG newCG,
                                             AmineList pertinentTypes,
                                             AmineList superTypesPertinentTypes)
                                      throws java.lang.Exception
simulates the integration of newCG in the current ontology using a list of focus userFocusHshMap. Each element of the userFocusHshMap is of type Concept. it returns a byte denoting the result of the integration: FALSE_FOCUS_LIST, NOTHING_TO_INTEGRATE, INTEGRATED (see integrateDefOrSituation for more details). The consequence of the simulation is that the AmineList resultOfSimulation is populated with links that newCG would have with the nodes of the current ontology if it was actually integrated. The resultOfSimulation AmineList could be got using the method getResultOfSimulation().

Parameters:
newCG - the new description for which the simulation is done
pertinentTypes - An AmineList of pertinent types
superTypesPertinentTypes - An AmineList of superTypes of some pertinent types, that are considered also as pertinent types
Returns:
An IntegrationResult : the result of the integration, a byte value and the new ontology node created for newCG
Throws:
java.lang.Exception

integrateMetaphor

public IntegrationResult integrateMetaphor(CG descr,
                                           Concept focus)
                                    throws java.lang.Exception
Treatment of Metaphor: TO BE DONE - If the new description is to integrate as a description of a metaphor, then only one focus should be given: it refeers to the kernel of the metaphor (the concept that is the source of the metaphor). From the focus, we can determine the sourceType and the metaphoricalObject. - A Metaphor can be compared with only other metaphors - If two metaphors have a common information that share the kernel of the metaphor, then a new metaphor node (not a situation) will be created for this generalization. otherwise, no other generalization will be considered for metaphor. - The target type for the new metaphor, created for the new description or by a generalization of two metaphors, will be the target type of the metaphor to which it is the more_specific, or it is more_general, or equal, or has a common information. - If no metaphor under the focus type is comparable to the new description, then the resolution of the metaphor is initiated in order to determine the targetType. If a targetType is found, then a new metaphor is created under the focus type (as a child of focus type), otherwise the description is not integrated (it violates canon and it can not be interpreted as a metaphor).

Parameters:
descr - A CG that corresponds to the description of the metaphor to integrate
focus - A Concept, contained in descr and that corresponds to the kernel of the metaphor (if it can be so).
Returns:
An IntegrationResult : the result of the integration, a byte value and the new ontology node created for newCG
Throws:
java.lang.Exception
Since:
20/01/06

integrateDefOrSituation

public IntegrationResult integrateDefOrSituation(Identifier ident,
                                                 CG newCG,
                                                 byte nodeType,
                                                 AmineList pertinentTypes)
                                          throws java.lang.Exception
integrates the newCG in the current ontology using a list of focus userFocusHshMap. it returns a byte denoting the result of the integration: FALSE_FOCUS_LIST, NOTHING_TO_INTEGRATE, INTEGRATED. The consequence of the integration is the newCG is linked with the nodes of the current ontology and other Ontology nodes could also be created and integrated with other nodes.

Parameters:
ident - an Identifier to relate with the new description
newCG - reprensenting the new description to integrate
nodeType - a byte representing the type of the node to create with content newCG (CANON, DEFINITION, SITUATION, INDIVIDUAL)
pertinentTypes - An AmineList of pertinent types
Returns:
An IntegrationResult : the result of the integration, a byte value and the new ontology node created for newCG
Throws:
java.lang.Exception

integrateDefOrSituation

public IntegrationResult integrateDefOrSituation(Identifier ident,
                                                 CG newCG,
                                                 byte nodeType,
                                                 AmineList pertinentTypes,
                                                 AmineList superTypesPertinentTypes)
                                          throws java.lang.Exception
integrates the newCG in the current ontology using a list of focus userFocusHshMap. it returns a byte denoting the result of the integration: FALSE_FOCUS_LIST, NOTHING_TO_INTEGRATE, INTEGRATED. The consequence of the integration is the newCG is linked with the nodes of the current ontology and other Ontology nodes could also be created and integrated with other nodes.

Parameters:
ident - an Identifier to relate with the new description
newCG - reprensenting the new description to integrate
nodeType - a byte representing the type of the node to create with content newCG (CANON, DEFINITION, SITUATION, INDIVIDUAL)
pertinentTypes - An AmineList of pertinent types
superTypesPertinentTypes - An AmineList of superTypes of some pertinent types, that are considered also as pertinent types
Returns:
An IntegrationResult : the result of the integration, a byte value and the new ontology node created for newCG
Throws:
java.lang.Exception

integrateDefOrSitOrCtxt

public IntegrationResult integrateDefOrSitOrCtxt(java.lang.Object obj,
                                                 CG newCG,
                                                 byte nodeType,
                                                 AmineList pertinentTypes,
                                                 AmineList superTypesPertinentTypes,
                                                 boolean simulation,
                                                 java.util.ArrayList contextsToIntegrate,
                                                 CG mainContext)
                                          throws java.lang.Exception
integrates the newCG in the current ontology using a list of focus userFocusHshMap. it returns a byte denoting the result of the integration: FALSE_FOCUS_LIST, NOTHING_TO_INTEGRATE, INTEGRATED. The consequence of the integration is the newCG is linked with the nodes of the current ontology and other Ontology nodes could also be created and integrated with other nodes.

Parameters:
newCG - reprensenting the new description to integrate
nodeType - a byte representing the type of the node to create with content newCG (CANON, DEFINITION, SITUATION, CONTEXT, INDIVIDUAL)
simulation - a boolean to let the engine know if the newCG is to be actually integrated (if simulation is set to false) or just simulate the integration (if simulation is set to true)
Returns:
An IntegrationResult : the result of the integration, a byte value and the new ontology node created for newCG
Throws:
java.lang.Exception

printFocusHashMap

void printFocusHashMap(java.util.HashMap focusHshMap)
                 throws java.lang.Exception
Throws:
java.lang.Exception

propagateNewNodeViaFocus

void propagateNewNodeViaFocus(java.util.HashMap focusHshMap,
                              DynamicKnowledgeIntegration.CSWrapper newOntNodeWrapper,
                              boolean simulation,
                              java.util.HashMap compareNodesHshMap,
                              java.util.ArrayList contextsToIntegrate,
                              CG mainContext)
                        throws java.lang.Exception
Throws:
java.lang.Exception

propagateFromOneFocus

void propagateFromOneFocus(CS oneFocus,
                           AmineList oneEntryPointList,
                           DynamicKnowledgeIntegration.CSWrapper newOntNodeWrapper,
                           boolean simulation,
                           java.util.HashMap compareNodesHshMap,
                           java.util.ArrayList contextsToIntegrate,
                           CG mainContext)
                     throws java.lang.Exception
Throws:
java.lang.Exception

integrateContexts1

void integrateContexts1(CG newCG,
                        CG mainContext,
                        java.util.ArrayList contextsToIntegrate,
                        CG cg,
                        AmineList pertinentTypes,
                        AmineList superTypesPertinentTypes,
                        java.util.HashMap focusHshMap,
                        java.util.HashMap compareNodesHshMap,
                        DynamicKnowledgeIntegration.CSWrapper newOntNodeWrapper,
                        boolean simulation)
                  throws java.lang.Exception
Throws:
java.lang.Exception

containsContext

boolean containsContext(CG cg)
Check if the specified CG contains a context (i.e. a concept with CG as descriptor or if the descriptor is a Context CS).

Parameters:
cg -
Returns:

compareAndProceed

boolean compareAndProceed(DynamicKnowledgeIntegration.CSWrapper newOntNodeWrapper,
                          Concept entryPoint,
                          CS currentOntNode,
                          CS fatherOntNode,
                          boolean realComparison,
                          boolean simulation,
                          java.util.HashMap compareNodesHshMap,
                          java.util.ArrayList contextsToIntegrate,
                          CG mainContext,
                          Type typeIndex,
                          AmineList typeIndexes)
                    throws java.lang.Exception
method for comparing and propagating a new description from a node

Parameters:
entryPoint - a Concept contained in the newCG to integrate. Comparison will take entryPoint as an entry point for newCG.
currentOntNode - a CS corresponding to the CS that the new description 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.
simulation - a boolean denoting if the integration is done for simulation purposes or not
compareNodesHshMap - A HashMap that will contains the result of the integration of newOntNode
Returns:
a boolean: true if newCG of newOntNode have been comparable with description of currentOntNode.
Throws:
java.lang.Exception

newCompareAndProceed

boolean newCompareAndProceed(DynamicKnowledgeIntegration.CSWrapper newOntNodeWrapper,
                             Concept entryPoint,
                             CS currentOntNode,
                             CS fatherOntNode,
                             boolean realComparison,
                             boolean simulation,
                             java.util.HashMap compareNodesHshMap,
                             java.util.ArrayList contextsToIntegrate,
                             CG mainContext,
                             Type typeIndex,
                             AmineList typeIndexes)
                       throws java.lang.Exception
Throws:
java.lang.Exception

proceed

void proceed(DynamicKnowledgeIntegration.CSWrapper newOntNodeWrapper,
             Concept entryPoint,
             CS currentOntNode,
             CS fatherOntNode,
             boolean realComparison,
             CompareCGResult compareCGResults,
             boolean simulation,
             java.util.HashMap compareNodesHshMap,
             java.util.ArrayList contextsToIntegrate,
             CG mainContext,
             Type typeIndex,
             AmineList typeIndexes)
       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 newCG to integrate.
currentOntNode - a CS corresponding to the CS that the new description 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
compareCGResults - a CompareCGResults containing the result of the comparison between the current ontology node and the new description
simulation - a boolean denoting if the integration is done for simulation purposes or not
compareNodesHshMap - A HashMap that will contains the result of the integration of newOntNode
Throws:
java.lang.Exception

updateCompareNodesHshMap

void updateCompareNodesHshMap(java.util.HashMap compareNodesHshMap,
                              CS oldNewOntNode,
                              CS newOntNode)

compareCG

public CompareCGResult compareCG(CG newCG,
                                 Concept entryPoint,
                                 CG currentCG,
                                 CS fatherOntNode)
                          throws java.lang.Exception
Throws:
java.lang.Exception

elicitate

boolean elicitate(CG newCG,
                  ContainsDefObject result,
                  AmineList pertinentTypes)
            throws java.lang.Exception
elicitates a description in the current ontology. Elicitation is an iterative process that looks for Type definitions in a given description.

Parameters:
newCG - a CG description to elicitate
result - where is stored the result of the elicitation
Returns:
true if after the elicitation, the newCG corresponds exactly to a definition of a known type.
Throws:
java.lang.Exception

containsDef

void containsDef(CG newCG,
                 ContainsDefObject result)
           throws java.lang.Exception
finds if newCG contains a definition. In case it is found, result is updated with the definition found.

Parameters:
newCG - a CG description
result - where is stored the result of the update
Throws:
java.lang.Exception

findContractBestDef

Type findContractBestDef(Type type,
                         Concept entryConcNewCG,
                         CG newCG)
                   throws java.lang.Exception
This method tries to find and then contract the best definition from the newCG. The method searchs first the best definition: the definition with the maximum number of relations that subsumes that can be contracted from the newCG.

Parameters:
newCG - CG
Returns:
Type
Throws:
java.lang.Exception
Since:
20/01/06

findImdtBestDef

Type findImdtBestDef(Type type,
                     CG newCG,
                     Concept entryConcNewCG)
Find the best definition among direct subtypes of type that subsumes newCG. The best means the most specific; the definition with the maximum number of relations that subsume newCG.

Parameters:
type - Type
newCG - CG
entryConcNewCG - Concept
Returns:
Type Type returned associated to the best definition
Since:
20/01/06

updatePertinentTypes

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

findMostSpecSubsumer

Type findMostSpecSubsumer(Type type,
                          CG newCG,
                          Concept entryConcNewCG)
Find the best definition among subtypes of type that subsumes newCG. The best means the most specific; the definition with the maximum number of relations that subsume newCG.

Parameters:
type - Type
newCG - CG
entryConcNewCG - Concept
Returns:
Type Type returned associated to the best definition
Since:
20/01/06

compression

void compression(Type type,
                 java.util.ArrayList childrenList)
           throws java.lang.Exception
Perform compression of the description of CSs specified in childrenList as well as compression of their descendants. Compression is based on contraction operation.

Parameters:
type -
childrenList -
Throws:
java.lang.Exception

children

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

doContraction

void doContraction(CS node,
                   java.util.ArrayList typeEntryPoints)
             throws java.lang.Exception
Throws:
java.lang.Exception