URI to perform CRUD actions on multiple nodes in a tree

7 views
Skip to first unread message

Vivek

unread,
Jun 24, 2009, 1:21:33 PM6/24/09
to PhyloWS
Hi all,

I know, for deleting a singe node in a tree I need to do use the
following URI with 'DELETE' HTTP method
URI : /phylws/tree/<treeID>/node/<nodeID>

But, What is the URI for deleting two or more nodes from a tree? I.e
to perform specific actions on multiple nodes.

Thank you,
Vivek

Vivek Gopalan, Ph.D.,
Bioinformatics Developer
Bioinformatics and Computational Biosciences Branch (BCBB)
OCICB/OSMO/OD/NIAID/NIH

Contractor, Lockheed Martin
10401 Fernwood road, Fernwood west - 2148
Bethesda, MD 20817

Hilmar Lapp

unread,
Jun 24, 2009, 4:15:57 PM6/24/09
to Vivek, PhyloWS
Hi Vivek,

there is the subtree={true,false} parameter if the nodes you want to
delete in bulk are those comprising a clade.

If the nodes you want to delete are random, however, you would simply
call the delete for every corresponding node URI. Do you see a problem
with this?

-hilmar
--
===========================================================
: Hilmar Lapp -:- Durham, NC -:- hlapp at duke dot edu :
===========================================================




Rutger Vos

unread,
Jun 27, 2009, 6:15:08 AM6/27/09
to Vivek, PhyloWS
I'm wondering about the URL API - have we standardized around
hierarchical structure like /phylws/tree/<treeID>/node/<nodeID>? Or
are they basically opaque identifiers after /phylows/?
--
Dr. Rutger A. Vos
Department of zoology
University of British Columbia
http://www.nexml.org
http://rutgervos.blogspot.com

Hilmar Lapp

unread,
Jun 27, 2009, 6:40:53 AM6/27/09
to Rutger Vos, Vivek, PhyloWS

On Jun 27, 2009, at 12:15 PM, Rutger Vos wrote:

> I'm wondering about the URL API - have we standardized around
> hierarchical structure like /phylws/tree/<treeID>/node/<nodeID>?

Yes we have. At least that's what the documentation says.

Do you see a problem with that?

-hilmar

Rutger Vos

unread,
Jun 27, 2009, 7:30:52 AM6/27/09
to Hilmar Lapp, Vivek, PhyloWS
I'm not sure - I think I need to know more about purls first. You're
in charge of purl.org/phylo, right? I'm curious how this forwarding
works, and whether we can map these hierarchical structures onto purls
in an elegant way. Could you add me to the group for this domain?

Rutger

--

Hilmar Lapp

unread,
Jun 27, 2009, 10:17:13 AM6/27/09
to Rutger Vos, Vivek, PhyloWS

On Jun 27, 2009, at 1:30 PM, Rutger Vos wrote:

>
> I'm curious how this forwarding works

It's a simple redirect. It can map one full URL to another, or
redirect by pattern using a base URL. The /phylo/treebase/phylows/
redirect works by translating that as the base and appending unchanged
any suffix following it.

> , and whether we can map these hierarchical structures onto purls
> in an elegant way.

I'm still not sure where you see the possible problem. You would only
run into a problem if the suffix structure of the target depends on
elements nested within in.

This is, however, not allowed in PhyloWS (at least not at present, and
we should understand rather well why that doesn't fulfill a certain
requirement if we wanted to allow it).

> Could you add me to the group for this domain?

Sure. Send me the email you want to be added under.

Rutger Vos

unread,
Jun 27, 2009, 5:51:11 PM6/27/09
to Hilmar Lapp, Vivek, PhyloWS
> I'm still not sure where you see the possible problem. You would only run
> into a problem if the suffix structure of the target depends on elements
> nested within in.

I don't think there's any problem - I just needed to wrap my head
around the fact that inside the phylows universe the urls can be
decomposed into segments that have their own semantics, but then in
the purl universe the whole thing becomes an opaque string to which
the request is redirected.

I have wrapped my head around that now, though :)

BTW, do we have a controlled vocabulary of allowed path fragments? Are
they basically nexml element names, i.e. /otus/, /otu/, /trees/,
/tree/, /node/ etc.?

> Sure. Send me the email you want to be added under.

rutge...@gmail.com

Thanks!

Rutger

Hilmar Lapp

unread,
Jun 29, 2009, 7:04:04 AM6/29/09
to Rutger Vos, Vivek, PhyloWS

On Jun 27, 2009, at 1:30 PM, Rutger Vos wrote:

> You're in charge of purl.org/phylo, right? I'm curious how this
> forwarding
> works, and whether we can map these hierarchical structures onto purls
> in an elegant way. Could you add me to the group for this domain?


Sorry, I confused myself here about what you asked for. Anyone can
inspect PURLs and how they are redirected. Go to http://purl.org/maint/display.html
, type in /phylo in the PURL field, then select the one you want to
inspect.

Bill is currently registered as a maintainer for the /phylo/treebase/
phylows PURL. If you want to be able to modify how that redirects,
register yourself as a user on http://purl.org and email me your ID
(the interface needs the userIDs, not the emails, sorry for confusing
that).

Do you also want to create additional PURLs under the /phylo domain
yourself (maybe additional ones for TreeBASE?)?

Hilmar Lapp

unread,
Jun 29, 2009, 11:08:11 AM6/29/09
to Rutger Vos, Vivek, PhyloWS

On Jun 27, 2009, at 11:51 PM, Rutger Vos wrote:

> do we have a controlled vocabulary of allowed path fragments? Are
> they basically nexml element names, i.e. /otus/, /otu/, /trees/,
> /tree/, /node/ etc.?


At present the official PhyloWS spec has /phylows/tree/, /phylows/
matrix/, /phylows/find, and /phylows/create.

Anything else at this point would be a data provider-specific
extension (which in principle is OK). If you basically want to use the
element names in NeXML, that sounds fine. As RESTful URIs are more
noun and vocabulary-oriented, I'd be more explicit if you want to
identify sets rather than single data items. For example, you may want
to consider 'otu-set' rather than 'otus'.

Just keep in mind that the by and far primary motivation for these
additional base URIs should be to satisfy TreeBASE application
requirements. For most other data providers they may never be
supported, because they may not have permanent identifiers for the
additional NeXML data elements.

Rutger Vos

unread,
Jun 29, 2009, 3:42:03 PM6/29/09
to Hilmar Lapp, Vivek, PhyloWS
How about /phylows/tree/find to search for trees, /phylows/matrix/find
for matrices etc. This way we do have a "from" clause in the CQL, i.e.
/phylows/tree/find?query="dc:identifier=TB2:Tr1231" means "select *
from tree where tree.id=TB2:Tr1231".

--

Reply all
Reply to author
Forward
0 new messages