ViewableRule r = new ViewableRule();
ci.inject(r);
// The matching rule for a sub-resource template
patterns.add(new PatternRulePair<UriRule>(
new UriPattern("/([^/]+)"), r));
// The matching rule for an index template
patterns.add(new PatternRulePair<UriRule>(
UriPattern.EMPTY, r));
}
// The terminating rule when the path is not fully consumed and accepted
patterns.add(new PatternRulePair<UriRule>(
new UriPattern(".*"), new TerminatingRule()));
// The terminating rule when the path is fully consumed and accepted
patterns.add(new PatternRulePair<UriRule>(
UriPattern.EMPTY, new TerminatingRule()));
// Create the sequential rules
UriRules<UriRule> sequentialRules =