question about inserting new data (using JAX-RX)
Monday, 10 May 2010 · 2 messages
RP
Robby Pelssers10 May 2010 10:18 #
When reading following snippet from the documentation I start wondering how-to specify that I want to add this resource to a specific collection in the database. And the same basically applies to GET, DELETE, ...
How does one specifically target a resource from a collection using JAX-RX?
Kind regards,
Robby Pelssers
----------------------------------------
PUT Requests
PUT can be used to create or update a database resource. To create a new resource called XMark, the following URL http://localhost:8984/basex/jax-rx/XMark
must be sent to the server as PUT request, followed by the XML file in the HTTP body. If the process was successful, a HTTP response with status code 201 (CREATED) is sent back. Otherwise, 404 will be sent. ----------------------------------------
CG
Christian Grün10 May 2010 11:53 #
Dear Robby Pelssers,
Quoted text · Robby Pelssers · 3 lines
> When reading following snippet from the documentation I start wondering how-to specify that I want to add this resource to a specific collection in the database. And the same basically applies to GET, DELETE, ... > > How does one specifically target a resource from a collection using JAX-RX?
For simplicity, and due to historical reasons, the concept of a database and a collection is pretty much the same in BaseX. This means e.g. that there is no collection hierarchy within a single database. This might change in future, though, as more and more people are using BaseX to store multiple small (instead of single large) documents within a database instance.
Hope this helps,
Christian
___________________________
Christian Gruen
Universitaet Konstanz
Department of Computer & Information Science
D-78457 Konstanz, Germany
Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577
http://www.inf.uni-konstanz.de/~gruen
Written for BaseX 6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery