agg.xt_basis
Class MatchHelper

java.lang.Object
  extended by agg.xt_basis.MatchHelper

public final class MatchHelper
extends java.lang.Object


Field Summary
protected static java.lang.String errorMsg
           
 
Constructor Summary
MatchHelper()
           
 
Method Summary
static java.lang.String attributesOfGlueObjectsCorrect(Match match)
           
static void checkEdgeSourceTargetCompatibility(OrdinaryMorphism morph, GraphObject orig, GraphObject image)
           
static Morphism checkNACStar(NACStarMorphism aNACstar, OrdinaryMorphism nac, Match match, boolean withVars)
           
static Morphism checkPACStar(PACStarMorphism aPACstar, OrdinaryMorphism pac, Match match, boolean withVars)
           
static void checkSourceTargetCompatibilityOfEdge(Match match, GraphObject orig, GraphObject image)
           
static boolean checkVariableToNullMappping(Match match)
           
static NACStarMorphism createNACstar(OrdinaryMorphism nac, Match match)
           
static NACStarMorphism createNACstar(OrdinaryMorphism nac, Match match, boolean withVars)
           
static PACStarMorphism createPACstar(OrdinaryMorphism pac, Match match)
           
static PACStarMorphism createPACstar(OrdinaryMorphism pac, Match match, boolean withVars)
           
static void deleteTransientContextVariables(OrdinaryMorphism morph, Graph g)
           
static java.util.Vector<CondMember> getConditionsOfNAC(OrdinaryMorphism nacStar, OrdinaryMorphism nac)
           
static java.util.Vector<CondMember> getConditionsOfPAC(OrdinaryMorphism pacStar, OrdinaryMorphism pac)
           
static java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(OrdinaryMorphism morph, java.lang.Object other, boolean left, boolean union)
          Computes an overlapping set of the graphs: - this.source with other.source if other instance of OrdinaryMorphism and left is true, or - this.target with other.target if other instance of OrdinaryMorphism and left is false, or - this.sorce with other if other instance of Graph and left is true, or - this.target with other if other instance of Graph and left is false, or with respect of the rules if this and other are instances of Rule.
static java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(OrdinaryMorphism morph, java.lang.Object other, boolean left, int sizeOfInclusions, boolean union)
          Computes an overlapping set of the graphs: - this.source with other.source if other instance of OrdinaryMorphism and left is true, or - this.target with other.target if other instance of OrdinaryMorphism and left is false, or - this.sorce with other if other instance of Graph and left is true, or - this.target with other if other instance of Graph and left is false, or with respect of the rules if this and other are instances of Rule.
static java.util.Vector<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappingsVector(OrdinaryMorphism morph, java.lang.Object other, boolean left, boolean union)
           
static java.util.Vector<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappingsVector(OrdinaryMorphism morph, java.lang.Object otherObj, boolean left, int sizeOfInclusions, boolean union)
           
static boolean isAttrConditionOfNACSatisfied(NACStarMorphism nacStar, OrdinaryMorphism nac, java.util.Vector<CondMember> condsNAC)
          Returns error message if at least one attribute condition is satisfied, otherwise empty string.
static boolean isAttrConditionOfPACSatisfied(PACStarMorphism pacStar, OrdinaryMorphism pac, java.util.Vector<CondMember> condsPAC)
          Returns error message if at leas one attribute condition is not satisfied, otherwise empty string.
static java.lang.String isConsistent(Rule rule, OrdinaryMorphism testComatch, OrdinaryMorphism testMatch)
           
static java.lang.String isDanglingConditionSatisfied(Match match)
           
static java.lang.String isIdentificationConditionSatisfied(Match match)
           
static java.lang.String isTypeMultiplicitySatisfied(Match match)
          Checks multiplicity of node resp. edge types due to the type graph of the given match.
static OrdinaryMorphism makeTestStep(Match m2, boolean allowVariables, boolean similarVariableName)
           
protected static void unsetVariablesOfNAC(AttrContext attrContext, OrdinaryMorphism nac)
           
protected static void unsetVariablesOfPAC(AttrContext attrContext, OrdinaryMorphism pac)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorMsg

protected static java.lang.String errorMsg
Constructor Detail

MatchHelper

public MatchHelper()
Method Detail

makeTestStep

public static OrdinaryMorphism makeTestStep(Match m2,
                                            boolean allowVariables,
                                            boolean similarVariableName)

isDanglingConditionSatisfied

public static java.lang.String isDanglingConditionSatisfied(Match match)
Parameters:
match -
Returns:
error message if check failed, otherwise - empty string

isIdentificationConditionSatisfied

public static java.lang.String isIdentificationConditionSatisfied(Match match)
Parameters:
match -
Returns:
error message if check failed, otherwise - empty string

isConsistent

public static java.lang.String isConsistent(Rule rule,
                                            OrdinaryMorphism testComatch,
                                            OrdinaryMorphism testMatch)
Parameters:
rule -
testComatch -
testMatch -
Returns:
error message if check failed, otherwise - empty string

attributesOfGlueObjectsCorrect

public static java.lang.String attributesOfGlueObjectsCorrect(Match match)
Parameters:
match -
Returns:
error message if check failed, otherwise - empty string

