Aggregate { public boolean hasRelativeNodeInclude(String nodePath) { for (NodeInclude ni : relativeNodeIncludes){ if (ni.matches(nodePath)){ return true; } } return false; } Aggregate(String nodeTypeName);  Aggregate(String nodeTypeName, List<? extends Include> includes);   Aggregate(String nodeTypeName, List<? extends Include> includes,
              int recursionLimit); List<? extends Include> getIncludes(); void collectAggregates(NodeState root, ResultCollector collector); List<Matcher> createMatchers(AggregateRoot root); boolean hasRelativeNodeInclude(String nodePath); boolean hasNodeAggregates(); @Override String toString(); static final String MATCH_ALL; static final int RECURSIVE_AGGREGATION_LIMIT_DEFAULT; final int reAggregationLimit; }
@Test public void includeMatches() throws Exception{ Aggregate ag = new Aggregate("nt:base", of(ni(null, "*", true), ni(null, "*/*", true))); assertTrue(ag.hasRelativeNodeInclude("foo")); assertTrue(ag.hasRelativeNodeInclude("foo/bar")); assertFalse(ag.hasRelativeNodeInclude("foo/bar/baz")); Aggregate ag2 = new Aggregate("nt:base", of(ni(null, "foo", true), ni(null, "foo/*", true))); assertTrue(ag2.hasRelativeNodeInclude("foo")); assertFalse(ag2.hasRelativeNodeInclude("bar")); assertTrue(ag2.hasRelativeNodeInclude("foo/bar")); assertFalse(ag2.hasRelativeNodeInclude("foo/bar/baz")); }