aminePlatform.util.cg
Class Concept

java.lang.Object
  extended byaminePlatform.util.cg.Concept
All Implemented Interfaces:
AmineConstants, AmineObject, Matching, Node, java.io.Serializable, ToString

public class Concept
extends java.lang.Object
implements AmineConstants, java.io.Serializable, AmineObject, Matching, Node

Title: util.cg.Concept Class

Description: A Concept is composed of a type, a designator with an optional coreferent, a descriptor, a state (used in the context of Synergy Language) and a point (in the case of graphic display). Concept type is either a variable or a reference to a Type CS contained in the current ontology. Concept designator is either null, a variable, a reference to an Individual CS contained in the current ontology, a Designator Set (set of Individual) or a pseudo-designator. A coreferent, if specified, is a variable. Concept descriptor is either null, a variable, a CS, any Amine Object (AmineBoolean, AmineInteger, AmineDouble, Identifier, String, Boolean, Integer, Double, AmineSet, AmineList, Term, Concept, CG), any Java Object that implements AmineObject and Matching interfaces or even any Java Object. Only the type is mandatory in the specification of a concept, the other components are optional.

Copyright : Copyright (c) Adil KABBAJ 2004-2009

See Also:
Serialized Form

Field Summary
 
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
Concept(java.lang.Object type)
          Create a concept given its type only.
Concept(java.lang.Object type, java.lang.Object designator)
          Create a concept given its type and designator.
Concept(java.lang.Object type, java.lang.Object designator, java.lang.Object descriptor)
          Create a concept given its type, designator and descriptor.
Concept(java.lang.Object type, java.lang.Object designator, Variable coreferent, java.lang.Object descriptor)
          Create a concept given its type, designator, coreferent and descriptor.
Concept(java.lang.Object type, java.lang.Object designator, Variable coreferent, java.lang.Object descriptor, java.awt.Point leftTopPoint)
          The general specification of the concept constructor.
 
Method Summary
 void addIncomeEdge(Edge edge)
           
 boolean addIncomeRelation(Relation relation)
          Add the specified relation to the attribute incomeRelations of the current concept.
 void addOutcomeEdge(Edge edge)
           
 boolean addOutcomeRelation(Relation relation)
          Add the specified relation to the attribute outcomeRelations of the current concept.
(package private)  void analogDesignator(BindingContext bindContext, java.lang.Object bindInf, Concept conc2, java.lang.Object bindInf2, CGOperations cgOperations)
           
static boolean canBeDesignator(java.lang.Object designator)
          Check if designator can be a concept designator (it could be null or an Individual CS or a set of Individuals or a variable or a pseudo-designator), without the test of conformity between a concept type and the designator.
static boolean canBeDesignator(java.lang.Object designator, java.lang.Object type)
          Check if designator can be a designator (i.e. it can be null, an Individual CS, a set of Individuals, a variable or a pseudo-designator), taking into account the conformity test between the designator and the specified type.
static boolean canBeState(byte s)
          Check if the specified byte s can be a state of the current concept.
static boolean canBeType(java.lang.Object type)
          Check if type can be a type for a concept : it should be either a Type CS or a variable or a composed type or a predicate (a Term).
 void clear()
          This method should be used with care since it will destroy the structures that could be included in the concept, like a DesignatorSet or any descriptor.
 void clearIncomeRelations()
          Clear the ArrayList incomeRelations of the current concept and set it to null.
 void clearOutcomeRelations()
          Clear the ArrayList outcomeRelations of the current concept and set it to null.
 java.lang.Object clone()
          Return a deep copy of the current concept.
 java.lang.Object clone(BindingContext bindContext, java.lang.Object bindInf)
          This method is equivalent to copy(bindContext, bindInf).
 Concept copy()
          Performs a deep copy of the current concept.
 Concept copy(BindingContext bindContext, java.lang.Object bindInf)
          Perform a deep copy of the current concept, the relations related to the concept are concerned by this copy; the new concept will have no income and no outcome relations.
 Concept copy(BindingContext bindContext, java.lang.Object bindInf, CorefMatchList corefMatchL, int indx)
           
 Variable copyCoreferent()
          Copy the coreferent of the current concept (if it has).
 Variable copyCoreferent(CorefMatchList corefMatchL, int indx)
           
 java.lang.Object copyDescriptor(BindingContext bindContext, java.lang.Object bindInf)
          Copy the descriptor of the current concept.
 java.lang.Object copyDescriptor(BindingContext bindContext, java.lang.Object bindInf, CorefMatchList corefMatchL, int indx)
           
 java.lang.Object copyDesignator(BindingContext bindContext, java.lang.Object bindInf)
          Copy the designator of the current concept.
static java.lang.Object copyDesignator(BindingContext bindContext, java.lang.Object designator, java.lang.Object bindInf)
          This method is the static variant of the method copyDesignator(bindContext, bindInf).
 Node copyNode()
           
 java.awt.Point copyPoint()
          Copy the position of the current concept (if it has).
 java.lang.Object copyType(BindingContext bindContext, java.lang.Object bindInf)
          Return the type of the current concept (or its value if the type is a variable and variable binding is considered) which is a Type CS.
