Index: trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/nodeequality/NodeEqualityRuleManager.java
===================================================================
--- trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/nodeequality/NodeEqualityRuleManager.java	(revision 1113)
+++ trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/nodeequality/NodeEqualityRuleManager.java	(revision 1125)
@@ -72,5 +72,5 @@
      *                               manager before a call to this method.
      */
-    public NodeEquality applyRules(ITaskTreeNode node1, ITaskTreeNode node2)
+    public NodeEquality compare(ITaskTreeNode node1, ITaskTreeNode node2)
         throws IllegalStateException
     {
@@ -83,9 +83,10 @@
 
         for (NodeComparisonRule rule : mRuleIndex) {
-            nodeEquality = rule.compare(node1, node2);
-
-            if (nodeEquality != null) {
-                // LOG.warning("used rule " + rule + " for equality check");
-                return nodeEquality;
+            if (rule.isApplicable(node1, node2)) {
+                nodeEquality = rule.compare(node1, node2);
+                if (nodeEquality != null) {
+                    // LOG.warning("used rule " + rule + " for equality check");
+                    return nodeEquality;
+                }
             }
         }
@@ -96,3 +97,129 @@
     }
 
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param child1
+     * @param child2
+     * @param equalityLevel
+     * @return
+     */
+    public boolean areAtLeastEqual(ITaskTreeNode node1,
+                                   ITaskTreeNode node2,
+                                   NodeEquality  equalityLevel)
+    {
+        if (equalityLevel == null) {
+            throw new IllegalArgumentException("required equality level must not be null");
+        }
+        
+        switch (equalityLevel) {
+            case IDENTICAL:
+                return areIdentical(node1, node2);
+            case LEXICALLY_EQUAL:
+                return areLexicallyEqual(node1, node2);
+            case SYNTACTICALLY_EQUAL:
+                return areSyntacticallyEqual(node1, node2);
+            case SEMANTICALLY_EQUAL:
+                return areSemanticallyEqual(node1, node2);
+            case UNEQUAL:
+                return !areSemanticallyEqual(node1, node2);
+            default:
+                throw new IllegalArgumentException("unknown required equality: " + equalityLevel);
+        }
+    }
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param child1
+     * @param child2
+     * @return
+     */
+    public boolean areIdentical(ITaskTreeNode node1, ITaskTreeNode node2) {
+        if (mRuleIndex == null) {
+            throw new IllegalStateException("not initialized");
+        }
+        
+        for (NodeComparisonRule rule : mRuleIndex) {
+            if (rule.isApplicable(node1, node2) && rule.areLexicallyEqual(node1, node2)) {
+                 return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param child1
+     * @param child2
+     * @return
+     */
+    public boolean areLexicallyEqual(ITaskTreeNode node1, ITaskTreeNode node2) {
+        if (mRuleIndex == null) {
+            throw new IllegalStateException("not initialized");
+        }
+        
+        for (NodeComparisonRule rule : mRuleIndex) {
+            if (rule.isApplicable(node1, node2) && rule.areLexicallyEqual(node1, node2)) {
+                 return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param child1
+     * @param child2
+     * @return
+     */
+    public boolean areSyntacticallyEqual(ITaskTreeNode node1, ITaskTreeNode node2) {
+        if (mRuleIndex == null) {
+            throw new IllegalStateException("not initialized");
+        }
+        
+        for (NodeComparisonRule rule : mRuleIndex) {
+            if (rule.isApplicable(node1, node2) && rule.areSyntacticallyEqual(node1, node2)) {
+                 return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param child1
+     * @param child2
+     * @return
+     */
+    public boolean areSemanticallyEqual(ITaskTreeNode node1, ITaskTreeNode node2) {
+        if (mRuleIndex == null) {
+            throw new IllegalStateException("not initialized");
+        }
+        
+        for (NodeComparisonRule rule : mRuleIndex) {
+            if (rule.isApplicable(node1, node2) && rule.areSemanticallyEqual(node1, node2)) {
+                 return true;
+            }
+        }
+
+        return false;
+    }
+
 }
