|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectaminePlatform.engines.dynamicKnowledgeIntegration.IntegrateCS
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 |
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 |
public static final byte DEDUCTIVE_INTEGRATION_MODE
public static final byte ABDUCTIVE_INTEGRATION_MODE
public static final byte ANALOGICAL_INTEGRATION_MODE
public Ontology ontology
public Lexicon lexicon
public CGOperations cgOperations
java.util.HashMap compareNodesHshMap
java.util.HashMap focusHshMap
CS newOntNode
boolean classify
boolean simulation
public javax.swing.JTextArea traceArea
public AmineList integratedNodesList
boolean trace
Constructor Detail |
public IntegrateCS(Ontology ont) throws DynamicKnowledgeIntegrationException
ont
- The ontology considered for the integration. ont can not be null.
DynamicOntologyException
- if ont is null.
DynamicKnowledgeIntegrationException
public IntegrateCS(Ontology ont, Lexicon lex) throws DynamicKnowledgeIntegrationException
ont
- The ontology considered for the integration. ont can not be null.lex
- The lexicon considered for the integration. lex could be null.
DynamicOntologyException
- if ont is null.
DynamicKnowledgeIntegrationException
public IntegrateCS(Ontology ont, Lexicon lex, javax.swing.JTextArea txtArea) throws DynamicKnowledgeIntegrationException
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.
DynamicOntologyException
- if ont is null.
DynamicKnowledgeIntegrationException
Method Detail |
public void finalize()
public byte getIntegrationInferenceMode()
public void setIntegrationInferenceMode(byte intInfMode)
public boolean getTrace()
public void setTrace(boolean trace)
trace
- public void setTraceArea(javax.swing.JTextArea txtArea)
public void trace(java.lang.String message)
message
- a String that is sent to the trace Area.public void trace(java.lang.String message, java.lang.Object cg) throws java.lang.Exception
java.lang.Exception
protected java.lang.String toString(java.lang.Object ontNode) throws java.lang.Exception
ontNode
- a CS
java.lang.Exception
- if an error occurs during the textualization of the content of the CSpublic void guiTrace(CS newOntNode)
public void saveLog()
protected java.util.ArrayList enum2ArrayList(java.util.Enumeration enum)
enum
- a Enumeration
public AmineList getResultOfSimulation()
public java.lang.String toStringResultOfSimulation()
public IntegrationResult classify(java.lang.Object newDescr) throws java.lang.Exception
java.lang.Exception
public IntegrationResult classify(java.lang.Object newDescr, AmineList pertinentTypes) throws java.lang.Exception
newDescr
- ObjectpertinentTypes
- AmineList
java.lang.Exception
public IntegrationResult classify(java.lang.Object newDescr, AmineList pertinentTypes, AmineList superTypesPertinentTypes) throws java.lang.Exception
java.lang.Exception
public IntegrationResult generalize(java.lang.Object newDescr) throws java.lang.Exception
java.lang.Exception
public IntegrationResult generalize(java.lang.Object newDescr, AmineList pertinentTypes) throws java.lang.Exception
java.lang.Exception
public IntegrationResult generalize(java.lang.Object newDescr, AmineList pertinentTypes, AmineList superTypesPertinentTypes) throws java.lang.Exception
java.lang.Exception
public IntegrationResult ask(java.lang.Object newDescr) throws java.lang.Exception
java.lang.Exception
public IntegrationResult ask(java.lang.Object newDescr, AmineList pertinentTypes) throws java.lang.Exception
java.lang.Exception
public IntegrationResult ask(java.lang.Object newDescr, AmineList pertinentTypes, AmineList superTypesPertinentTypes) throws java.lang.Exception
java.lang.Exception
public static IntegrationResult classify(Ontology ontology, java.lang.Object situationDescr, AmineList pertinentTypes)
ontology
- OntologysituationDescr
- ObjectpertinentTypes
- AmineList
public static IntegrationResult classify(Ontology ontology, java.lang.Object newDescr)
public static IntegrationResult generalize(Ontology ontology, java.lang.Object newDescr, AmineList pertinentTypes)
public static IntegrationResult generalize(Ontology ontology, java.lang.Object newDescr)
public static IntegrationResult ask(Ontology ontology, java.lang.Object newDescr, AmineList pertinentTypes)
public static IntegrationResult ask(Ontology ontology, java.lang.Object newDescr)
protected static IntegrateCS createIntegrateCS(Ontology ontology, Lexicon lexicon) throws DynamicKnowledgeIntegrationException
DynamicKnowledgeIntegrationException
protected abstract AmineList getConceptTypes(java.lang.Object newDescr)
protected abstract boolean isEmpty(java.lang.Object newDescr)
protected abstract CS newCS(java.lang.Object newDescr)
protected abstract java.util.Enumeration findConceptsWithType(java.lang.Object newDescr, CS pertinentType)
protected abstract java.util.Enumeration getConcepts(java.lang.Object newDescr)
protected abstract boolean sameTypeOfCS(CS newOntNode, CS currentOntNode)
protected abstract boolean identicalTypeOfCS(CS newOntNode, CS currentOntNode)
protected abstract void setContentOf(CS newOntNode, CS currentOntNode)
public IntegrationResult integrateCS(java.lang.Object newDescr, AmineList pertinentTypes, AmineList superTypesPertinentTypes, boolean classify) throws java.lang.Exception
newDescr
- ObjectpertinentTypes
- AmineListsuperTypesPertinentTypes
- AmineListclassify
- boolean
java.lang.Exception
protected void propagateNewNodeViaFocus() throws java.lang.Exception
java.lang.Exception
protected void propagateFromOneFocus(CS oneFocus, AmineList oneEntryPointList) throws java.lang.Exception
java.lang.Exception
protected boolean compareAndProceed(Concept entryPoint, CS currentOntNode, CS fatherOntNode, boolean realComparison) throws java.lang.Exception
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 withfatherOntNode
- a CS corresponding to the father in the ontology of the currentOntNoderealComparison
- a Boolean that specifies if the integration via currentOntNode is
effective or not. This parameter is important for Individual node especially.
java.lang.Exception
protected boolean firstCompareAndProceed(Concept entryPoint, CS currentOntNode, CS fatherOntNode, boolean realComparison) throws java.lang.Exception
java.lang.Exception
protected boolean proceed(Concept entryPoint, CS currentOntNode, CS fatherOntNode, boolean realComparison, CompareCGResult compareCGResult) throws java.lang.Exception
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 withfatherOntNode
- a CS corresponding to the father in the ontology of the currentOntNoderealComparison
- a boolean indicating if we can integrate from the current node or from its fathercompareCGResult
- a CompareCGResults containing the result of the comparison between the
current ontology node and the new newDescr
java.lang.Exception
protected CompareCGResult compare(CS newOntNode, Concept entryPoint, CS currentOntNode, CS fatherOntNode) throws java.lang.Exception
entryPoint
- a Concept to consider as the entry point for the comparisoncurrentOntNode
- a CS which is the newDescr to compare withfatherOntNode
- a CS which the father ontology node of currentOntNode
java.lang.Exception
protected CompareCGResult compareCG(CS newOntNode, Concept entryPoint, CS currentOntNode, CS fatherOntNode) throws java.lang.Exception
java.lang.Exception
protected void printFocusHashMap() throws java.lang.Exception
java.lang.Exception
protected void updatePertinentTypes(AmineList initialConcTypesSet, AmineList currConcTypesSet, AmineList pertinentTypes)
initialConcTypesSet
- AmineListcurrConcTypesSet
- AmineListpertinentTypes
- AmineListprotected java.util.ArrayList children(CS ontologyNode)
ontologyNode
- an CS for which we look for the children that are not of type Individual
protected void updateCompareNodesHshMap(CS oldNewOntNode, CS newOntNode)
protected CompareNodesResult getCompareNodesResult(java.util.ArrayList compareCurrentNodeList, Concept entryPoint)
protected CG getContent(CS node)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |