Examples of MatcherContext


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

    @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

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

    @Test
    public void wildcardMatchingPathAttributeWithSlash() 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

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

    }

    @Test
    public void noMatchingAttribute() {
        MatchNode matchNode = new MatchNode();
        MatcherContext matcherContext = matchNode.lookupMatcherContext();
        assertNull("If there is no match attribute, no matcher can be found.", matcherContext);
    }
View Full Code Here

Examples of org.parboiled.MatcherContext

            return true;
        }

        protected boolean runTestMatch(MatcherContext context) {
            TestMatcher testMatcher = new TestMatcher(context.getMatcher());
            MatcherContext testContext = testMatcher.getSubContext(context);
            return prepareErrorLocation(testContext) && testContext.runMatcher();
        }
View Full Code Here

Examples of org.parboiled.MatcherContext

    public void setTag(Object tagObject) { inner.setTag(tagObject); }

    public Object getTag() { return inner.getTag(); }
   
    public MatcherContext getSubContext(MatcherContext context) {
        MatcherContext subContext = inner.getSubContext(context);
        subContext.setMatcher(this); // we need to inject ourselves here otherwise we get cut out
        return subContext;
    }
View Full Code Here

Examples of org.parboiled.MatcherContext

    public void setTag(Object tagObject) { inner.setTag(tagObject); }

    public Object getTag() { return inner.getTag(); }

    public MatcherContext getSubContext(MatcherContext context) {
        MatcherContext subContext = inner.getSubContext(context);
        subContext.setMatcher(this); // we need to inject ourselves here otherwise we get cut out
        return subContext;
    }
View Full Code Here

Examples of org.parboiled.MatcherContext

    public void setTag(Object tagObject) { inner.setTag(tagObject); }

    public Object getTag() { return inner.getTag(); }
   
    public MatcherContext getSubContext(MatcherContext context) {
        MatcherContext subContext = inner.getSubContext(context);
        subContext.setMatcher(this); // we need to inject ourselves here otherwise we get cut out
        return subContext;
    }
View Full Code Here

Examples of org.parboiled.MatcherContext

    public void setTag(Object tagObject) { inner.setTag(tagObject); }

    public Object getTag() { return inner.getTag(); }

    public MatcherContext getSubContext(MatcherContext context) {
        MatcherContext subContext = inner.getSubContext(context);
        subContext.setMatcher(this); // we need to inject ourselves here otherwise we get cut out
        return subContext;
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.dom.MatcherContext

    return new CrosstabDimension(rowGroup.getField(), title, summary, summaryTitle);
  }

  private static String findTitle(final String field, final Band titleHeader)
  {
    final MatcherContext context = new MatcherContext();
    context.setMatchSubReportChilds(false);

    NodeMatcher m = new AndMatcher(new ElementMatcher(LabelType.INSTANCE),
        new AttributeMatcher(AttributeNames.Wizard.NAMESPACE, AttributeNames.Wizard.LABEL_FOR, field));
    ReportElement match = ReportStructureMatcher.match(context, titleHeader, m);
    if (match == null)
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.