Examples of MatchNode


Examples of anvil.script.expression.MatchNode

      UnaryExpression();
      Node right = pop();
      Node left = pop();
      switch(op.kind) {
      case MATCH:
        push(new MatchNode(left, right));
        break;
      case NO_MATCH:
        push(new NoMatchNode(left, right));
        break;
      }
View Full Code Here

Examples of eu.stratosphere.compiler.dag.MatchNode

      }
      else if (c instanceof GroupReduceOperatorBase) {
        n = new GroupReduceNode((GroupReduceOperatorBase<?, ?, ?>) c);
      }
      else if (c instanceof JoinOperatorBase) {
        n = new MatchNode((JoinOperatorBase<?, ?, ?, ?>) c);
      }
      else if (c instanceof CoGroupOperatorBase) {
        n = new CoGroupNode((CoGroupOperatorBase<?, ?, ?, ?>) c);
      }
      else if (c instanceof CrossOperatorBase) {
View Full Code Here

Examples of eu.stratosphere.compiler.dag.MatchNode

          for (PactConnection conn : solutionSetNode.getOutgoingConnections()) {
            OptimizerNode successor = conn.getTarget();
         
            if (successor.getClass() == MatchNode.class) {
              // find out which input to the match the solution set is
              MatchNode mn = (MatchNode) successor;
              if (mn.getFirstPredecessorNode() == solutionSetNode) {
                mn.makeJoinWithSolutionSet(0);
              } else if (mn.getSecondPredecessorNode() == solutionSetNode) {
                mn.makeJoinWithSolutionSet(1);
              } else {
                throw new CompilerException();
              }
            }
            else if (successor.getClass() == CoGroupNode.class) {
View Full Code Here

Examples of org.apache.cocoon.sitemap.node.MatchNode

public class MatchNodeTest {

    @Test
    public void endsWithMatchingAttribute() throws Exception {
        MatchNode matchNode = new MatchNode();
        PrivateAccessor.setField(matchNode, "endsWith", ".xml");
        MatcherContext matcherContext = matchNode.lookupMatcherContext();
        Map<String, String> matches = matcherContext.match("abc.xml");
        assertTrue(matches.containsValue("abc.xml"));
        assertTrue(matches.containsValue("abc"));
        assertEquals(2, matches.size());
    }
View Full Code Here

Examples of org.apache.cocoon.sitemap.node.MatchNode

        assertEquals(2, matches.size());
    }

    @Test
    public void startsWithMatchingAttribute() throws Exception {
        MatchNode matchNode = new MatchNode();
        PrivateAccessor.setField(matchNode, "startsWith", "abc");
        MatcherContext matcherContext = matchNode.lookupMatcherContext();
        Map<String, String> matches = matcherContext.match("abc/44");
        assertTrue(matches.containsValue("abc/44"));
        assertTrue(matches.containsValue("/44"));
        assertEquals(2, matches.size());
    }
View Full Code Here

Examples of org.apache.cocoon.sitemap.node.MatchNode

        assertEquals(2, matches.size());
    }

    @Test
    public void regexpMatchingAttribute() throws Exception {
        MatchNode matchNode = new MatchNode();
        PrivateAccessor.setField(matchNode, "regexp", "([a-zA-Z\\-]+)/(.*)");
        MatcherContext matcherContext = matchNode.lookupMatcherContext();
        Map<String, String> matches = matcherContext.match("abc/44");
        assertTrue(matches.containsValue("abc/44"));
        assertTrue(matches.containsValue("abc"));
        assertTrue(matches.containsValue("44"));
        assertEquals(3, matches.size());
View Full Code Here

Examples of org.apache.cocoon.sitemap.node.MatchNode

        assertEquals(3, matches.size());
    }

    @Test
    public void regexpMatchingAttributeWithSlash() throws Exception {
        MatchNode matchNode = new MatchNode();
        PrivateAccessor.setField(matchNode, "regexp", "([a-zA-Z\\-]+)/(.*)");
        MatcherContext matcherContext = matchNode.lookupMatcherContext();
        Map<String, String> matches = matcherContext.match("abc/44");
        assertTrue(matches.containsValue("abc/44"));
        assertTrue(matches.containsValue("abc"));
        assertTrue(matches.containsValue("44"));
        assertEquals(3, matches.size());
View Full Code Here

Examples of org.apache.cocoon.sitemap.node.MatchNode

        assertEquals(3, matches.size());
    }

    @Test
    public void containsMatchingAttribute() throws Exception {
        MatchNode matchNode = new MatchNode();
        PrivateAccessor.setField(matchNode, "contains", "123");
        MatcherContext matcherContext = matchNode.lookupMatcherContext();
        Map<String, String> matches = matcherContext.match("000123456");
        assertTrue(matches.containsValue("000123456"));
        assertEquals(1, matches.size());
    }
View Full Code Here

Examples of org.apache.cocoon.sitemap.node.MatchNode

        assertEquals(1, matches.size());
    }

    @Test
    public void equalsMatchingAttribute() throws Exception {
        MatchNode matchNode = new MatchNode();
        PrivateAccessor.setField(matchNode, "equals", "123");
        MatcherContext matcherContext = matchNode.lookupMatcherContext();
        Map<String, String> matches = matcherContext.match("123");
        assertTrue(matches.containsValue("123"));
        assertEquals(1, matches.size());
    }
View Full Code Here

Examples of org.apache.cocoon.sitemap.node.MatchNode

        assertEquals(1, matches.size());
    }

    @Test
    public void wildcardMatchingPathAttribute() throws Exception {
        MatchNode matchNode = new MatchNode();
        PrivateAccessor.setField(matchNode, "wildcard", "abc/*/*");
        MatcherContext matcherContext = matchNode.lookupMatcherContext();
        Map<String, String> matches = matcherContext.match("abc/def/ghi");
        assertTrue(matches.containsValue("abc/def/ghi"));
        assertTrue(matches.containsValue("def"));
        assertTrue(matches.containsValue("ghi"));
        assertEquals(3, matches.size());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.