static java.lang.Object copyType(BindingContext bindContext, java.lang.Object type, java.lang.Object bindInf)
          This method is the static variant of the method copyType(bindContext, bindInf).
 boolean eqDesignator(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object designator2, java.lang.Object bindInfDsgn)
          Test if two concept designators are equal.
 boolean eqType(BindingContext bindContext, java.lang.Object bindInfType1, java.lang.Object type2, java.lang.Object bindInfType2)
          Test if two concept types are equal.
 boolean equal(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
          Check that the current object is equal with the specified object obj.
 boolean equal(java.lang.Object obj)
          Check that the current object is equal with the specified object obj.
 void finalize()
          Finalize the current concept.
 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.
 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.
 java.util.ArrayList getAdjacentNodes()
           
 java.lang.Object[] getArrayIncomeRelations()
          Get the incomeRelations of the current concept in an array
 java.lang.Object[] getArrayOutcomeRelations()
          Get the outcomeRelations of the current concept in an array
 Variable getCoreferent()
          Get the coreferent of the current concept
 java.lang.Object getDescriptor()
          Get the descriptor of the current concept
 java.lang.Object getDesignator()
          Get the designator of the current concept
 java.util.Enumeration getEdges()
           
 java.util.Enumeration getIncomeEdges()
           
 java.util.Enumeration getIncomeRelations()
          Get an Enumeration over the incomeRelations of the current concept
 java.awt.Point getLeftTopPoint()
          Get the left-top point of the rectangle that represents the current concept
 int getNbrIncomeRels()
          Get the number of income relations of the current concept
 int getNbrOutcomeRels()
          Get the number of outcome relations of the current concept
 int getNbrRelations()
          Get the number of income and outcome relations of the current concept
 java.util.Enumeration getOutcomeEdges()
           
 java.util.Enumeration getOutcomeRelations()
          Get an Enumeration over the outcomeRelations of the current concept
 java.lang.String getParameter()
          If the current concept is a parameter, this method will return its parameter attribute; a String of the form inNBR or outNBR.
 java.util.Enumeration getRelations()
          Get an Enumeration over all the income and outcome relations of the current concept.
 byte getState()
          Get the state of the current concept
 java.lang.Object getType()
          Get the type of the current concept
 void getVariables(java.util.ArrayList varsIdent)
          This method adds in the specified varsIdent all the variables used in the current Concept.
 boolean hasBoundCoreferent()
          This method returns true if the concept has a coreferent that starts with "?"
 boolean hasContentToDisplay()
          Check if the current concept is a context : if its descriptor is a CG
 boolean hasDefinitionalCoreferent()
          This method returns true if the concept has a coreferent that starts with "*"
static boolean isConcept(java.lang.Object obj)
          Check if the specified Object obj is a Concept.
static boolean isConform(BindingContext bindContext, java.lang.Object designator, java.lang.Object bindInfDsgn, java.lang.Object type, java.lang.Object bindInfType)
          Check if the specified designator is conform to the specified type.
 boolean isConnected()
          A concept is connected if it has at least an income relation or an outcome relation
 boolean isContext()
          Check if the current concept is a context : if its descriptor is a CG or a Context CS
 CG isContext(BindingContext bindContext, java.lang.Object bindInf)
          Check if the current concept is a context; if its descriptor is a CG or a Context CS.
static boolean isCoreferent(java.lang.Object x)
           
static boolean isDesignatorSource(java.lang.Object designator)
          Check if designator corresponds to a variable with the special name "source"
static boolean isDesignatorSuper(java.lang.Object designator)
          Check if designator corresponds to a variable with the special name "super"
static boolean isDesignatorTarget(java.lang.Object designator)
          Check if designator corresponds to a variable with the special name "target"
static boolean isDesignatorThis(java.lang.Object designator)
          Check if designator corresponds to a variable with the special name "this"
 boolean isIncomeRelation(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object relType, java.lang.Object bindInfType)
          Check if the current concept has an income relation with the specified relType.
 boolean isIncomeRelation(java.lang.Object relType)
          Check if the current concept has an income relation with the specified relType.
 boolean isIncomeRelation(java.lang.Object relType, java.lang.String suffix)
          Similar to the monadic definition, except that we consider the suffix of the two relations.
 boolean isIncomeRelation(Relation relation)
          Check if the current concept has the specified relation as an income relation.
 boolean isOutcomeRelation(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object relType, java.lang.Object bindInfType)
          Check if the current concept has an outcome relation with the specified relType.
 boolean isOutcomeRelation(java.lang.Object relType)
          Check if the current concept has an outcome relation with the specified relType.
 boolean isOutcomeRelation(java.lang.Object relType, java.lang.String suffix)
          Similar to the monadic definition, except that we consider the suffix of the two relations.
 boolean isOutcomeRelation(Relation relation)
          Check if the current concept has the specified relation as an outcome relation.
 boolean isParameter()
          Check if the current concept is a parameter (in a CG that represents the description of an operation with parameters, as in the context of SYNERGY).
static boolean isPseudoDesignator(java.lang.Object designator)
          Check if designator corresponds to a pseudoDesignator : if the designator is a String
 java.lang.Object match(byte matchOperation, BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
          Match the current object with the specified object obj, according to the value of the parameter matchOperation.
 java.lang.Object match(byte matchOperation, BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj, CGOperations cgOperations)
          Match the current object with the specified object obj, according to the value of the parameter matchOperation.
 java.lang.Object match(byte matchOperation, java.lang.Object obj)
          Match the current object with the specified object obj, according to the value of the parameter matchOperation.
(package private)  boolean matchCoref(byte matchOperation, Concept conc2, Concept conc3, CGOperations cgOperations)
           
(package private)  boolean matchDescriptor(byte matchOperation, BindingContext bindContext, java.lang.Object bindInf1, java.lang.Object descr2, java.lang.Object bindInfDescr2, Concept conc3, CGOperations cgOperations)
           
(package private)  boolean matchDesignator(byte matchOperation, BindingContext bindContext, java.lang.Object bindInf1, java.lang.Object dsgntr2, java.lang.Object bindInf2, Concept conc3)
           
(package private)  boolean matchType(byte matchOperation, BindingContext bindContext, java.lang.Object bindInf, java.lang.Object type2, java.lang.Object bindInf2, Concept conc3)
           
(package private)  boolean matchTypeDesignator(byte matchOperation, BindingContext bindContext, java.lang.Object bindInf1, Concept conc2, java.lang.Object bindInf2, Concept conc3)
           
 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.
 java.lang.Object maximalJoin(java.lang.Object obj)
          Perform a maximal join of the current object with the specified object obj.
static Concept parse(java.lang.String strgConc, Lexicon lexicon)
          Parse the textual formulation of a Concept (parameter strgConc) using the specified lexicon and produce its internal representation.
 boolean removeIncomeRelation(Relation relation)
          Remove the specified relation from the incomeRelations of the current concept.
 void removeIncomeRelations()
          Remove from the CG all the incomeRelations of the current concept.
 boolean removeOutcomeRelation(Relation relation)
          Remove the specified relation from the outcomeRelations of the current concept.
 void removeOutcomeRelations()
          Remove from the CG all the outcomeRelations of the current concept.
 void setCoreferent(Variable coreferent)
          Set the specified coreferent as the coreferent for the current concept.
 void setDescriptor(java.lang.Object descriptor)
          Set the specified descriptor as the descriptor of the current concept
 boolean setDesignator(java.lang.Object designator)
          Set the specified designator as the designator of the current concept if designator can be a designator and it is conform with the type of the current concept.
 void setIncomeEdges(java.util.ArrayList edges)
           
 boolean setIncomeRelations(java.util.ArrayList relations)
          Set the specified ArrayList as the value for the attribute incomeRelations of the current concept.
 void setLeftTopPoint(java.awt.Point leftTopPoint)
          Set the specified point (leftTopPoint) as the left-top point of the rectangle that represents the current concept
 void setOutcomeEdges(java.util.ArrayList edges)
           
 boolean setOutcomeRelations(java.util.ArrayList relations)
          Set the specified ArrayList as the value for the attribute outcomeRelations of the current concept.
 void setParameter(java.lang.String parameter)
          If the current concept is a parameter, this method will set its parameter attribute; a String of the form inNBR or outNBR.
 void setRectangle(java.awt.Rectangle rectangle)
           
 boolean setState(byte state)
          Set the specified state as the state of the current concept if it can be a concept state.
 boolean setType(java.lang.Object type)
          Set a type to the current concept.
 boolean subsume(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.
 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.
 java.lang.Object subsumeWithResult(java.lang.Object obj)
          Check that the current object subsumes (is more general than) the specified object obj.
 CG toCG()
           
 java.lang.String toCGIF(BindingContext bindContext, java.lang.Object bindInf, Lexicon lexicon)
          This method returns the CGIF form of the current concept.
 java.lang.String toCGIF(Lexicon lexicon)
          This method is similar to toLF() excepts that it returns the textualization of the current concept in a CGIF form.
 java.lang.String toDisplayString(Lexicon lexicon)
           
 java.lang.String toLF(BindingContext bindContext, java.lang.Object bindInf, Lexicon lexicon)
          This method returns the LF of the current concept.
 java.lang.String toLF(Lexicon lexicon)
          Give the textual formulation, in LF, for the current concept.
 java.lang.String toString(BindingContext bindContext, java.lang.Object bindInf, Lexicon lexicon)
          By default, the textualization of a concept will be in Linear Form.
 java.lang.String toString(Lexicon lexicon)
          By default, the textualization of a concept will be in Linear Form.
 void trimToSize()
          Optimize the storage of a concept
 boolean unify(BindingContext bindContext, java.lang.Object bindInf, java.lang.Object obj, java.lang.Object bindInfObj)
          Unify the current object with the specified object obj.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Concept

public Concept(java.lang.Object type,
               java.lang.Object designator,
               Variable coreferent,
               java.lang.Object descriptor,
               java.awt.Point leftTopPoint)
        throws ConceptException
The general specification of the concept constructor. Other variants of Concept constructors are provided below, according to what fields are specified.

Parameters:
type - The type of the concept. It should not be null.
designator - The designator of the concept. It can be null.
coreferent - The coreferent of the concept. It can be null.
descriptor - The descriptor of the concept. It can be null.
leftTopPoint - The left top point of the position of the concept. It can be null and it is used for graphic treatement only.
Throws:
Throws - ConceptException if one of the concept components is not valid
ConceptException

Concept

public Concept(java.lang.Object type)
        throws ConceptException
Create a concept given its type only.

Throws:
: - throws ConceptException if type is null
ConceptException

Concept

public Concept(java.lang.Object type,
               java.lang.Object designator)
        throws ConceptException
Create a concept given its type and designator.

Throws:
: - throws ConceptException if type is null
ConceptException

Concept

public Concept(java.lang.Object type,
               java.lang.Object designator,
               java.lang.Object descriptor)
        throws ConceptException
Create a concept given its type, designator and descriptor.

Throws:
: - throws ConceptException if type is null
ConceptException

Concept

public Concept(java.lang.Object type,
               java.lang.Object designator,
               Variable coreferent,
               java.lang.Object descriptor)
        throws ConceptException
Create a concept given its type, designator, coreferent and descriptor.

Throws:
: - throws ConceptException if type is null
ConceptException
Method Detail

finalize

public void finalize()
Finalize the current concept. Finalize performs a "weak" destruction: it will not destroy the structures that could be included in the concept, like a DesignatorSet or any descriptor structure because those structures could be shared with other structures (in the context of Prolog+CG for instance). Use the method clear() for a "strong" destruction of the concept content. Note also that all the relations that are linked to this concept are removed from the CG.

Specified by:
finalize in interface AmineObject

clear

public void clear()
This method should be used with care since it will destroy the structures that could be included in the concept, like a DesignatorSet or any descriptor. Such a destruction could be safe if the structures are not shared. Use however a "weak" destruction, via the method finalize(), if the structures are shared. Note also that clear concerns only the concept (its attributes) not the relations that could be linked to it, those relations remain as they are.

Specified by:
clear in interface AmineObject

isConcept

public static boolean isConcept(java.lang.Object obj)
Check if the specified Object obj is a Concept.

Parameters:
obj - An object
Returns:
true if obj is a Concept

clone

public java.lang.Object clone()
Return a deep copy of the current concept.

Specified by:
clone in interface AmineObject
Returns:
a deep copy of the current concept

clone

public java.lang.Object clone(BindingContext bindContext,
                              java.lang.Object bindInf)
This method is equivalent to copy(bindContext, bindInf). The copy is a deep copy but it concerns the current concept only, not its associated relations. Also, this clone() method considers the presence of variables and their binding.

Specified by:
clone in interface AmineObject
Parameters:
bindContext - The Binding context
bindInf - The binding information related to the binding context and the current concept
Returns:
a clone of the current concept

copy

public Concept copy()
Performs a deep copy of the current concept. This copy() is a special case of the method copy(bindingContext, bindInf) which takes into account the binding of variables that could occur in the current concept.

Returns:
a copy of the current concept

copyNode

public Node copyNode()
Specified by:
copyNode in interface Node

copy

public Concept copy(BindingContext bindContext,
                    java.lang.Object bindInf)
Perform a deep copy of the current concept, the relations related to the concept are concerned by this copy; the new concept will have no income and no outcome relations. The copy considers the presence of variables and their binding: the copy will concern the variable's value too.

Parameters:
bindContext - The Binding context
bindInf - The binding information related to the binding context and the current concept
Returns:
a copy of the current concept. Return null if concept is null.

copy

public Concept copy(BindingContext bindContext,
                    java.lang.Object bindInf,
                    CorefMatchList corefMatchL,
                    int indx)

copyType

public java.lang.Object copyType(BindingContext bindContext,
                                 java.lang.Object bindInf)
Return the type of the current concept (or its value if the type is a variable and variable binding is considered) which is a Type CS.

Parameters:
bindContext - The Binding context
bindInf - The binding information related to the binding context and the current concept
Returns:
the concept type

copyType

public static java.lang.Object copyType(BindingContext bindContext,
                                        java.lang.Object type,
                                        java.lang.Object bindInf)
This method is the static variant of the method copyType(bindContext, bindInf).

Parameters:
bindContext - The Binding context
type - a Concept type which could be a Type CS or a Variable
bindInf - The binding information related to the binding context and the type
Returns:
a concept Type

copyDesignator

public java.lang.Object copyDesignator(BindingContext bindContext,
                                       java.lang.Object bindInf)
Copy the designator of the current concept. If the designator is an individual (i.e. an Individual CS) then it is returned as such, if the designator is a AmineSet of Individuals, a shallow copy is done of the set. If the designator is a Variable and variable binding is considered, the copy will concern the value of the variable.

Parameters:
bindContext - The Binding context
bindInf - The binding information related to the binding context and the current concept
Returns:
a copy of the designator of the current concept

copyDesignator

public static java.lang.Object copyDesignator(BindingContext bindContext,
                                              java.lang.Object designator,
                                              java.lang.Object bindInf)
This method is the static variant of the method copyDesignator(bindContext, bindInf).

Parameters:
bindContext - The Binding context
designator - a Concept designator
bindInf - The binding information related to the binding context and the current concept
Returns:
a copy of designator

copyCoreferent

public Variable copyCoreferent()
Copy the coreferent of the current concept (if it has).

Returns:
a copy of the coreferent .

copyCoreferent

public Variable copyCoreferent(CorefMatchList corefMatchL,
                               int indx)

copyDescriptor

public java.lang.Object copyDescriptor(BindingContext bindContext,
                                       java.lang.Object bindInf)
Copy the descriptor of the current concept. The method calls the static method clone() of the class AmineObjects

Parameters:
bindContext - The Binding context
bindInf - The binding information related to the binding context and the current concept
Returns:
a copy of the specified concept descriptor.

copyDescriptor

public java.lang.Object copyDescriptor(BindingContext bindContext,
                                       java.lang.Object bindInf,
                                       CorefMatchList corefMatchL,
                                       int indx)

copyPoint

public java.awt.Point copyPoint()
Copy the position of the current concept (if it has).

Returns:
a copy of position

canBeType

public static boolean canBeType(java.lang.Object type)
Check if type can be a type for a concept : it should be either a Type CS or a variable or a composed type or a predicate (a Term). Note that a concept type could be a relation type (if the topic is on a relation type; in the context of a meta-description).

Parameters:
type - An Object
Returns:
true if the type is not null and it is a Type CS or a variable or a composed type or a predicate

canBeDesignator

public static boolean canBeDesignator(java.lang.Object designator,
                                      java.lang.Object type)
Check if designator can be a designator (i.e. it can be null, an Individual CS, a set of Individuals, a variable or a pseudo-designator), taking into account the conformity test between the designator and the specified type. If the type or the designator is a variable, the test does not consider variable binding.

Parameters:
designator - An Object that could be a concept designator
type - An object that should be a concept type
Returns:
true if designator can be a concept designator and is conform to type.

canBeDesignator

public static boolean canBeDesignator(java.lang.Object designator)
Check if designator can be a concept designator (it could be null or an Individual CS or a set of Individuals or a variable or a pseudo-designator), without the test of conformity between a concept type and the designator.

Parameters:
designator - : an Object
Returns:
true if designator can be a designator.

isConform

public static boolean isConform(BindingContext bindContext,
                                java.lang.Object designator,
                                java.lang.Object bindInfDsgn,
                                java.lang.Object type,
                                java.lang.Object bindInfType)
Check if the specified designator is conform to the specified type. This method extends the method isConform() of the class ontology.Individual since it considers the case where the type and/or the designator are variables.

Parameters:
bindContext - The Binding context
designator - a Concept designator
bindInfDsgn - The binding information related to the binding context and to designator
type - An Object that could be a Variable or a Type CS.
bindInfType - The binding information related to the binding context and to type
Returns:
true if designator is conform to type, return false otherwise.

isDesignatorSuper

public static boolean isDesignatorSuper(java.lang.Object designator)
Check if designator corresponds to a variable with the special name "super"

Parameters:
designator - An Object
Returns:
true if designator corresponds to a variable with the special name "super"

isDesignatorThis

public static boolean isDesignatorThis(java.lang.Object designator)
Check if designator corresponds to a variable with the special name "this"

Parameters:
designator - An Object
Returns:
true if designator corresponds to a variable with the special name "this"

isDesignatorSource

public static boolean isDesignatorSource(java.lang.Object designator)
Check if designator corresponds to a variable with the special name "source"

Parameters:
designator - An Object
Returns:
true if designator corresponds to a variable with the special name "source"

isDesignatorTarget

public static boolean isDesignatorTarget(java.lang.Object designator)
Check if designator corresponds to a variable with the special name "target"

Parameters:
designator - An Object
Returns:
true if designator corresponds to a variable with the special name "target"

isPseudoDesignator

public static boolean isPseudoDesignator(java.lang.Object designator)
Check if designator corresponds to a pseudoDesignator : if the designator is a String

Parameters:
designator - An Object
Returns:
true if designator corresponds to a pseudoDesignator

isConnected

public boolean isConnected()
A concept is connected if it has at least an income relation or an outcome relation

Returns:
true if the concept is connected

isContext

public boolean isContext()
Check if the current concept is a context : if its descriptor is a CG or a Context CS

Returns:
true if current concept is a context

isContext

public CG isContext(BindingContext bindContext,
                    java.lang.Object bindInf)
Check if the current concept is a context; if its descriptor is a CG or a Context CS. This variant considers binding context and resolution.

Parameters:
bindContext - The binding context for the current concept
bindInf - The binding informatin for the current concept
Returns:
the embeeded CG if the current concept is a context and returns null otherwise

hasContentToDisplay

public boolean hasContentToDisplay()
Check if the current concept is a context : if its descriptor is a CG

Specified by:
hasContentToDisplay in interface Node
Returns:
true if current concept is a context

getType

public java.lang.Object getType()
Get the type of the current concept

Returns:
the type of the current concept

setType

public boolean setType(java.lang.Object type)
Set a type to the current concept. The method checks first that the type can be a concept type (this method calls canBeType() to do the check).

Returns:
true if type can be a concept type

getDesignator

public java.lang.Object getDesignator()
Get the designator of the current concept

Returns:
the designator of the current concept

setDesignator

public boolean setDesignator(java.lang.Object designator)
Set the specified designator as the designator of the current concept if designator can be a designator and it is conform with the type of the current concept.

Parameters:
designator - An object
Returns:
true if designator can be a designator for the current concept

isCoreferent

public static boolean isCoreferent(java.lang.Object x)

isParameter

public boolean isParameter()
Check if the current concept is a parameter (in a CG that represents the description of an operation with parameters, as in the context of SYNERGY).

Returns:
true if the current concept is a parameter

getParameter

public java.lang.String getParameter()
If the current concept is a parameter, this method will return its parameter attribute; a String of the form inNBR or outNBR.

Returns:
the parameter attribute of the current concept if this one is a parameter, else return null.

setParameter

public void setParameter(java.lang.String parameter)
If the current concept is a parameter, this method will set its parameter attribute; a String of the form inNBR or outNBR.


getCoreferent

public Variable getCoreferent()
Get the coreferent of the current concept

Returns:
the coreferent of the current concept. Return null if the concept has no coreferent.

setCoreferent

public void setCoreferent(Variable coreferent)
Set the specified coreferent as the coreferent for the current concept.

Parameters:
coreferent - A variable

hasDefinitionalCoreferent

public boolean hasDefinitionalCoreferent()
This method returns true if the concept has a coreferent that starts with "*"

Returns:
boolean

hasBoundCoreferent

public boolean hasBoundCoreferent()
This method returns true if the concept has a coreferent that starts with "?"

Returns:
boolean

getDescriptor

public java.lang.Object getDescriptor()
Get the descriptor of the current concept

Returns:
the descriptor of the current concept

setDescriptor

public void setDescriptor(java.lang.Object descriptor)
Set the specified descriptor as the descriptor of the current concept

Parameters:
descriptor - An object

getState

public byte getState()
Get the state of the current concept

Returns:
the state of the current concept

setState

public boolean setState(byte state)
Set the specified state as the state of the current concept if it can be a concept state.

Parameters:
state - A byte that could represent the state of the current concept

canBeState

public static boolean canBeState(byte s)
Check if the specified byte s can be a state of the current concept.

Parameters:
s - A byte that could represent a possible concept state
Returns:
true if s can be a state

getLeftTopPoint

public java.awt.Point getLeftTopPoint()
Get the left-top point of the rectangle that represents the current concept

Specified by:
getLeftTopPoint in interface Node
Returns:
the left-top point of the rectangle that represents the current concept

setLeftTopPoint

public void setLeftTopPoint(java.awt.Point leftTopPoint)
Set the specified point (leftTopPoint) as the left-top point of the rectangle that represents the current concept

Specified by:
setLeftTopPoint in interface Node
Parameters:
leftTopPoint - A point that represents the left-top position of the rectangle that represents the current concept

setRectangle

public void setRectangle(java.awt.Rectangle rectangle)
Specified by:
setRectangle in interface Node

getIncomeRelations

public java.util.Enumeration getIncomeRelations()
Get an Enumeration over the incomeRelations of the current concept

Returns:
an Enumeration over the incomeRelations (an ArrayList of Relation) of the current concept.

getIncomeEdges

public java.util.Enumeration getIncomeEdges()
Specified by:
getIncomeEdges in interface Node

getArrayIncomeRelations

public java.lang.Object[] getArrayIncomeRelations()
Get the incomeRelations of the current concept in an array

Returns:
the incomeRelations of the current concept in an array

setIncomeRelations

public boolean setIncomeRelations(java.util.ArrayList relations)
Set the specified ArrayList as the value for the attribute incomeRelations of the current concept. If this later has already a content, it is destroyed first. The method checks first that all the elements of relations are Relation indeed.

Parameters:
relations - An ArrayList of Relation. This parameter can be null.
Returns:
true if all the elements of relations are Relation, and false otherwise (and in this case, the set operation is not done)

setIncomeEdges

public void setIncomeEdges(java.util.ArrayList edges)
Specified by:
setIncomeEdges in interface Node

isIncomeRelation

public boolean isIncomeRelation(Relation relation)
Check if the current concept has the specified relation as an income relation.

Parameters:
relation - A Relation
Returns:
true if relation is an income relation of the current concept and false otherwise

isIncomeRelation

public boolean isIncomeRelation(java.lang.Object relType)
Check if the current concept has an income relation with the specified relType. In this version, we ignore binding resolution.

Parameters:
relType - A relation Type
Returns:
true if the current concept has an income relation with the specified relType.

isIncomeRelation

public boolean isIncomeRelation(java.lang.Object relType,
                                java.lang.String suffix)
Similar to the monadic definition, except that we consider the suffix of the two relations.

Parameters:
relType - A relation Type
suffix - A String that represents the suffix of the relation
Returns:
true if the current concept has an income relation with the specified relType and a suffix equal to the specified suffix.

isIncomeRelation

public boolean isIncomeRelation(BindingContext bindContext,
                                java.lang.Object bindInf,
                                java.lang.Object relType,
                                java.lang.Object bindInfType)
Check if the current concept has an income relation with the specified relType. This version consider the case of binding resolution if the relationType is a variable.

Parameters:
bindContext - The Binding Context
bindInf - The Binding information associated to the current concept
relType - The relation type
bindInfType - The Binding information associated to relType
Returns:
true if the current concept has an income relation with the specified relType.

addIncomeRelation

public boolean addIncomeRelation(Relation relation)
Add the specified relation to the attribute incomeRelations of the current concept. Note that this method is not concerned by the addition of the relation to the CG (as an income relation for its target concept and an outcome relation for its source concept). This is done by the method addRelation() in the class CG.

Parameters:
relation - A Relation to add as new income relation for the current concept
Returns:
true if relation is not null and it was not an income relation for the current concept

addIncomeEdge

public void addIncomeEdge(Edge edge)
Specified by:
addIncomeEdge in interface Node

removeIncomeRelation

public boolean removeIncomeRelation(Relation relation)
Remove the specified relation from the incomeRelations of the current concept. This method does not remove the relation from the CG, use removeRelation() in the class CG for this purpose.

Parameters:
relation - A Relation
Returns:
true if relation was indeed an income relation for the current concept

clearIncomeRelations

public void clearIncomeRelations()
Clear the ArrayList incomeRelations of the current concept and set it to null. Note that the relations themselves are not removed from the CG. This is done by removeIncomeRelations().


removeIncomeRelations

public void removeIncomeRelations()
Remove from the CG all the incomeRelations of the current concept.


getOutcomeRelations

public java.util.Enumeration getOutcomeRelations()
Get an Enumeration over the outcomeRelations of the current concept

Returns:
an Enumeration over the outcomeRelations (an ArrayList of Relation) of the current concept.

getOutcomeEdges

public java.util.Enumeration getOutcomeEdges()
Specified by:
getOutcomeEdges in interface Node

getArrayOutcomeRelations

public java.lang.Object[] getArrayOutcomeRelations()
Get the outcomeRelations of the current concept in an array

Returns:
the outcomeRelations of the current concept in an array

setOutcomeRelations

public boolean setOutcomeRelations(java.util.ArrayList relations)
Set the specified ArrayList as the value for the attribute outcomeRelations of the current concept. If this later has already a content, it is destroyed first. The method checks first that all the elements of relations are Relation indeed.

Parameters:
relations - An ArrayList of Relation. This parameter can be null.
Returns:
true if all the elements of relations are Relation, and false otherwise (and in this case, the set operation is not done)

setOutcomeEdges

public void setOutcomeEdges(java.util.ArrayList edges)
Specified by:
setOutcomeEdges in interface Node

isOutcomeRelation

public boolean isOutcomeRelation(Relation relation)
Check if the current concept has the specified relation as an outcome relation.

Parameters:
relation - A Relation
Returns:
true if relation is an outcome relation of the current concept

isOutcomeRelation

public boolean isOutcomeRelation(java.lang.Object relType)
Check if the current concept has an outcome relation with the specified relType.

Parameters:
relType - A relation Type
Returns:
true if the current concept has an outcome relation with the specified relType.

isOutcomeRelation

public boolean isOutcomeRelation(java.lang.Object relType,
                                 java.lang.String suffix)
Similar to the monadic definition, except that we consider the suffix of the two relations.

Parameters:
relType - A relation Type
suffix - A String that represents the suffix of the relation
Returns:
true if the current concept has an outcome relation with the specified relType and a suffix equal to the specified suffix.

isOutcomeRelation

public boolean isOutcomeRelation(BindingContext bindContext,
                                 java.lang.Object bindInf,
                                 java.lang.Object relType,
                                 java.lang.Object bindInfType)
Check if the current concept has an outcome relation with the specified relType. This version consider the case of binding resolution if the relationType is a variable.

Parameters:
bindContext - The Binding Context
bindInf - The Binding information associated to the current concept
relType - The relation type
bindInfType - The Binding information associated to relType
Returns:
true if the current concept has an outcome relation with the specified relType.

addOutcomeRelation

public boolean addOutcomeRelation(Relation relation)
Add the specified relation to the attribute outcomeRelations of the current concept. Note that this method is not concerned by the addition of the relation to the CG (as an income relation for its target concept and an outcome relation for its source concept). This is done by the method addRelation() in the class CG.

Parameters:
relation - A Relation to add as new outcome relation for the current concept
Returns:
true if relation is not null and it was not an outcome relation for the current concept

addOutcomeEdge

public void addOutcomeEdge(Edge edge)
Specified by:
addOutcomeEdge in interface Node

removeOutcomeRelation

public boolean removeOutcomeRelation(Relation relation)
Remove the specified relation from the outcomeRelations of the current concept. Note that this method does not correspond to remove the relation from the CG. Use removeRelation() in the class CG in this case.

Returns:
true if the remove have been done

clearOutcomeRelations

public void clearOutcomeRelations()
Clear the ArrayList outcomeRelations of the current concept and set it to null. Note that the relations themselves are not removed from the CG. This is done by clearOutcomeRelations().


removeOutcomeRelations

public void removeOutcomeRelations()
Remove from the CG all the outcomeRelations of the current concept.


getEdges

public java.util.Enumeration getEdges()
Specified by:
getEdges in interface Node

getRelations

public java.util.Enumeration getRelations()
Get an Enumeration over all the income and outcome relations of the current concept.

Returns:
an Enumeration over all the outcome and income relations of the current concept. Return null if the concept is a disconnected concept ; it has no income and no outcome relations.

getAdjacentNodes

public java.util.ArrayList getAdjacentNodes()
Specified by:
getAdjacentNodes in interface Node

getNbrIncomeRels

public int getNbrIncomeRels()
Get the number of income relations of the current concept

Returns:
the number of income relations of the current concept

getNbrOutcomeRels

public int getNbrOutcomeRels()
Get the number of outcome relations of the current concept

Returns:
the number of outcome relations of the current concept

getNbrRelations

public int getNbrRelations()
Get the number of income and outcome relations of the current concept

Returns:
the number of income and outcome relations of the current concept

trimToSize

public void trimToSize()
Optimize the storage of a concept


toCG

public CG toCG()

toLF

public java.lang.String toLF(Lexicon lexicon)
                      throws ToStringException
Give the textual formulation, in LF, for the current concept. Since a concept could represent a context; its description could be a CG, the CG could be formulated in LF or in CGIF. This explains the definition of this method and the method toCGIF() in this class. Given the lexicon to use, this method returns the linear form of the current concept. This definition of toLF() does not consider the values of variables. Use the method toLF(bindContext, bindInf, lexicon) if the binding of variables should be considered.

Parameters:
lexicon - The lexicon to use during the textual formulation of the current concept
Returns:
the linear form of the current concept using the specified lexicon or return null if the parameter lexicon is null.
Throws:
ToStringException - if an error occurs during the textualization

toLF

public java.lang.String toLF(BindingContext bindContext,
                             java.lang.Object bindInf,
                             Lexicon lexicon)
                      throws ToStringException
This method returns the LF of the current concept. If variable binding is considered, the values of the variables will be textualized.

Parameters:
bindContext - The Binding context
bindInf - The binding information related to the binding context and the current concept
lexicon - The lexicon in use during the textual formulation of the current concept
Returns:
a String that represents the linear form of the current concept.
Throws:
ToStringException - if an error occurs during the textualization

toString

public java.lang.String toString(Lexicon lexicon)
                          throws ToStringException
By default, the textualization of a concept will be in Linear Form. This version does not considers variable binding and calls toLF(lexicon) for that purposes.

Specified by:
toString in interface ToString
Parameters:
lexicon - The lexicon to use during the textual formulation of the current concept
Returns:
a String that represents the linear form of the current concept.
Throws:
ToStringException - if an error occurs during the textualization

toString

public java.lang.String toString(BindingContext bindContext,
                                 java.lang.Object bindInf,
                                 Lexicon lexicon)
                          throws ToStringException
By default, the textualization of a concept will be in Linear Form. This version considers variable binding and calls toLF(bindContext, bindInf, lexicon) for that purposes.

Specified by:
toString in interface AmineObject
Parameters:
bindContext - The Binding context
bindInf - The binding information related to the binding context and the current concept
lexicon - The lexicon to use during the textual formulation of the current concept
Returns:
a String that represents the linear form of the current concept.
Throws:
ToStringException - if an error occurs during the textualization

toDisplayString

public java.lang.String toDisplayString(Lexicon lexicon)
                                 throws ToStringException
Specified by:
toDisplayString in interface Node
Throws:
ToStringException

toCGIF

public java.lang.String toCGIF(Lexicon lexicon)
                        throws ToStringException
This method is similar to toLF() excepts that it returns the textualization of the current concept in a CGIF form. This definition of toCGIF() does not consider the values of variables. Use the method toCGIF(bindContext, bindInf, lexicon) if variable binding should be considered.

Parameters:
lexicon - The lexicon to use during the textual formulation of the current concept
Returns:
the CGIF form of the current concept using the specified lexicon or return null if the parameter lexicon is null.
Throws:
ToStringException - if an error occurs during the textualization

toCGIF

public java.lang.String toCGIF(BindingContext bindContext,
                               java.lang.Object bindInf,
                               Lexicon lexicon)
                        throws ToStringException
This method returns the CGIF form of the current concept. If variable binding is considered, the values of the variables will be textualized too.

Parameters:
bindContext - The Binding context
bindInf - The binding information related to the binding context and the current concept
lexicon - The lexicon in use during the textual formulation of the current concept
Returns:
a String that represents the CGIF form of the current concept.
Throws:
ToStringException - if an error occurs during the textualization

parse

public static Concept parse(java.lang.String strgConc,
                            Lexicon lexicon)
                     throws ParsingException
Parse the textual formulation of a Concept (parameter strgConc) using the specified lexicon and produce its internal representation. The method has to determine in which form the concept is expressed (the Linear Form (LF) or the CGIF form (recall that a concept can contain a CG which is formulated in LF or CGIF). This method is based on the method parseConcept(String) defined in the class parserGenerator.ObjectParsing.

Parameters:
strgConc - The textual formulation of a concept
lexicon - The lexicon to use during the parsing
Returns:
a concept object; the internal representation of the concept given as a String, or return null if the parameter strgConc or lexicon is null.
Throws:
java.lang.Exception - if problems occur during the parsing
ParsingException

getVariables

public void getVariables(java.util.ArrayList varsIdent)
This method adds in the specified varsIdent all the variables used in the current Concept. This method is used for instance by the Prolog+CG interpreter. Nothing is done if the parameter varsIdent is null.

Specified by:
getVariables in interface AmineObject
Parameters:
varsIdent - : an ArrayList of Variable objects

eqType

public boolean eqType(BindingContext bindContext,
                      java.lang.Object bindInfType1,
                      java.lang.Object type2,
                      java.lang.Object bindInfType2)
Test if two concept types are equal.

Parameters:
bindContext - The Binding context
bindInfType1 - The binding information related to the binding context and to the current concept type
type2 - The object to test the equality with the current concept type
bindInfType2 - The binding information related to the binding context and to type2
Returns:
true if the two types are equal and false otherwise

eqDesignator

public boolean eqDesignator(BindingContext bindContext,
                            java.lang.Object bindInf,
                            java.lang.Object designator2,
                            java.lang.Object bindInfDsgn)
Test if two concept designators are equal.

Parameters:
bindContext - The Binding context
bindInf - The binding information related to the binding context and to the current concept designator
designator2 - The object to test the equality with the current concept designator
bindInfDsgn - The binding information related to the binding context and to designator2
Returns:
true if the two designators are equal and false otherwise

match

public java.lang.Object match(byte matchOperation,
                              java.lang.Object obj)
Match the current object with the specified object obj, according to the value of the parameter matchOperation. This version of matching does not consider the binding context and resolution. Atually, these values are defined in AmineConstants interface and are: EQUAL, UNIFY, SUBSUME, SUBSUME_WITH_RSLT, MAXIMAL_JOIN, and GENERALIZE.

Specified by:
match in interface Matching
Parameters:
matchOperation - A byte value that specifies which kind of matching to apply
obj - The object to match with the current object
Returns:
an object which is the result of the match operation

match

public java.lang.Object match(byte matchOperation,
                              BindingContext bindContext,
                              java.lang.Object bindInf,
                              java.lang.Object obj,
                              java.lang.Object bindInfObj)
Match the current object with the specified object obj, according to the value of the parameter matchOperation. The matching considers the binding context and the binding information for the two objects.

Specified by:
match in interface Matching
Parameters:
matchOperation - A byte value that specifies which kind of matching to apply
bindContext - The binding context
bindInf - The binding information for the current object
obj - The object to match with the current object
bindInfObj - The binding information for the parameter obj
Returns:
an object which is the result of the match operation

match

public java.lang.Object match(byte matchOperation,
                              BindingContext bindContext,
                              java.lang.Object bindInf,
                              java.lang.Object obj,
                              java.lang.Object bindInfObj,
                              CGOperations cgOperations)
Match the current object with the specified object obj, according to the value of the parameter matchOperation. The matching considers the binding context and the binding information for the two objects. This variant concerns concepts that belong to CG and the possibility to share coreferences with other concepts. Logically speaking, this variant should not be used directely by user, it is used especially by CGOperations.

Parameters:
matchOperation - A byte value that specifies which kind of matching to apply
bindContext - The binding context
bindInf - The binding information for the current object
obj - The object to match with the current object
bindInfObj - The binding information for the parameter obj
Returns:
an object which is the result of the match operation

analogDesignator

void analogDesignator(BindingContext bindContext,
                      java.lang.Object bindInf,
                      Concept conc2,
                      java.lang.Object bindInf2,
                      CGOperations cgOperations)

matchTypeDesignator

boolean matchTypeDesignator(byte matchOperation,
                            BindingContext bindContext,
                            java.lang.Object bindInf1,
                            Concept conc2,
                            java.lang.Object bindInf2,
                            Concept conc3)

matchType

boolean matchType(byte matchOperation,
                  BindingContext bindContext,
                  java.lang.Object bindInf,
                  java.lang.Object type2,
                  java.lang.Object bindInf2,
                  Concept conc3)

matchDesignator

boolean matchDesignator(byte matchOperation,
                        BindingContext bindContext,
                        java.lang.Object bindInf1,
                        java.lang.Object dsgntr2,
                        java.lang.Object bindInf2,
                        Concept conc3)

matchCoref

boolean matchCoref(byte matchOperation,
                   Concept conc2,
                   Concept conc3,
                   CGOperations cgOperations)

matchDescriptor

boolean matchDescriptor(byte matchOperation,
                        BindingContext bindContext,
                        java.lang.Object bindInf1,
                        java.lang.Object descr2,
                        java.lang.Object bindInfDescr2,
                        Concept conc3,
                        CGOperations cgOperations)

equal

public boolean equal(BindingContext bindContext,
                     java.lang.Object bindInf,
                     java.lang.Object obj,
                     java.lang.Object bindInfObj)
Check that the current object is equal with the specified object obj. The equality is a kind of matching and this version considers the binding context and the binding information for the two objects.

Specified by:
equal in interface Matching
Parameters:
bindContext - The binding context
bindInf - The binding information for the current object
obj - The object to check the equality with the current object
bindInfObj - The binding information for the parameter obj
Returns:
true if the two objects are equal and false otherwise

equal

public boolean equal(java.lang.Object obj)
Check that the current object is equal with the specified object obj. The equality is a kind of matching and this version does not considers the binding context and the binding information for the two objects.

Specified by:
equal in interface Matching
Parameters:
obj - The object to check the equality with the current object
Returns:
true if the two objects are equal and false otherwise

unify

public boolean unify(BindingContext bindContext,
                     java.lang.Object bindInf,
                     java.lang.Object obj,
                     java.lang.Object bindInfObj)
Unify the current object with the specified object obj.

Specified by:
unify in interface Matching
Parameters:
bindContext - The binding context
bindInf - The binding information for the current object
obj - The object to unify with the current object
bindInfObj - The binding information for the parameter obj
Returns:
true if the two objects can be unified and false otherwise

subsume

public boolean subsume(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. Subsumption is a kind of matching and this version considers the binding context and the binding information for the two objects.

Specified by:
subsume in interface Matching
Parameters:
bindContext - The binding context
bindInf - The binding information for the current object
obj - The object to check its subsumption by the current object
bindInfObj - The binding information for the parameter obj
Returns:
true if the current object subsumes the specified object obj

subsume

public boolean subsume(java.lang.Object obj)
Check that the current object subsumes (is more general than) the specified object obj. Subsumption is a kind of matching and this version does not considers the binding context and the binding information for the two objects.

Specified by:
subsume in interface Matching
Parameters:
obj - The object to check its subsumption by the current object
Returns:
true if the current object subsumes the specified object obj

subsumeWithResult

public 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. Subsumption is a kind of matching and this version considers the binding context and the binding information for the two objects.

Specified by:
subsumeWithResult in interface Matching
Parameters:
bindContext - The binding context
bindInf - The binding information for the current object
obj - The object to check its subsumption by the current object
bindInfObj - The binding information for the parameter obj
Returns:
the image, in obj, of the current object

subsumeWithResult

public java.lang.Object subsumeWithResult(java.lang.Object obj)
Check that the current object subsumes (is more general than) the specified object obj. Subsumption is a kind of matching and this version does not considers the binding context and the binding information for the two objects.

Specified by:
subsumeWithResult in interface Matching
Parameters:
obj - The object to check its subsumption by the current object
Returns:
the image, in obj, of the current object

maximalJoin

public 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. The join considers the binding context and the binding information for the two objects.

Specified by:
maximalJoin in interface Matching
Parameters:
bindContext - The binding context
bindInf - The binding information for the current object
obj - The object to join with the current object
bindInfObj - The binding information for the parameter obj
Returns:
an object which is the result of the join operation

maximalJoin

public java.lang.Object maximalJoin(java.lang.Object obj)
Perform a maximal join of the current object with the specified object obj. This version of join does not considers the binding context and the binding information for the two objects.

Specified by:
maximalJoin in interface Matching
Parameters:
obj - The object to join with the current object
Returns:
an object which is the result of the join operation

generalize

public 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. The generalize operation considers the binding context and the binding information for the two objects.

Specified by:
generalize in interface Matching
Parameters:
bindContext - The binding context
bindInf - The binding information for the current object
obj - The object to generalize with the current object
bindInfObj - The binding information for the parameter obj
Returns:
an object which is the result of the generalization operation

generalize

public 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. This version of generalize operation does not considers the binding context and the binding information for the two objects.

Specified by:
generalize in interface Matching
Parameters:
obj - The object to generalize with the current object
Returns:
an object which is the result of the generalization operation