isTypeMultiplicitySatisfied

public static java.lang.String isTypeMultiplicitySatisfied(Match match)
Checks multiplicity of node resp. edge types due to the type graph of the given match.

Parameters:
match -
Returns:
Error string if check failed, otherwise - null.

checkVariableToNullMappping

public static boolean checkVariableToNullMappping(Match match)

checkSourceTargetCompatibilityOfEdge

public static void checkSourceTargetCompatibilityOfEdge(Match match,
                                                        GraphObject orig,
                                                        GraphObject image)
                                                 throws BadMappingException
Throws:
BadMappingException

checkEdgeSourceTargetCompatibility

public static void checkEdgeSourceTargetCompatibility(OrdinaryMorphism morph,
                                                      GraphObject orig,
                                                      GraphObject image)
                                               throws BadMappingException
Throws:
BadMappingException

getOverlappings

public static java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(OrdinaryMorphism morph,
                                                                                             java.lang.Object other,
                                                                                             boolean left,
                                                                                             boolean union)
Computes an overlapping set of the graphs: - this.source with other.source if other instance of OrdinaryMorphism and left is true, or - this.target with other.target if other instance of OrdinaryMorphism and left is false, or - this.sorce with other if other instance of Graph and left is true, or - this.target with other if other instance of Graph and left is false, or with respect of the rules if this and other are instances of Rule.

Parameters:
union - If true - the overlappings contain disjunion, too. Enumeration elements are of type Pair.
Returns:
A set of overlappings.

getOverlappingsVector

public static java.util.Vector<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappingsVector(OrdinaryMorphism morph,
                                                                                              java.lang.Object other,
                                                                                              boolean left,
                                                                                              boolean union)

getOverlappings

public static java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(OrdinaryMorphism morph,
                                                                                             java.lang.Object other,
                                                                                             boolean left,
                                                                                             int sizeOfInclusions,
                                                                                             boolean union)
Computes an overlapping set of the graphs: - this.source with other.source if other instance of OrdinaryMorphism and left is true, or - this.target with other.target if other instance of OrdinaryMorphism and left is false, or - this.sorce with other if other instance of Graph and left is true, or - this.target with other if other instance of Graph and left is false, or with respect of the rules if this and other are instances of Rule.

Parameters:
sizeOfInclusions - The size of graph object inclusions.
union - If true - the overlappings contain disjunion, too. Enumeration elements are of type Pair.
Returns:
A set of overlappings.
See Also:
Pair

getOverlappingsVector

public static java.util.Vector<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappingsVector(OrdinaryMorphism morph,
                                                                                              java.lang.Object otherObj,
                                                                                              boolean left,
                                                                                              int sizeOfInclusions,
                                                                                              boolean union)

deleteTransientContextVariables

public static void deleteTransientContextVariables(OrdinaryMorphism morph,
                                                   Graph g)

getConditionsOfNAC

public static java.util.Vector<CondMember> getConditionsOfNAC(OrdinaryMorphism nacStar,
                                                              OrdinaryMorphism nac)

getConditionsOfPAC

public static java.util.Vector<CondMember> getConditionsOfPAC(OrdinaryMorphism pacStar,
                                                              OrdinaryMorphism pac)

isAttrConditionOfNACSatisfied

public static boolean isAttrConditionOfNACSatisfied(NACStarMorphism nacStar,
                                                    OrdinaryMorphism nac,
                                                    java.util.Vector<CondMember> condsNAC)
Returns error message if at least one attribute condition is satisfied, otherwise empty string.

Parameters:
nacStar -
nac -
condsNAC -
Returns:

isAttrConditionOfPACSatisfied

public static boolean isAttrConditionOfPACSatisfied(PACStarMorphism pacStar,
                                                    OrdinaryMorphism pac,
                                                    java.util.Vector<CondMember> condsPAC)
Returns error message if at leas one attribute condition is not satisfied, otherwise empty string.

Parameters:
pacStar -
pac -
condsPAC -
Returns:

checkNACStar

public static final Morphism checkNACStar(NACStarMorphism aNACstar,
                                          OrdinaryMorphism nac,
                                          Match match,
                                          boolean withVars)

checkPACStar

public static final Morphism checkPACStar(PACStarMorphism aPACstar,
                                          OrdinaryMorphism pac,
                                          Match match,
                                          boolean withVars)

unsetVariablesOfNAC

protected static void unsetVariablesOfNAC(AttrContext attrContext,
                                          OrdinaryMorphism nac)

unsetVariablesOfPAC

protected static void unsetVariablesOfPAC(AttrContext attrContext,
                                          OrdinaryMorphism pac)

createNACstar

public static NACStarMorphism createNACstar(OrdinaryMorphism nac,
                                            Match match)

createNACstar

public static NACStarMorphism createNACstar(OrdinaryMorphism nac,
                                            Match match,
                                            boolean withVars)

createPACstar

public static PACStarMorphism createPACstar(OrdinaryMorphism pac,
                                            Match match)

createPACstar

public static PACStarMorphism createPACstar(OrdinaryMorphism pac,
                                            Match match,
                                            boolean withVars)