abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Abley" <james.ab...@gmail.com>
Subject URI templates question
Date Wed, 05 Nov 2008 15:49:33 GMT

I was trying to use URI templates, which seem a good match for what
I'm trying to accomplish. The implementation that comes with Jersey is
a little incomplete for what I'm trying to do, so I'm using the Abdera
(non-JSR311) implementation instead. I've hit a couple of things which
undoubtedly are a result of my lack of understanding of how URI
templates are supposed to work.

    public void uriTemplateLearningTests() throws Exception {
        Template template = new Template("{baseUri}{-prefix|/|datePart}");


        Map<String, Object> map = new HashMap<String, Object>();
        map.put("baseUri", "/home/feeds");

template.expand(map).replaceAll("%2F", "/"));

        map.put("datePart", "2008/11/04");

template.expand(map).replaceAll("%2F", "/"));

I don't want the result with %2F due to not having a single path
variable in the contents of my map; i.e. "home" rather than
"/home/feeds". Is this possible?



View raw message