/* * tries to match the unique child of the NodePattern node to a node. * Returns "true" if succeeds. */ private bool MatchChild() { // entering here (given that it's called only once in matches()) // we know finished is false, and either nextChild == null // (meaning goToNextChild has not been called) or nextChild exists // and has a label or backreference that matches if (nextMatch == null) { // I haven't been initialized yet, so my child // certainly can't be matched yet. return(false); } if (childMatcher == null) { if (!matchedOnce) { matchedOnce = true; return(true); } return(false); } // childMatcher.namesToNodes.putAll(this.namesToNodes); // childMatcher.namesToRelations.putAll(this.namesToRelations); bool match = childMatcher.Matches(); if (match) { } else { // namesToNodes.putAll(childMatcher.namesToNodes); // namesToRelations.putAll(childMatcher.namesToRelations); // System.out.println(node.word() + " " + // namesToNodes.get("partnerTwo")); if (nextMatch != null) { DecommitVariableGroups(); DecommitNamedNodes(); DecommitNamedRelations(); } } return(match); }