[esip-semanticweb] posted initial version of ToolMatch data model
Hua, Hook (388C)
hook.hua at jpl.nasa.gov
Fri Mar 2 15:53:07 EST 2012
On 3/2/12 12:10 PM, "Lynnes, Christopher S. (GSFC-6102)"
<christopher.s.lynnes at nasa.gov> wrote:
>
>On Mar 2, 2012, at 1:42 PM, Mattmann, Chris A (388J) wrote:
>
>> Hi Guys,
>>
>> On Mar 2, 2012, at 6:18 AM, Lynnes, Christopher S. (GSFC-6102) wrote:
>>>
>>> In addition, machine level code might do this as well, in which case,
>>>the REST-like URL might look like:
>>>
>>> http://toolmatch.esipfed.org/findtools?doi=doi:10.1594/PANGAEA.695832
>>> http://toolmatch.esipfed.org/findtools?gcmd_dif=GES_DISC_AIRX3STD_V005
>>
>> In the above scenario, I'd advocate for:
>>
>>> http://toolmatch.esipfed.org/findtools/doi/10.1594/PANGAEA.695832
>>> http://toolmatch.esipfed.org/findtoolsgcmd/dif/GES_DISC_AIRX3STD_V005
>>
>>
>> Those are inherently more RESTful, and path parameter based.
>
>OK, but no fair stopping with the easy one :-), you've got to add in the
>additional query parameters we'll eventually have as RESTful path
>segments:
>
>>>
>>>http://toolmatch.esipfed.org/findtools?doi=doi:10.1594/PANGAEA.695832&ma
>>>ps=true&os=linux
>
>becomes....
>
Many REST service frameworks support RESTful dispatching of the request
query parameters. CherryPy and JAX-RS are good examples. That is, the set
of parameters
http://toolmatch.esipfed.org/findtools?doi=doi:10.1594/PANGAEA.695832&maps=
true&os=linux
would be (with encoding the "/" in the DOI)
http://toolmatch.esipfed.org/findtools/doi/10.1594%2FPANGAEA.695832/maps/tr
ue/os/linux
But when you look at some practices in RESTful URLs with dispatching verbs
[1], the verb is moved to the end to follow the spirit of RESTful
resources. So:
verb.cgi?restype=type&resid=id
would become:
/type/id/verb
Does that mean our URL example would be the following?
http://toolmatch.esipfed.org/doi/10.1594%2FPANGAEA.695832/findtools
And as Chris L. was saying with the need for query parameters, would it be:
/type/id/verb/{parameter pair verb modifiers}
http://toolmatch.esipfed.org/doi/10.1594%2FPANGAEA.695832/findtools/maps/tr
ue/os/linux
Sometimes doing things the really formal way may not the most
user-friendly way.
--Hook
[1] http://tools.cherrypy.org/wiki/RestfulResource
More information about the esip-semanticweb
mailing list