abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James M Snell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ABDERA-287) Updated URI Template Implementation (based on http://tools.ietf.org/html/draft-gregorio-uritemplate-06)
Date Wed, 24 Aug 2011 14:46:31 GMT

    [ https://issues.apache.org/jira/browse/ABDERA-287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13090268#comment-13090268

James M Snell commented on ABDERA-287:

Well, it's an update for the existing uri template impl that's already
there. For now, unless there's major reason to get it into trunk, keeping
the patch available in jira is sufficient I think. People who want to play
around with it can patch their source.

Fwiw, I've been playing around with a significant update to the i18n module,
fixing bugs, improving performance, and finally getting around to the ICU
support for the unicode stuff. When I'm done with that i'll submit the patch
for that as well.
now - how would it be integrated into Abdera?
URI Templates specification.
implementation. The URI Template spec has changed significantly.

> Updated URI Template Implementation (based on http://tools.ietf.org/html/draft-gregorio-uritemplate-06)
> -------------------------------------------------------------------------------------------------------
>                 Key: ABDERA-287
>                 URL: https://issues.apache.org/jira/browse/ABDERA-287
>             Project: Abdera
>          Issue Type: Improvement
>            Reporter: James M Snell
>         Attachments: uritemplate_update.txt
> Updated URI Template implementation based on the latest version of the URI Templates
> http://tools.ietf.org/html/draft-gregorio-uritemplate-06
> This is NOT a drop in replacement for the existing URI Template implementation. The URI
Template spec has changed significantly.
> Example:
>     HashMap<String,String> map = new HashMap<String,String>();
>     map.put("semi",";");
>     map.put("dot",".");
>     map.put("comma",",");
>     HashMap<String,Object> context = new HashMap<String,Object>();
>     context.put("dom","example.com");
>     context.put("dub","me/too");
>     //context.put("foo","That's right!");
>     context.put("hello","Hello World!");
>     context.put("half","50%");
>     context.put("var","value");
>     context.put("who","fred");
>     context.put("base","http://example.com/home/");
>     context.put("path","/foo/bar");
>     context.put("list", new String[] {"red", "green", "blue"});
>     context.put("keys", map);
>     context.put("v",6);
>     context.put("x",1024);
>     context.put("y",768);
>     context.put("empty","");
>     context.put("empty_keys",new HashMap<String,String>());
>     context.put("foo", CharBuffer.wrap("That's right!"));
>     Template template = 
>       new Template("http://www{.list*}{/list*}{?foo,var,hello}{&half,x,y}#{var}");
>     System.out.println(template.expand(context));
> Expands to:
>   http://www.red.green.blue/red/green/blue?foo=That%27s%20right%21&var=value&hello=Hello%20World%21&half=50%25&x=1024&y=768#value

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message