|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectaminePlatform.util.cg.CG
Title : util.cg.CG Class
Description : A CG has one attribute : concepts, which is an ArrayList of Concepts. Relations are specified implicitly, as income and/or outcome relations of concepts. The method getRelations() returns the relations of the current CG.
CG can be implemented in different ways. In Amine Web Site, we provide reasons for our implementation.Also, we consider the case of functionalCG and headedCG:
- A functional CG is a CG where each concept has mutually different income relations types, and mutually different outcome relations types.
- A headed CG is a is a CG in which the first concept (in Concepts) plays the role of the head. In textual notation, the head is the first concept specified (both in LF and in CGIF).
Copyright : Copyright (c) Adil KABBAJ 2004-2009
Field Summary | |
static CG |
cgCSDescr
|
Constructor Summary | |
CG()
|
|
CG(java.util.ArrayList concepts)
Create a CG with the specified arrayList of concepts. |
|
CG(int s)
|
Method Summary | |
boolean |
addConcept(Concept concept)
Add the parameter concept to the current CG, if concept is not null and it is not already a concept of the current CG. |
void |
addEdge(Edge edge)
|
void |
addNode(Node node)
|
boolean |
addRelation(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object relationType,
java.lang.Object bindInfRelType,
Concept srceConc,
Concept trgtConc)
Add a relation to the current CG given its type, its source concept and its target concept. |
boolean |
addRelation(BindingContext bindContext,
java.lang.Object bindInf,
Relation relation,
java.lang.Object bindInfRel)
|
boolean |
addRelation(java.lang.Object relationType,
Concept srceConc,
Concept trgtConc)
Add a relation to the current CG given its type, its source concept and its target concept. |
boolean |
addRelation(java.lang.Object relationType,
java.lang.String suffix,
Concept srceConc,
Concept trgtConc)
|
boolean |
addRelation(java.lang.Object relationType,
java.lang.String suffix,
Concept srceConc,
Concept trgtConc,
java.awt.Point posRelName,
java.util.ArrayList segmentPoints)
NEW Amine 2.5, by Adil: we consider the case of SYNERGY relations and the presence of special attributes that are stored in suffix field of the relation. |
boolean |
addRelation(Relation relation)
Add the specified relation to the current CG. |
boolean |
analogizeType(Concept conc,
Type type)
This method implements the following elementary analog operation : replace the type of the specified concept conc, that should exist in the current CG, by the given type. |
void |
analogy(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
analogy() determine the structural matching of the two CG and then transfer to the target CG (this CG) all the elements that are specific to the source CG and that respect the canonicity of the targetCG. |
void |
analogy(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object entryConcept1,
java.lang.Object bindInfEntry1,
java.lang.Object obj,
java.lang.Object bindInfObj,
java.lang.Object entryConcept2,
java.lang.Object bindInfEntry2)
analogy() determine the structural matching of the two CG and then transfer to the target CG (this CG) all the elements that are specific to the source CG and that respect the canonicity of the targetCG. |
void |
analogy(Concept e1,
CG cg,
Concept e2)
analogy: this new version does not consider binding context and binding information |
void |
analogy(java.lang.Object obj)
analogy() determine the structural matching of the two CG and then transfer to the target CG (this CG) all the elements that are specific to the source CG and that respect the canonicity of the targetCG. |
static boolean |
areConcepts(java.util.ArrayList concepts)
Check that all the elements of concepts are Concept |
void |
clear()
Clear the content of the current CG : all concepts and relations of the current CG are cleared, but the CG still exists as an (empty) java object, so that we can add to it new concepts and relations. |
java.lang.Object |
clone()
Performs a deep copy of the current CG. |
java.lang.Object |
clone(BindingContext bindContext,
java.lang.Object bindInf)
This method is equivalent to copy(bindContext, bindInf). |
CompareCGResult |
compare(Concept entryPoint1,
CG cg2,
Concept entryPoint2)
Compare two CGs cg1 and cg2 : The operation starts by computing the generalization between the two CG cg1 and cg2. |
static CG |
constructCG(java.util.Iterator i)
Construct a CG from the specified Enumeration of relation. |
boolean |
contractTypeDefinition(BindingContext bindContext,
java.lang.Object bindInf,
Concept concept)
Contract the definition of the type of the specified concept from the current CG, using the specified concept as the entry point. |
boolean |
contractTypeDefinition(BindingContext bindContext,
java.lang.Object bindInf,
Concept concept,
Type type)
Contract the definition of the specified Type from the current CG, using the specified concept as the entry point. |
boolean |
contractTypeDefinition(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
This is a variant of the previous definition: instead of a Concept as third parameter, this variant allows an object with the specification of its binding information. |
boolean |
contractTypeDefinition(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object objConcept,
java.lang.Object bindInfObj1,
java.lang.Object objType,
java.lang.Object bindInfObj2)
This is a variant of the previous definition: instead of a Concept as third parameter and Type as forth parameter, this variant accepts two objects with the specification of their binding information. |
boolean |
contractTypeDefinition(Concept concept)
Contract the definition of the type of the specified concept from the current CG, using the specified concept as the entry point. |
boolean |
contractTypeDefinition(Concept concept,
Type type)
Contract the definition of the specified Type from the current CG, using the specified concept as the entry point. |
boolean |
contractTypeDefinition(Type type)
Contract the definition of the specified Type from the current CG. |
CG |
copy()
Performs a deep copy of the current CG. |
CG |
copy(BindingContext bindContext,
java.lang.Object bindInf)
Perform a deep copy of the current CG and considers the presence of variables and their binding: the copy will concern the variable's value too. |
CG |
copy(BindingContext bindContext,
java.lang.Object bindInf,
CorefMatchList corefMatchL,
int indx)
|
static Relation |
copyRelation(BindingContext bindContext,
Relation relation,
java.lang.Object bindInfRel,
java.util.HashMap mapCopy)
Create a copy of the current relation, using mapCopy that specifies for each concept its copy. |
java.util.Enumeration |
coveredBy(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
coveredBy determine which part of the current CG G1 (a subgraph S1) covers a part of obj G2 (a subgraph S2), i.e. |
java.util.Enumeration |
coveredBy(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object entryConcept1,
java.lang.Object bindInfEntry1,
java.lang.Object obj,
java.lang.Object bindInfObj,
java.lang.Object entryConcept2,
java.lang.Object bindInfEntry2)
coveredBy determine which part of the current CG G1 (a subgraph S1) covers a part of obj G2 (a subgraph S2), i.e. |
java.util.Enumeration |
coveredBy(java.lang.Object obj)
coveredBy determine which part of the current CG G1 (a subgraph S1) covers a part of obj G2 (a subgraph S2), i.e. |
static byte |
determineCGForm(java.lang.String cgInString)
Determine the nature of the CG form (linear form or CGIF) from the textual formulation (a String) of the given CG. |
boolean |
equal(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Check that the current CG is equal with the specified object obj. |
boolean |
equal(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object entryConcept1,
java.lang.Object bindInfEntry1,
java.lang.Object obj,
java.lang.Object bindInfObj,
java.lang.Object entryConcept2,
java.lang.Object bindInfEntry2)
|
boolean |
equal(Concept e1,
CG cg,
Concept e2)
equal: this new version does not consider binding context and binding information |
boolean |
equal(java.lang.Object obj)
Check that the current CG is equal with the specified object obj. |
CG |
expand(BindingContext bindContext,
java.lang.Object bindInf,
Concept conc)
Expand the current CG by the maximal join of the definition of the concept type of the specified conc which should be contained in the current CG. |
CG |
expand(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object objConceptOrRelation,
java.lang.Object bindInfObj)
|
CG |
expand(BindingContext bindContext,
java.lang.Object bindInf,
Relation rel)
Expand the current CG by the maximal join of the definition of the relation type of the specified rel which should be contained in the current CG. |
CG |
expand(Concept conc)
Expand the current CG by the maximal join of the definition of the concept type of the specified conc which should be contained in the current CG. |
CG |
expand(Relation rel)
Expand the current CG by the maximal join of the definition of the relation type of the specified rel which should be contained in the current CG. |
void |
finalize()
Finalize the current CG. |
Concept |
findConcept(BindingContext bindContext,
java.lang.Object bindInf,
Concept concept,
java.lang.Object bindInfConc)
Search for the first concept conc in the specified CG cg so that the parameter concept is equal (in content) to conc, taking into account the binding of variables that could occur in the current CG and in concept. |
Concept |
findConcept(Concept concept)
Search for the first concept conc in the current CG so that the parameter concept is equal to conc, according to their content. |
java.util.Enumeration |
findConcepts(BindingContext bindContext,
java.lang.Object bindInf,
Concept concept,
java.lang.Object bindInfConc)
Find all concepts in the specified CG cg that are equal (in content) with the specified concept. |
java.util.Enumeration |
findConcepts(Concept concept)
Find all the concepts in the current CG that are equal (in content) with the specified concept. |
java.util.Enumeration |
findConceptsWithDesignator(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object designator,
java.lang.Object bindInfDsgntr)
Unlike the method findConceptWithDesignator() which search only one concept with the specified designator, this version searchs for all the concepts that could have a designator equal to the specified one. |
java.util.Enumeration |
findConceptsWithDesignator(java.lang.Object designator)
This is a simplified version of findConceptsWithDesignator(); binding context and binding information about variables are not considered. |
java.util.Enumeration |
findConceptsWithType(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object type,
java.lang.Object bindInfType)
Find all the concepts in the current CG that have the type equal to the specified type, taking into account the binding of variables that could occur in the current CG and in type. |
java.util.Enumeration |
findConceptsWithType(java.lang.Object type)
Find all concepts in the current CG that have the type equal to the specified type. |
Concept |
findConceptWithDesignator(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object designator,
java.lang.Object bindInfDsgn)
Search for the concept in the current CG so that its designator is equal to the given designator, taking into account the binding of variables that could occur in the current CG and in designator. |
Concept |
findConceptWithDesignator(java.lang.Object designator)
Search for the concept in the current CG so that its designator is equal to the given designator. |
Concept |
findConceptWithType(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object type,
java.lang.Object bindInfType)
Search for the first concept in the current CG so that its type is equal to the given type, taking into account the binding of variables that could occur in the current CG and in type. |
Concept |
findConceptWithType(java.lang.Object type)
Search for the first concept in the current CG so that its type is equal to the given type. |
AmineList |
findRelations(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object type,
java.lang.Object bindInfType)
|
AmineList |
findRelations(java.lang.Object type)
Find all the relations in the current CG that have the given type as their type. |
boolean |
generalise(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Perform a generalization of the current object with the specified object obj. |
boolean |
generalise(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object entryConcept1,
java.lang.Object bindInfEntry1,
java.lang.Object obj,
java.lang.Object bindInfObj,
java.lang.Object entryConcept2,
java.lang.Object bindInfEntry2)
|
boolean |
generalise(java.lang.Object obj)
Perform a generalization of the current object with the specified object obj. |
java.lang.Object |
generalize(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Perform a generalization of the current object with the specified object obj, to determine what is common to the two objects. |
ResMatchCG |
generalize(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object entryConcept1,
java.lang.Object bindInfEntry1,
java.lang.Object obj,
java.lang.Object bindInfObj,
java.lang.Object entryConcept2,
java.lang.Object bindInfEntry2)
|
ResMatchCG |
generalize(Concept e1,
CG cg,
Concept e2)
generalize: this new version does not consider binding context and binding information |
java.lang.Object |
generalize(java.lang.Object obj)
Perform a generalization of the current object with the specified object obj, to determine what is common to the two objects. |
CG |
generalize(Type pertinentType1,
CG g2,
Type pertinentType2)
|
boolean |
generalizeDescriptor(Concept conc)
Generalize the descriptor of the specified concept conc, that should exist in the current CG, to a null descriptor. |
boolean |
generalizeDescriptor(Concept conc,
java.lang.Object descriptor)
Generalize the descriptor of the specified concept conc, that should exist in the current CG, to the given descriptor. |
boolean |
generalizeDesignator(Concept conc)
Generalize the designator of the specified concept conc, that should exist in the current CG, to a null designator. |
boolean |
generalizeDesignator(Concept conc,
java.lang.Object designator)
Generalize the designator of the specified concept conc, that should exist in the current CG, to the given designator. |
boolean |
generalizeType(Concept conc,
Type type)
Generalize the type of the specified concept conc, that should exist in the current CG, to the given type. |
java.util.ArrayList |
getAllTypes()
|
void |
getAllTypes(java.util.ArrayList allTypes)
|
java.lang.Object[] |
getArrayConcepts()
NEW method: Amine 2.5, by Adil Get the concepts of the current CG in an array |
java.util.ArrayList |
getArrayListConcepts()
|
java.util.ArrayList |
getArrayListRelations()
|
java.lang.Object[] |
getArrayRelations()
NEW method: Amine 2.5, by Adil Get the relations of the current CG in an array |
static boolean |
getCanonicity()
Get the value of canonicity static attribute |
Concept |
getConcept(int indx)
Get the concept at the specified range in the ArrayList concepts of the current CG. |
Concept |
getConcept(java.lang.Object type,
java.lang.Object designator)
Get the concept from the current CG with the specified type and designator. |
java.util.Enumeration |
getConcepts()
Get an Array over the concepts of the current CG. |
java.util.Enumeration |
getConceptsWithDesignator(java.lang.Object designator)
Unlike findConceptsWithDesignator() which attempt to find concepts in the current CG with a designator equal (method in Matching) to the specified designator, this method use the method equals which is more strict than equal (based on matching). |
java.util.Enumeration |
getConceptsWithType(java.lang.Object type)
Unlike findConceptsWithType() which attempts to find concepts in the current CG with a type equal (method in Matching) to the specified type, this method use the method equals which is more strict than equal (based on matching). |
AmineList |
getConceptTypes()
getConceptTypes returns the types (without duplication) used in concepts of the current CG. |
Concept |
getConceptWithCoreferent(Variable coref)
|
Concept |
getConceptWithDescriptor(java.lang.Object descr)
|
Concept |
getConceptWithDesignator(java.lang.Object designator)
Unlike findConceptWithDesignator() which attempt to find a concept in the current CG with a designator equal (method in Matching) to the specified designator, this method use the method equals which is more strict than equal (based on matching). |
Concept |
getConceptWithType(java.lang.Object type)
Unlike findConceptWithType() which attempts to find the first concept in the current CG with a type equal (method in Matching) to the specified type, this method use the method equal which is more strict than equal (based on matching). |
Concept |
getConceptWithVarDescriptor(Variable descr)
|
java.util.Enumeration |
getEdges()
|
static boolean |
getFunctionalCG()
Get the value of the functional CG static attribute |
java.util.Enumeration |
getGenus()
If the current CG is the definition body of a concept type, it will contain genus (concept(s) with "super" as designator). |
java.util.Enumeration |
getGenusConcepts()
Similar to getGenus()/getGenusTypes() except that it returns enumeration of concepts |
java.util.Enumeration |
getGenusTypes()
A method equivalent to getGenus(). |
Concept |
getHead()
Get the head (the first concept) if CGs are headedCGs, else return null. |
static boolean |
getHeadedCG()
Get the value of the static attribute headedCG |
int |
getNbrConcepts()
Get the number of concepts in the current CG |
int |
getNbrRelations()
Get the number of relations of the current CG |
java.util.Enumeration |
getNodes()
Getters and Setters |
java.util.Enumeration |
getRelations()
Get all the relations of the current CG (an ArrayList of Relation) |
java.util.ArrayList |
getRelationsInArrayList()
|
java.util.HashMap |
getRelationsInHmp()
Get all the relations of the current CG in a HashMap. |
java.util.HashMap |
getRelationsInHmp(AmineInteger nbrRels)
This method is a variante of the method getRelationsInHmp(); it returns the HashMap of all the relations in the current CG and also the number of relations of the current CG. |
java.util.HashMap |
getRelationsInHmp(BindingContext bindContext,
java.lang.Object bindInf)
Get all the relations of the current CG in a HashMap. |
java.util.HashMap |
getRelationsInHmp(BindingContext bindContext,
java.lang.Object bindInf,
AmineInteger nbrRels)
This method is a variante of the method getRelationsInHmp(); it returns the HashMap of all the relations in the current CG and also the number of relations of the current CG. |
java.util.ArrayList |
getRelationsWithType(java.lang.Object relType)
This method returns an Enumeration of all relations in current CG that have the specified relation type relType |
int |
getSize()
Methods on Concepts |
int |
getSupCoref()
public void generateCorefs(ArrayList concs) { Concept conc; int supCoref = this.getSupCoref(); supCoref++; Enumeration concepts = this.getConcepts(); while (concepts.hasMoreElements()) { conc = (Concept) concepts.nextElement(); // (conc.getNbrIncomeRels() > 1 || conc.getNbrOutcomeRels() > 1) New Adil : Amine 2.5 06/08/04 if ((conc.getNbrIncomeRels() > 1 ) && // && conc.getNbrOutcomeRels() > 1 // (conc.getDesignator() == null || conc.getCoreferent() == null || conc.getDescriptor() == null)) { try { Variable coref = new Variable("*p" + supCoref); conc.setCoreferent(coref); concs.add(conc); } catch (Exception ex) {}; supCoref++; // increment the value of pseudoDsgn } } } public Variable generateCoref() { int indx = this.getSupCoref(); indx++; Variable coref = new Variable("*p" + indx); return coref; } /** scan the current CG, taking into account embeeded CG, to identify the coreferent with the greater indice value; for coreferents with the form "*pINTEGER". |
void |
getVariables(java.util.ArrayList varsIdent)
getVariables is an utility method that looks for all the variables used in the current CG. |
boolean |
isAConcept()
Check if the current CG contains only one concept without any relation. |
boolean |
isARelation()
Check if the current CG corresponds to a relation : it contains only a relation with its source and target concepts. |
boolean |
isCanonic()
Check if current CG is canonic: a) for each type (concept type or relation type) in the current CG, search its canon (if it has) and checks that the canon subsumes the current CG. |
boolean |
isCanonic(BindingContext bindContext,
java.lang.Object bindInf)
Check if current CG is canonic: a) for each type (concept type or relation type) in the current CG, search its canon (if it has) and checks that the canon subsumes the current CG. |
static boolean |
isCanonicity()
Check if the value of the static attribute canonicity is true |
static boolean |
isCG(java.lang.Object obj)
Check if the specified Object obj is a CG. |
boolean |
isCompoundCG()
Check if the current CG contains a concept that is a context; a concept that have a CG as description. |
boolean |
isConceptInCG(Concept concept)
Check if the parameter concept is contained in the current CG. |
boolean |
isEmpty()
Check if the current CG is empty; it contains no concept (and so no relation) |
static boolean |
isFunctionalCG()
Check if the value of the static attribute functionalCG is true |
boolean |
isGenus(Type type)
|
boolean |
isHead(Concept conc)
Check if the specified concept conc is the head of the current CG |
static boolean |
isHeadedCG()
Check if CGs are HeadedCG (the static attribute headedCG is true) |
boolean |
isRelationInCG(Relation relation)
Check if the specified relation is contained in the current CG. |
CG |
join(Concept conc1,
CG cg2,
Concept conc2)
Join the current CG with the specified CG cg2, with the specified conc1 and conc2 as two concepts of the current CG and cg2 respectively, and conc1 is identical to conc2. |
static CG |
load(java.lang.String filePath)
Load to the main memory, by deserialization, the CG stored in filePath and return the CG. |
void |
makeEmpty()
|
java.lang.Object |
match(byte matchOperation,
BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Match the current CG with the specified object obj, according to the value of the parameter matchOperation. |
ResMatchCG |
match(byte matchOperation,
BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object entryConcept1,
java.lang.Object bindInfEntry1,
java.lang.Object obj,
java.lang.Object bindInfObj,
java.lang.Object entryConcept2,
java.lang.Object bindInfEntry2)
|
ResMatchCG |
match(byte matchOperation,
Concept entryConcept1,
CG cg,
Concept entryConcept2)
|
ResMatchCG |
match(byte matchOperation,
Concept entryConcept1,
Concept concept,
Concept entryConcept2)
|
java.lang.Object |
match(byte matchOperation,
java.lang.Object obj)
Match the current CG with the specified object, according to the value of the parameter matchOperation. |
java.lang.Object |
maximalJoin(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Perform a maximal join of the current object with the specified object obj. |
ResMatchCG |
maximalJoin(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object entryConcept1,
java.lang.Object bindInfEntry1,
java.lang.Object obj,
java.lang.Object bindInfObj,
java.lang.Object entryConcept2,
java.lang.Object bindInfEntry2)
|
ResMatchCG |
maximalJoin(Concept e1,
CG cg,
Concept e2)
maximalJoin: this new version does not consider binding context and binding information |
java.lang.Object |
maximalJoin(java.lang.Object obj)
Perform a maximal join of the current object with the specified object obj. |
Node |
newNode(java.lang.String contenu,
Lexicon lexicon)
|
static CG |
open(java.lang.String filePath)
This method is equivalent to the method load(String filePath) |
static CG |
parse(java.lang.String cgInString,
Lexicon lexicon)
Parse the textual formulation of a CG (parameter cgInString) using the specified lexicon and produce its internal representation. cgInString could be in a Linear Form (LF) or in CGIF form. |
static CG |
parseCGIF(java.lang.String cgInCGIF,
Lexicon lexicon)
Given a CG as a String in CGIF form and using the specified lexicon, this method parses the string and produces the internal representation of the CG. |
java.lang.Object |
parseCSDescr(java.lang.String stgDescr,
Lexicon lexicon)
|
static CG |
parseLF(java.lang.String cgInLF,
Lexicon lexicon)
Given a CG as a String in linear form and the lexicon to use, this method parses the string and produces the internal representation of the CG. |
static CG |
relaxedParserLF(java.lang.String cgInLF,
Lexicon lexicon,
AmineList newTypes)
|
boolean |
removeConcept(Concept concept)
Remove the specified concept from the current CG. |
void |
removeEdge(Edge edge)
|
void |
removeNode(Node node)
|
boolean |
removeRelation(Relation relation)
Remove the specified relation from the current CG. |
boolean |
replaceConcept(Concept conc1,
Concept conc2)
Replace, in the current CG, the concept conc1 by the concept conc2: conc1 should exist in the current CG and conc2 coud be a concept of the current CG or a new concept |
boolean |
restrictDescriptor(Concept conc,
java.lang.Object descriptor)
Restrict the descriptor of the specified concept conc, that should exist in the current CG, to the given descriptor. |
boolean |
restrictDesignator(Concept conc,
java.lang.Object designator)
Restrict the designator of the specified concept conc, that should exist in the current CG, to the given designator. |
boolean |
restrictType(Concept conc,
Type type)
Restrict the type of the specified concept conc, that should exist in the current CG, to the given type. |
void |
save(java.lang.String filePath)
This method is equivalent to the method store(String filePath) |
Concept |
selectHead()
select a head for the currant CG. |
static void |
setCanonicity(boolean mode)
Set the specified boolean mode as the value for the static attribute canonicity |
boolean |
setConcepts(java.util.ArrayList concepts)
Assign the parameter concepts as the concepts of the current CG. |
static void |
setFunctionalCG(boolean mode)
Set the specified boolean mode as the value for the static attribute functionalCG |
static void |
setHeadedCG(boolean mode)
Set the specified boolean mode as the value for the static attribute headedCG |
boolean |
specialize(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Perform a specialization of the current object with the specified object obj. |
boolean |
specialize(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object entryConcept1,
java.lang.Object bindInfEntry1,
java.lang.Object obj,
java.lang.Object bindInfObj,
java.lang.Object entryConcept2,
java.lang.Object bindInfEntry2)
|
boolean |
specialize(java.lang.Object obj)
Perform a specialization of the current object with the specified object obj. |
boolean |
specializeByExpansion(BindingContext bindContext,
java.lang.Object bindInf,
Concept concept)
specializeByExpansion performs the expansion in the current CG (this); it does NOT create a new CG that represents the result of the expansion. |
boolean |
specializeByExpansion(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object objConcept,
java.lang.Object bindInfObj)
|
boolean |
specializeByExpansion(Concept concept)
specializeByExpansion performs the expansion in the current CG (this); it does NOT create a new CG that represents the result of the expansion. |
void |
store(java.lang.String filePath)
Store, by serialization, the current CG in the file filePath. |
boolean |
subsume(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Check that the current CG subsumes (is more general than) the specified object obj. |
boolean |
subsume(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object entryConcept1,
java.lang.Object bindInfEntry1,
java.lang.Object obj,
java.lang.Object bindInfObj,
java.lang.Object entryConcept2,
java.lang.Object bindInfEntry2)
|
boolean |
subsume(Concept e1,
CG cg,
Concept e2)
subsume: this new version does not consider binding context and binding information |
boolean |
subsume(java.lang.Object obj)
Check that the current object subsumes (is more general than) the specified object obj. |
java.lang.Object |
subsumeWithResult(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Check that the current object subsumes (is more general than) the specified object obj. |
ResMatchCG |
subsumeWithResult(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object entryConcept1,
java.lang.Object bindInfEntry1,
java.lang.Object obj,
java.lang.Object bindInfObj,
java.lang.Object entryConcept2,
java.lang.Object bindInfEntry2)
|
java.lang.Object |
subsumeWithResult(java.lang.Object obj)
Check that the current object subsumes (is more general than) the specified object obj. |
java.lang.String |
toCGIF(BindingContext bindContext,
java.lang.Object bindInf,
Lexicon lexicon)
This method returns the CGIF notation of the specified cg. |
java.lang.String |
toCGIF(Lexicon lexicon)
This method is similar to toLF(). |
java.lang.String |
toCGIFWithDrawingInf(BindingContext bindContext,
java.lang.Object bindInf,
Lexicon lexicon)
This method is similar to the method toCGIF() that consider variable binding except that we formulate also the drawing information; the leftTop point of each concept, the position of each relation type and the points that define the segments of the relation. |
java.lang.String |
toCGIFWithDrawingInf(Lexicon lexicon)
This method is similar to the method toCGIF() except that we formulate also the drawing information; the leftTop point of each concept, the position of each relation type and the points that define the segments of the relation. |
Concept |
toConcept()
Convert the current CG to a concept if the CG corresponds to only one concept without relations (the conversion will not change the CG itself but returns the concept that composes the CG). |
java.lang.String |
toLF(BindingContext bindContext,
java.lang.Object bindInf,
Lexicon lexicon)
This method returns the Linear Form (LF) of the curreng cg. |
java.lang.String |
toLF(Lexicon lexicon)
This method is the equivalent to the method toString() associated to any Java Object. |
java.lang.String |
toLFWithDrawingInf(BindingContext bindContext,
java.lang.Object bindInf,
Lexicon lexicon)
This method is similar to the method toLF() that consider variable binding except that we formulate also the drawing information; the leftTop point of each concept, the position of each relation type and the points that define the segments of the relation. |
java.lang.String |
toLFWithDrawingInf(Lexicon lexicon)
This method is similar to the method toLF() except that we formulate also the drawing information; the leftTop point of each concept, the position of each relation type and the points that define the segments of the relation. |
Relation |
toRelation()
Convert the current CG to a relation if the CG corresponds to only one relation (the conversion will not change the CG itself but returns the relation that composes the CG). |
java.lang.String |
toString(BindingContext bindContext,
java.lang.Object bindInf,
Lexicon lexicon)
By default, the textualization of a CG will be in Linear Form. |
java.lang.String |
toString(Lexicon lexicon)
By default, the textualization of a CG will be in Linear Form. |
java.lang.String |
toXML(Lexicon lexicon)
|
void |
trimToSize()
Optimize the storage of the current CG |
boolean |
unify(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object obj,
java.lang.Object bindInfObj)
Unify the current CG with the specified object obj. |
boolean |
unify(BindingContext bindContext,
java.lang.Object bindInf,
java.lang.Object entryConcept1,
java.lang.Object bindInfEntry1,
java.lang.Object obj,
java.lang.Object bindInfObj,
java.lang.Object entryConcept2,
java.lang.Object bindInfEntry2)
|
boolean |
unify(java.lang.Object obj)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static CG cgCSDescr
Constructor Detail |
public CG()
public CG(int s)
s
- : the initial capacity of the CG' concepts which is an ArrayListpublic CG(java.util.ArrayList concepts)
concepts
- Method Detail |
public void finalize()
finalize
in interface AmineObject
public void clear()
clear
in interface AmineObject
public void makeEmpty()
makeEmpty
in interface Graph
public Node newNode(java.lang.String contenu, Lexicon lexicon) throws java.lang.Exception
newNode
in interface Graph
java.lang.Exception
public java.lang.Object clone()
clone
in interface AmineObject
public java.lang.Object clone(BindingContext bindContext, java.lang.Object bindInf)
clone
in interface AmineObject
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and the current CG
public CG copy()
public CG copy(BindingContext bindContext, java.lang.Object bindInf)
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and the current CG
public CG copy(BindingContext bindContext, java.lang.Object bindInf, CorefMatchList corefMatchL, int indx)
public static Relation copyRelation(BindingContext bindContext, Relation relation, java.lang.Object bindInfRel, java.util.HashMap mapCopy)
bindContext
- The binding context for this operation.relation
- The relation to copybindInfRel
- The binding information associated to relationmapCopy
- A HashMap that stores each concept and its copy
public java.lang.Object parseCSDescr(java.lang.String stgDescr, Lexicon lexicon) throws java.lang.Exception
parseCSDescr
in interface ParseCSDescription
java.lang.Exception
public java.util.Enumeration getGenus()
getGenus
in interface DescriptionWithGenus
public java.util.Enumeration getGenusTypes()
public java.util.Enumeration getGenusConcepts()
public boolean isGenus(Type type)
public void getVariables(java.util.ArrayList varsIdent)
getVariables
in interface AmineObject
varsIdent
- : an ArrayList of Variable objects. The method inserts in
varsIdent all the variables used in the current CGpublic static boolean isCG(java.lang.Object obj)
obj
- : an object
public boolean isCompoundCG()
public boolean isEmpty()
isEmpty
in interface Graph
public boolean isAConcept()
public boolean isARelation()
public Concept toConcept()
public Relation toRelation()
public static CG load(java.lang.String filePath) throws java.lang.Exception
filePath
- is the file path for the file that contain an internal representation
of the CG
:
- exceptions can occur during the deserialization process
java.lang.Exception
public static CG open(java.lang.String filePath) throws java.lang.Exception
filePath
- is the file path for the file that contain an internal representation
of the CG
:
- exceptions can occur during the deserialization process
java.lang.Exception
public void store(java.lang.String filePath) throws java.lang.Exception
filePath
- is the file path for the file where the internal representation
of the CG will be stored
java.lang.Exception
public void save(java.lang.String filePath) throws java.lang.Exception
filePath
- is the file path for the file where the internal representation
of the CG will be stored
java.lang.Exception
public java.util.Enumeration getNodes()
getNodes
in interface Graph
public java.util.Enumeration getConcepts()
public java.util.ArrayList getArrayListConcepts()
public java.lang.Object[] getArrayConcepts()
public void getAllTypes(java.util.ArrayList allTypes)
public java.util.ArrayList getAllTypes()
public boolean setConcepts(java.util.ArrayList concepts)
concepts
- the ArrayList of Concept to set as the concepts of the
current CG. concepts could not be null.
public static boolean areConcepts(java.util.ArrayList concepts)
concepts
- : An ArrayList that should be of Concept
public static boolean getFunctionalCG()
public static boolean isFunctionalCG()
public static void setFunctionalCG(boolean mode)
mode
- The value to set for the static attribute functionalCGpublic static boolean getHeadedCG()
public static boolean isHeadedCG()
public static void setHeadedCG(boolean mode)
mode
- The value to set for the static attribute headedCGpublic static boolean getCanonicity()
public static boolean isCanonicity()
public static void setCanonicity(boolean mode)
mode
- The value to set for the static attribute canonicitypublic void trimToSize()
public int getSize()
getSize
in interface Graph
public int getNbrConcepts()
public boolean isConceptInCG(Concept concept)
concept
- : the concept to look for in the current CG
public java.util.Enumeration findConcepts(Concept concept)
concept
- : a concept
public java.util.Enumeration findConcepts(BindingContext bindContext, java.lang.Object bindInf, Concept concept, java.lang.Object bindInfConc)
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to the current CGconcept
- A conceptbindInfConc
- The binding information related to the binding context and to concept
public java.util.Enumeration findConceptsWithType(java.lang.Object type)
type
- A type that could be a Type CS or a variable
public java.util.Enumeration findConceptsWithType(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object type, java.lang.Object bindInfType)
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to the current CGtype
- A type that could be a Type CS or a variablebindInfType
- The binding information related to the binding context and to type
public Concept findConcept(Concept concept)
concept
- A concept
public Concept findConcept(BindingContext bindContext, java.lang.Object bindInf, Concept concept, java.lang.Object bindInfConc)
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to the current CGconcept
- A conceptbindInfConc
- The binding information related to the binding context and to concept
public Concept findConceptWithType(java.lang.Object type)
type
- A type that could be a Type CS or a variable
public Concept findConceptWithType(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object type, java.lang.Object bindInfType)
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to the current CGtype
- A type that could be a Type CS or a variablebindInfType
- The binding information related to the binding context and to type
public Concept findConceptWithDesignator(java.lang.Object designator)
designator
- The designator of the concept to look for.
public Concept findConceptWithDesignator(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object designator, java.lang.Object bindInfDsgn)
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to the current CGdesignator
- the designator of the concept to look for.bindInfDsgn
- The binding information related to the binding context and to designator
public java.util.Enumeration findConceptsWithDesignator(java.lang.Object designator)
designator
- A designator
public java.util.Enumeration findConceptsWithDesignator(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object designator, java.lang.Object bindInfDsgntr)
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to the current CGdesignator
- the designator of the concept to look for.
public AmineList findRelations(java.lang.Object type)
type
- A relation Type.
public AmineList findRelations(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object type, java.lang.Object bindInfType)
public Concept getConcept(int indx)
indx
- The index of the desired concept in the array of concepts
public java.util.Enumeration getConceptsWithType(java.lang.Object type)
type
- A type that could be a Type CS or a variable
public java.util.ArrayList getRelationsWithType(java.lang.Object relType)
relType
- Object
public Concept getConceptWithType(java.lang.Object type)
type
- A type that could be a Type CS or a variable
public Concept getConcept(java.lang.Object type, java.lang.Object designator)
type
- A type that could be a Type CS or a variabledesignator
- A Designator
public Concept getConceptWithDesignator(java.lang.Object designator)
designator
- A Designator
public Concept getConceptWithCoreferent(Variable coref)
public Concept getConceptWithDescriptor(java.lang.Object descr)
public Concept getConceptWithVarDescriptor(Variable descr)
public java.util.Enumeration getConceptsWithDesignator(java.lang.Object designator)
designator
-
public void addNode(Node node)
addNode
in interface Graph
public boolean addConcept(Concept concept)
concept
- : a concept to add to the current CG
public boolean replaceConcept(Concept conc1, Concept conc2)
conc1
- The concept to replaceconc2
- The concept that will replace conc1
public boolean removeConcept(Concept concept)
concept
- The concept to remove from the current CG
public void removeNode(Node node)
removeNode
in interface Graph
public boolean isHead(Concept conc)
conc
- A Concept
public Concept getHead()
public Concept selectHead()
public int getSupCoref()
public boolean isRelationInCG(Relation relation)
relation
- : the relation to look for in the current CG
public int getNbrRelations()
public java.util.Enumeration getEdges()
getEdges
in interface Graph
public java.util.Enumeration getRelations()
public java.lang.Object[] getArrayRelations()
public java.util.ArrayList getArrayListRelations()
public java.util.ArrayList getRelationsInArrayList()
public java.util.HashMap getRelationsInHmp()
public java.util.HashMap getRelationsInHmp(BindingContext bindContext, java.lang.Object bindInf)
bindContext
- The Binding ContextbindInf
- The binding information associated to the current CG
public java.util.HashMap getRelationsInHmp(AmineInteger nbrRels)
nbrRels
- : an AmineInteger object that will contain at the end the number
of relations of the current CG. AmineInteger is a wrapper class for int.
It play the role of an inout parameter. This parameter could be null; if the
user is not interested by the number of relations.
public java.util.HashMap getRelationsInHmp(BindingContext bindContext, java.lang.Object bindInf, AmineInteger nbrRels)
bindContext
- The Binding ContextbindInf
- The binding information associated to the current CGnbrRels
- : an AmineInteger object that will contain at the end the number
of relations of the current CG. AmineInteger is a wrapper class for int.
It play the role of an inout parameter. This parameter could be null; if the
user is not interested by the number of relations.
public void addEdge(Edge edge)
addEdge
in interface Graph
public boolean addRelation(Relation relation)
relation
- : the relation to add to the current CG
public boolean addRelation(BindingContext bindContext, java.lang.Object bindInf, Relation relation, java.lang.Object bindInfRel)
public boolean addRelation(java.lang.Object relationType, Concept srceConc, Concept trgtConc) throws RelationException
RelationException
public boolean addRelation(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object relationType, java.lang.Object bindInfRelType, Concept srceConc, Concept trgtConc) throws RelationException
bindContext
- The Binding Context for this operationbindInf
- The binding information associated to this CGrelationType
- The relation TypebindInfRelType
- The binding information associated to relationTypesrceConc
- The source concepttrgtConc
- The target concept
RelationException
public boolean addRelation(java.lang.Object relationType, java.lang.String suffix, Concept srceConc, Concept trgtConc, java.awt.Point posRelName, java.util.ArrayList segmentPoints) throws RelationException
RelationException
public boolean addRelation(java.lang.Object relationType, java.lang.String suffix, Concept srceConc, Concept trgtConc) throws RelationException
RelationException
public boolean removeRelation(Relation relation)
public void removeEdge(Edge edge)
removeEdge
in interface Graph
public static CG constructCG(java.util.Iterator i)
public boolean restrictType(Concept conc, Type type)
conc
- The Concept from the current CG to restrict its typetype
- The new type for conc
public boolean restrictDesignator(Concept conc, java.lang.Object designator)
conc
- The Concept from the current CG to restrict its designatordesignator
- The new designator for conc
public boolean restrictDescriptor(Concept conc, java.lang.Object descriptor)
conc
- The Concept from the current CG to restrict its descriptordescriptor
- The new descriptor for conc
public boolean generalizeType(Concept conc, Type type)
conc
- The Concept from the current CG to generalize its typetype
- The new type for conc
public boolean generalizeDesignator(Concept conc, java.lang.Object designator)
conc
- The Concept from the current CG to generalize its designatordesignator
- The new designator for conc
public boolean generalizeDesignator(Concept conc)
conc
- The Concept from the current CG to generalize its designator
public boolean generalizeDescriptor(Concept conc, java.lang.Object descriptor)
conc
- The Concept from the current CG to generalize its descriptordescriptor
- The new descriptor for conc
public boolean generalizeDescriptor(Concept conc)
conc
- The Concept from the current CG to generalize its descriptor
public CG join(Concept conc1, CG cg2, Concept conc2)
conc1
- A concept in the current CGcg2
- The CG to joinconc2
- The concept in cg2 to join with conc1
public boolean analogizeType(Concept conc, Type type)
conc
- The Concept from the current CG to analogize its typetype
- The new type for conc
public java.lang.String toLF(Lexicon lexicon) throws ToStringException
lexicon
- The lexicon in use during the textual formulation of the current CG
ToStringException
- if an error occurs during the textualizationpublic java.lang.String toLF(BindingContext bindContext, java.lang.Object bindInf, Lexicon lexicon) throws ToStringException
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to the current CGlexicon
- The lexicon in use during the textual formulation of the CG cg
ToStringException
- if an error occurs during the textualizationpublic java.lang.String toLFWithDrawingInf(Lexicon lexicon) throws ToStringException
lexicon
- The lexicon in use during the textual formulation of the current CG
ToStringException
- if an error occurs during the textualizationpublic java.lang.String toLFWithDrawingInf(BindingContext bindContext, java.lang.Object bindInf, Lexicon lexicon) throws ToStringException
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to the current CGlexicon
- The lexicon in use during the textual formulation of the CG cg
ToStringException
- if an error occurs during the textualizationpublic java.lang.String toXML(Lexicon lexicon) throws java.lang.Exception
toXML
in interface ToXML
java.lang.Exception
public java.lang.String toString(Lexicon lexicon) throws ToStringException
toString
in interface ToString
lexicon
- The lexicon to use during the textual formulation of the current CG
ToStringException
- if an error occurs during the textualizationpublic java.lang.String toString(BindingContext bindContext, java.lang.Object bindInf, Lexicon lexicon) throws ToStringException
toString
in interface AmineObject
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to the current CGlexicon
- The lexicon to use during the textual formulation of the current concept
ToStringException
- if an error occurs during the textualizationpublic java.lang.String toCGIF(Lexicon lexicon) throws ToStringException
lexicon
- The lexicon in use during the textual formulation of the current CG
ToStringException
- if an error occurs during the textualizationpublic java.lang.String toCGIF(BindingContext bindContext, java.lang.Object bindInf, Lexicon lexicon) throws ToStringException
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to the current CGlexicon
- The lexicon in use during the textual formulation
ToStringException
public java.lang.String toCGIFWithDrawingInf(Lexicon lexicon) throws ToStringException
lexicon
- The lexicon in use during the textual formulation of the current CG
ToStringException
- if an error occurs during the textualizationpublic java.lang.String toCGIFWithDrawingInf(BindingContext bindContext, java.lang.Object bindInf, Lexicon lexicon) throws ToStringException
bindContext
- The Binding contextbindInf
- The binding information related to the binding context and to the current CGlexicon
- The lexicon in use during the textual formulation
ToStringException
public static CG parseLF(java.lang.String cgInLF, Lexicon lexicon) throws ParsingException
cgInLF
- The CG in linear formlexicon
- The lexicon in use during the parsing
java.lang.Exception
- if problems occur during the parsing
ParsingException
public static CG relaxedParserLF(java.lang.String cgInLF, Lexicon lexicon, AmineList newTypes) throws ParsingException
ParsingException
public static CG parseCGIF(java.lang.String cgInCGIF, Lexicon lexicon) throws ParsingException
cgInCGIF
- The CG in CGIF formlexicon
- The lexicon in use during the parsing
java.lang.Exception
- if problems occur during the parsing
ParsingException
public static CG parse(java.lang.String cgInString, Lexicon lexicon) throws ParsingException
cgInString
- A textual formulation of a CG that could be in a LF or in CGIFlexicon
- The lexicon in use during the parsing
ParsingException
public static byte determineCGForm(java.lang.String cgInString) throws ParsingException
cgInString
- A textual formulation of a CG that could be in a LF or in CGIF
ParsingException
public java.lang.Object match(byte matchOperation, BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
match
in interface Matching
matchOperation
- A byte value that specifies which kind of matching to applybindContext
- The binding contextbindInf
- The binding information for the current CGobj
- The object to match with the current CGbindInfObj
- The binding information for the parameter obj
public ResMatchCG match(byte matchOperation, BindingContext bindContext, java.lang.Object bindInf, java.lang.Object entryConcept1, java.lang.Object bindInfEntry1, java.lang.Object obj, java.lang.Object bindInfObj, java.lang.Object entryConcept2, java.lang.Object bindInfEntry2)
public java.lang.Object match(byte matchOperation, java.lang.Object obj)
match
in interface Matching
matchOperation
- A byte value that specifies which kind of matching to applyobj
- The object to match with the current CG
public ResMatchCG match(byte matchOperation, Concept entryConcept1, CG cg, Concept entryConcept2)
public ResMatchCG match(byte matchOperation, Concept entryConcept1, Concept concept, Concept entryConcept2)
public boolean equal(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
equal
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current CGobj
- The object to check the equality with the current CGbindInfObj
- The binding information for the parameter obj
public boolean equal(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object entryConcept1, java.lang.Object bindInfEntry1, java.lang.Object obj, java.lang.Object bindInfObj, java.lang.Object entryConcept2, java.lang.Object bindInfEntry2)
public boolean equal(Concept e1, CG cg, Concept e2)
e1
- Concept: entry concept for this CGcg
- CGe2
- Concept: entry concept for cg
public boolean equal(java.lang.Object obj)
equal
in interface Matching
obj
- The object to check the equality with the current CG
public boolean unify(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
unify
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to unify with the current objectbindInfObj
- The binding information for the parameter obj
public boolean unify(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object entryConcept1, java.lang.Object bindInfEntry1, java.lang.Object obj, java.lang.Object bindInfObj, java.lang.Object entryConcept2, java.lang.Object bindInfEntry2)
public boolean unify(java.lang.Object obj)
public boolean subsume(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
subsume
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current CGobj
- The object to check its subsumption by the current objectbindInfObj
- The binding information for the parameter obj
public boolean subsume(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object entryConcept1, java.lang.Object bindInfEntry1, java.lang.Object obj, java.lang.Object bindInfObj, java.lang.Object entryConcept2, java.lang.Object bindInfEntry2)
public boolean subsume(Concept e1, CG cg, Concept e2)
e1
- Concept: entry concept for this CGcg
- CGe2
- Concept: entry concept for cg
public boolean subsume(java.lang.Object obj)
subsume
in interface Matching
obj
- The object to check its subsumption by the current object
public java.lang.Object subsumeWithResult(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
subsumeWithResult
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to check its subsumption by the current objectbindInfObj
- The binding information for the parameter obj
public ResMatchCG subsumeWithResult(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object entryConcept1, java.lang.Object bindInfEntry1, java.lang.Object obj, java.lang.Object bindInfObj, java.lang.Object entryConcept2, java.lang.Object bindInfEntry2)
public java.lang.Object subsumeWithResult(java.lang.Object obj)
subsumeWithResult
in interface Matching
obj
- The object to check its subsumption by the current object
public java.lang.Object maximalJoin(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
maximalJoin
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to join with the current objectbindInfObj
- The binding information for the parameter obj
public ResMatchCG maximalJoin(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object entryConcept1, java.lang.Object bindInfEntry1, java.lang.Object obj, java.lang.Object bindInfObj, java.lang.Object entryConcept2, java.lang.Object bindInfEntry2)
public ResMatchCG maximalJoin(Concept e1, CG cg, Concept e2)
e1
- Concept: entry concept for this CGcg
- CGe2
- Concept: entry concept for cg
public java.lang.Object maximalJoin(java.lang.Object obj)
maximalJoin
in interface Matching
obj
- The object to join with the current object
public boolean specialize(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to join to the current objectbindInfObj
- The binding information for the parameter obj
public boolean specialize(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object entryConcept1, java.lang.Object bindInfEntry1, java.lang.Object obj, java.lang.Object bindInfObj, java.lang.Object entryConcept2, java.lang.Object bindInfEntry2)
public boolean specialize(java.lang.Object obj)
obj
- The object to join to the current objectpublic boolean specializeByExpansion(BindingContext bindContext, java.lang.Object bindInf, Concept concept)
bindContext
- The Binding ContextbindInf
- The bindinf information related to the current CGconcept
- The Concept in the current CG that contains the type to expand
public boolean specializeByExpansion(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object objConcept, java.lang.Object bindInfObj)
public boolean specializeByExpansion(Concept concept)
concept
- The Concept in the current CG that contains the type to expand
public boolean contractTypeDefinition(BindingContext bindContext, java.lang.Object bindInf, Concept concept, Type type)
bindContext
- The Binding Context for the current CGbindInf
- Binding information for current CGconcept
- A concept that should be contained in the current CGtype
- A type that should replace the contracted definition
public boolean contractTypeDefinition(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object objConcept, java.lang.Object bindInfObj1, java.lang.Object objType, java.lang.Object bindInfObj2)
bindContext
- The Binding Context for the current CGbindInf
- Binding information for current CGobjConcept
- An Object that could be a concept or a variable with concept as valuebindInfObj1
- Binding information for objConceptobjType
- An Object that could be a Type or a variable with Type as valuebindInfObj2
- Binding information for objType
public boolean contractTypeDefinition(Concept concept, Type type)
concept
- A concept that should be contained in the current CGtype
- A type that should replace the contracted definition
public boolean contractTypeDefinition(Type type)
type
- A type that should replace the contracted definition
public boolean contractTypeDefinition(BindingContext bindContext, java.lang.Object bindInf, Concept concept)
concept
- A concept that should be contained in the current CG
public boolean contractTypeDefinition(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
bindContext
- A BindingContextbindInf
- Binding information for the current CGbindInfObj
- Binding information for objConcept
public boolean contractTypeDefinition(Concept concept)
concept
- A concept that should be contained in the current CG
public java.lang.Object generalize(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
generalize
in interface Matching
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to generalize with the current objectbindInfObj
- The binding information for the parameter obj
public ResMatchCG generalize(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object entryConcept1, java.lang.Object bindInfEntry1, java.lang.Object obj, java.lang.Object bindInfObj, java.lang.Object entryConcept2, java.lang.Object bindInfEntry2)
public ResMatchCG generalize(Concept e1, CG cg, Concept e2)
e1
- Concept: entry concept for this CGcg
- CGe2
- Concept: entry concept for cg
public java.lang.Object generalize(java.lang.Object obj)
generalize
in interface Matching
obj
- The object to generalize with the current object
public CG generalize(Type pertinentType1, CG g2, Type pertinentType2)
public boolean generalise(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to generalize to the current objectbindInfObj
- The binding information for the parameter objpublic boolean generalise(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object entryConcept1, java.lang.Object bindInfEntry1, java.lang.Object obj, java.lang.Object bindInfObj, java.lang.Object entryConcept2, java.lang.Object bindInfEntry2)
public boolean generalise(java.lang.Object obj)
obj
- The object to generalize with the current objectpublic void analogy(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The sourcebindInfObj
- The binding information for the parameter objpublic void analogy(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object entryConcept1, java.lang.Object bindInfEntry1, java.lang.Object obj, java.lang.Object bindInfObj, java.lang.Object entryConcept2, java.lang.Object bindInfEntry2)
bindContext
- The binding contextbindInf
- The binding information for the current objectentryConcept1
- A Concept in the current CG used as an entry pointbindInfEntry1
- The binding information for the parameter entryConcept1obj
- The sourcebindInfObj
- The binding information for the parameter objentryConcept2
- A Concept in obj used as an entry pointbindInfEntry2
- The binding information for the parameter obj entryConcept2public void analogy(Concept e1, CG cg, Concept e2)
e1
- Concept: entry concept for this CGcg
- CGe2
- Concept: entry concept for cgpublic void analogy(java.lang.Object obj)
obj
- The CG that represents the source
public CompareCGResult compare(Concept entryPoint1, CG cg2, Concept entryPoint2)
- the two CG are equal if: the matched concepts are equal, the same number of concepts
and the same number of relations (and all the relations have been matched).
- else, newCG is more general than G2 if: the number of concepts of newCG is equal to
the number of matched concepts, and the number of relations of newCG is equal to the number of matched relations, and the matched concepts are equals to the corresponding concepts in newCG.
- else, newCG is more specific than G2 if: the number of concepts of currentCG is equal to
the number of matched concepts, and the number of relations of currentCG is equal to the number of matched relations, and the matched concepts are equals to the corresponding concepts in currentCG.
- else, newCG and currentCG have common information if the result of the generalization is not null and it doesn't correspond to the specified fatherOntNode or to its description.
- else, newCG and currentCG are incomparable.
entryPoint1
- Entry concept for the current CG. entryPoint1 is a (and should be) concept in
the current CGcg2
- a CG to compare with the current CGentryPoint2
- Entry concept for cg2. entryPoint2 is a (and should be) concept in cg2
java.lang.Exception
- if some problems occur during the comparisonpublic java.util.Enumeration coveredBy(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
bindContext
- The binding contextbindInf
- The binding information for the current objectobj
- The object to consider with the current objectbindInfObj
- The binding information for the parameter obj
public java.util.Enumeration coveredBy(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object entryConcept1, java.lang.Object bindInfEntry1, java.lang.Object obj, java.lang.Object bindInfObj, java.lang.Object entryConcept2, java.lang.Object bindInfEntry2)
bindContext
- The binding contextbindInf
- The binding information for the current objectentryConcept1
- A Concept in the current CG used as an entry pointbindInfEntry1
- The binding information for the parameter entryConcept1obj
- The object to consider with the current objectbindInfObj
- The binding information for the parameter objentryConcept2
- A Concept in obj used as an entry pointbindInfEntry2
- The binding information for the parameter obj entryConcept2
public java.util.Enumeration coveredBy(java.lang.Object obj)
obj
- The object to consider should be a CG
public boolean isCanonic(BindingContext bindContext, java.lang.Object bindInf)
bindContext
- The binding contextbindInf
- The binding information for the current CG
public boolean isCanonic()
public CG expand(BindingContext bindContext, java.lang.Object bindInf, Concept conc)
bindContext
- The binding contextbindInf
- The binding information for the current CGconc
- The concept in the current CG that should be expanded
public CG expand(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object objConceptOrRelation, java.lang.Object bindInfObj)
public CG expand(Concept conc)
conc
- The concept in the current CG that should be expanded
public CG expand(BindingContext bindContext, java.lang.Object bindInf, Relation rel)
bindContext
- The binding contextbindInf
- The binding information for the current CGrel
- The relation in the current CG that should be expanded
public CG expand(Relation rel)
rel
- The relation in the current CG that should be expanded
public AmineList getConceptTypes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |