code: public static boolean matches(String pattern, URI resource)
              throws ParseException {
          return (new ResourcePattern(pattern)).matches(resource) >= 0;
      }
docs: Matches the given pattern against the given resource URI.
  
  @param pattern the pattern to match
  @param resource the URI specifying the resource to match
  @return {@code true} if the resource URI matches
  @throws ParseException if an invalid pattern is specified