abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remy Gendron" <r...@arrova.ca>
Subject RE: Route matching for categories
Date Thu, 01 May 2008 14:53:48 GMT
My requirements are pretty minimal.. no boolean arithmetic. An implicit AND
is all I need. I would dislike having to use a pattern other than separating
the categories with forward slashes. I could separate categories with
underscores but I don't want to.

Anyway to quickly fix the pattern used by the Route class so that using '/'
between categories at the end of the URI is supported?

Thanks,
 
Rémy
 

 
remy.gendron@arrova.ca
 
418 809-8585
http://arrova.ca
 
-----Original Message-----
From: Chris Berry [mailto:chriswberry@gmail.com] 
Sent: May 1, 2008 10:45
To: abdera-user@incubator.apache.org
Subject: Re: Route matching for categories

We resorted to creating our own TargetResolver (in 0.3.0, but don't  
know how this translates to 0.4.0)
If you are using the GData scheme, then - once you get into boolean  
arithmetic on Categories - you will need to do the same eventually...
Ditto for batching, etc.
Cheers,
-- Chris

On May 1, 2008, at 9:31 AM, Remy Gendron wrote:

> Hello all,
>
> My Regex is not good enough to interpret the intricacies of the  
> Route class internals.
>
> I have chosen the GDATA URI pattern (…/-/cat1/cat2/cat3/etc) to  
> target categories.
>
> It works great for targeting one category, but fails with multiple  
> categories. The second unit test below fails:
>
>     @Test
>     public void testRouteSingleCategory() {
>         Route r = new Route("test", "/ 
> atom/:collection/-/:categories");
>
>         assertTrue(r.match("/atom/movies/-/scifi"));
>     }
>
>     @Test
>     public void testRouteMultipleCategories() {
>         Route r = new Route("test", "/ 
> atom/:collection/-/:categories");
>
>         assertTrue(r.match("/atom/movies/-/scifi/drama"));
>     }
>
> Can a regex guru explain in plain english the match pattern used in  
> the Route class?
>
> Thanks,
>
> Rémy
>
>
>
> Courriel:            remy.gendron@arrova.ca
> Cellulaire:          418 809-8585
> Site Web:          http://arrova.ca
> Liste:
http://mail.arrova.ca/mailman/listinfo/dev-list_arrova.ca
>



Mime
View raw message