cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <>
Subject Re: [C2] Sitemap revised again
Date Fri, 30 Jun 2000 06:32:06 GMT

--- Stefano Mazzocchi <> wrote:
> the matcher interface is similar to the Chooser one but different
>  public interface Matcher implements Component {
>    public Map match(String pattern, ...);
>  }

I'm stumbled over the fact that this Interface didn't show if the matcher was indeed successfully
matching a given pattern when the pattern does not contain any wildcards:

<map:match type="uri-wildcard-matcher" pattern="/my/fancy/page">

A solution can be that we can dictate that the returned Map must have a specific entry like
matched=Boolean to make the SitemapProcessor aware of a match. I personaly think this is somehow
weak and doesn't force the matcher to do so. Maybe extending the Interface would be a better

 public interface Matcher implements Component {
   public Map match(String pattern, Boolean matched, ...);

or exchange Map and boolean to 

 public interface Matcher implements Component {
   public boolean match(HashMap map, String pattern, ...);

where the SitemapProcessor supplies the Map and we have the Matcher to supports a specific
like the HashMap supposed above. This design support the possibility to put unused Maps into
pool for later use to eliminate some GC and instantiation overhead in favor to the matcher.clean()

What is your oppinion to this?


PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7           
CH-8166 Niederweningen                    Web:

Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!

View raw message