|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
agg.util.ExtObservable
agg.xt_basis.OrdinaryMorphism
agg.xt_basis.Match
public class Match
This class is used to represent matches (morphism from the left side graph
of a rule into a host graph). Note that not every instance of this class is a
valid match in terms of theory, because in theory a match has to be a total
morphism satisfying all positive negative application conditions (NACs) of the
corresponding rule. The methods isTotal()
and
isValid()
can be used to check for these additional properties
dynamically.
Morphism.isTotal()
,
isValid()
Field Summary |
---|
Fields inherited from class agg.xt_basis.OrdinaryMorphism |
---|
cKeepContext, comment, enabled, errorMsg, errors, itsAttrContext, itsAttrManager, itsAttrMappings, itsCodomObjects, itsCoMorph, itsCompleter, itsDomObjects, itsImag, itsInteractiveFlag, itsName, itsOrig, itsTouchedFlag, partialMorphCompletion, removeAttrMapping, typeObjectsMapChanged |
Constructor Summary | |
---|---|
protected |
Match()
|
protected |
Match(Rule rule,
Graph graph)
|
Method Summary | |
---|---|
void |
adjustAttrCondition()
Checks existing attribute conditions of the attribute context against the attribute context of its rule. |
void |
adjustAttrInputParameter(boolean inputParameterOnly)
Checks existing variables of the attribute context against the attribute context of its rule. |
boolean |
allowedToIgnoreInputParameter()
|
void |
allowToIgnoreInputParameter(boolean b)
|
boolean |
areNACsSatisfied()
|
boolean |
areNACsSatisfied(boolean withVars)
|
boolean |
arePACsSatisfied()
|
boolean |
arePACsSatisfied(boolean withVars)
|
protected boolean |
areTotalityIdentificationDanglingAttrsOfGluingSatisfied()
|
boolean |
areTotalityIdentificationDanglingSatisfied()
|
boolean |
checkAbstractGraphObject(Type abstractNodeType)
Returns FALSE if a node of the specified abstract type is found in the target graph of this match, otherwise - TRUE. |
boolean |
checkAttrCondition()
|
protected void |
checkEdgeSourceTargetCompatibility(GraphObject orig,
GraphObject image)
|
Morphism |
checkNAC(OrdinaryMorphism nac)
Check if this match satisfies the given negative application condition. |
Morphism |
checkNAC(OrdinaryMorphism nac,
boolean withVars)
|
Morphism |
checkPAC(OrdinaryMorphism pac)
Check if this match satisfies the given positive application condition. |
Morphism |
checkPAC(OrdinaryMorphism pac,
boolean withVars)
|
void |
clear()
Remove all mappings and unset all variables of its attribute context. |
void |
clearErrorMsg()
|
void |
dispose()
Remove all graph object mappings and all relations to its source and target graphs. |
void |
enableInputParameter(boolean enable)
|
void |
finalize()
|
java.lang.String |
getErrorMsg()
Returns an empty message or null if this match is valid, otherwise - an error message. |
java.lang.String |
getLastErrorMsg()
|
Rule |
getRule()
Return the rule that I am a match for. |
boolean |
isAttrConditionSatisfied()
|
boolean |
isDanglingConditionSatisfied()
|
boolean |
isReadyToTransform()
Checks variable declarations and attribute conditions. |
boolean |
isTypeMaxMultiplicitySatisfied()
Checks multiplicity of node resp. edge types due to the type graph of the given match. |
boolean |
isTypeMultiplicitySatisfied()
Checks multiplicity of node resp. edge types due to the type graph of the given match. |
boolean |
isValid()
Checks if this is a valid match. |
boolean |
isValid(boolean allowVariables)
This method is like the method isValid(), additionally, the usage of variables in a work graph is possible. |
boolean |
nextCompletion()
Compute next completion: * Invoke this method successively to get all completions. |
boolean |
nextCompletionWithConstantsAndVariablesChecking()
Compute next completion: * Invoke this method successively to get all completions |
boolean |
nextCompletionWithConstantsChecking()
Compute next completion: * Invoke this method successively to get all completions |
void |
resetTarget(Graph g)
|
void |
resetVariableDomainOfCompletionStrategy(boolean b)
|
void |
unsetInputParameter(boolean inputParameterOnly)
Set the value of the variables of the attribute context to null. |
void |
unsetVariables()
|
void |
XreadObject(XMLHelper h)
|
void |
XwriteObject(XMLHelper h)
|
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Match()
protected Match(Rule rule, Graph graph)
Method Detail |
---|
public void dispose()
dispose
in interface Disposable
dispose
in class OrdinaryMorphism
Change_ObservableGone
public void finalize()
finalize
in class ExtObservable
public void clear()
OrdinaryMorphism
clear
in class OrdinaryMorphism
public void resetTarget(Graph g)
public final Rule getRule()
public java.lang.String getErrorMsg()
getErrorMsg
in class OrdinaryMorphism
public java.lang.String getLastErrorMsg()
public void clearErrorMsg()
clearErrorMsg
in class OrdinaryMorphism
public boolean checkAbstractGraphObject(Type abstractNodeType)
public void adjustAttrInputParameter(boolean inputParameterOnly)
public void adjustAttrCondition()
public void unsetInputParameter(boolean inputParameterOnly)
public void allowToIgnoreInputParameter(boolean b)
public boolean allowedToIgnoreInputParameter()
public boolean isReadyToTransform()
public void resetVariableDomainOfCompletionStrategy(boolean b)
public boolean nextCompletion()
OrdinaryMorphism
nextCompletion
in class OrdinaryMorphism
false
if there are no more completions.*public boolean nextCompletionWithConstantsChecking()
OrdinaryMorphism
nextCompletionWithConstantsChecking
in class OrdinaryMorphism
false
if there are no more completions.public boolean nextCompletionWithConstantsAndVariablesChecking()
OrdinaryMorphism
nextCompletionWithConstantsAndVariablesChecking
in class OrdinaryMorphism
false
if there are no more completions.protected boolean areTotalityIdentificationDanglingAttrsOfGluingSatisfied()
public boolean areTotalityIdentificationDanglingSatisfied()
public final boolean isValid()
nextCompletion()
is called and returned with TRUE.
In this case the check of conditions:
totality, identification and dangling, NACs and PACs
- is already done and only check of: node resp. edge type multiplicity
and post rule application conditions
- will be performed.
nextCompletion()
was not called.
Then all checks: totality, identification and dangling, NACs and PACs
,
node resp. edge type multiplicity
and post rule application conditions
- will be performed.
The usage of variables in the work graph is not allowed.
true
iff this is a total morphism and all conditions
of its rule are satisfied.public final boolean isValid(boolean allowVariables)
true
iff this is a total morphism and all conditions
of its rule are satisfied.public boolean checkAttrCondition()
public boolean areNACsSatisfied()
public boolean arePACsSatisfied()
public boolean areNACsSatisfied(boolean withVars)
public boolean arePACsSatisfied(boolean withVars)
public final Morphism checkNAC(OrdinaryMorphism nac)
null
if nac
is satisfied; otherwise
the morphism between nac.getImage()
and
this.getImage()
that shows how nac
was violated. Note that the returned morphism is only valid until
the next call of nextCompletion()
or
checkNAC()
.
Pre:
this.isTotal()
.
nac.isTotal()
. (This is what theory demands. The
implementation works for partial NACs as well.)
public final Morphism checkNAC(OrdinaryMorphism nac, boolean withVars)
public final Morphism checkPAC(OrdinaryMorphism pac)
null
if pac
is not satisfied;
otherwise the morphism between pac.getImage()
and
this.getImage()
that shows how pac
was satisfied. Note that the returned morphism is only valid
until the next call of nextCompletion()
or
checkPAC()
.
Pre:
this.isTotal()
.
pac.isTotal()
. (This is what theory demands. The
implementation works for partial PACs as well; maybe this will turn out
useful.)
public final Morphism checkPAC(OrdinaryMorphism pac, boolean withVars)
public void enableInputParameter(boolean enable)
public void unsetVariables()
public boolean isAttrConditionSatisfied()
public boolean isDanglingConditionSatisfied()
protected void checkEdgeSourceTargetCompatibility(GraphObject orig, GraphObject image) throws BadMappingException
checkEdgeSourceTargetCompatibility
in class OrdinaryMorphism
BadMappingException
public boolean isTypeMultiplicitySatisfied()
match
-
public boolean isTypeMaxMultiplicitySatisfied()
match
-
public void XwriteObject(XMLHelper h)
XwriteObject
in interface XMLObject
public void XreadObject(XMLHelper h)
XreadObject
in interface XMLObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |