Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<HTML><HEAD><TITLE>Resource resource</TITLE></TITLE><LINK REL='stylesheet' TYPE='text/css' HREF='../doclet.css' TITLE='Style'/><META http-equiv="Content-Type" content="text/html; charset=UTF-8">
</HEAD><BODY><!--###BEGIN_CONTENT###--><div class="javadoc"><table class='menu'><colgroup><col/><col/></colgroup><tbody><tr><td class='NavBarCell1' colspan='2'><table><tbody><tr><th><a href='../overview-summary.html'>Overview</a></th><th><a href='../overview-index.html'>Index</a></th><th><a href='../index.html'>Root resource</a></th></tr></tbody></table></td></tr><tr><td class='NavBarCell3'>summary: <a href='#resources'>resource</a> | <a href='#methods-summary'>method</a></td><td class='NavBarCell3'>detail: <a href='#methods-details'>method</a></td></tr></table><h2>Path: / <a href='../index.html'>{BASE}</a> / resource</h2>Returns a link to a remote resource (data or content) with the given uri
 and an accepted return type
<P>
<hr/><table class='info' id='resources'><caption class='TableCaption'>Resources</caption><tbody><tr><th class='TableHeader'>Name</th><th class='TableHeader'>Description</th></tr><tr><td><a href='{uuid}/index.html'>{uuid}</a></td><td>Returns a link to a local resource (data or content) with the given uuid
 and an accepted return type</td></tr></tbody></table><hr/><table class='info' id='methods-summary'><caption class='TableCaption'>Method Summary</caption><tbody><tr><th class='TableHeader'>Resource</th><th class='TableHeader'>Description</th></tr><tr><td><tt><a href='#POST'>POST /{BASE}/resource?uri=…</a></tt></td><td>Creates new resource with given uri.</td></tr><tr><td><tt><a href='#GET'>GET /{BASE}/resource?genid=…&amp;format=…&amp;uri=…</a></tt></td><td>Returns a link to a remote resource (data or content) with the given uri
 and an accepted return type</td></tr><tr><td><tt><a href='#PUT'>PUT /{BASE}/resource?uri=…</a></tt></td><td>Returns a Link where the given data (metadata or content) can be put to
 the remote resource</td></tr><tr><td><tt><a href='#DELETE'>DELETE /{BASE}/resource?uri=…</a></tt></td><td>Delete remote resource with given uri</td></tr></tbody></table><hr/><table class='info' id='methods-details'><caption class='TableCaption'>Method Detail</caption><tbody></tr><tr><td><a name='POST'></a><table class='examples'><tr><td><b>HTTP Example:</b><pre>POST /{BASE}/resource?uri=…

</pre></td><td><b>API Example:</b><p><tt>ResourceWebService.postNewOrRemote({'uri': <span class='comment'>/* uri , the fully-qualified URI of the resource to create in the
            triple store */</span>});</tt></p></td></tr></table><p>Creates new resource with given uri. If no uri is defined it creates a
 local uri with random uuid</p><dl><dt><b>Output:</b></dt><dd><tt>javax.ws.rs.core.Response</tt> - HTTP response (body is a String message)</dd><dt><b>Query parameters:</b></dt><dd><b>uri</b> - , the fully-qualified URI of the resource to create in the
            triple store</dd>
<DT><B>HTTP return codes:</B></DT><DD><B>201</B> - new resource created</DD>
<DD><B>302</B> - resource already exists</DD>
<DD><B>500</B> - Internal Error</DD>


<DT><B>HTTP response headers:</B></DT><DD><B>Location</B> - the url of the new/found resource</DD>

</dl></td></tr><tr><td><a name='GET'></a><table class='examples'><tr><td><b>HTTP Example:</b><pre>GET /{BASE}/resource?genid=…&amp;format=…&amp;uri=…
Accept: …

</pre></td><td><b>API Example:</b><p><tt>ResourceWebService.getRemote({'genid': <span class='comment'>/* Returns a link to a remote resource (data or content) with the given uri
 and an accepted return type */</span>,<br/>&nbsp;&nbsp;'format': <span class='comment'>/* format forces representation format (optional, normal content negotiation performed if empty) */</span>,<br/>&nbsp;&nbsp;'uri': <span class='comment'>/* uri    the fully-qualified URI of the resource to create in the triple store */</span>,<br/>&nbsp;&nbsp;'Accept': <span class='comment'>/* Returns a link to a remote resource (data or content) with the given uri
 and an accepted return type */</span>});</tt></p></td></tr></table><p>Returns a link to a remote resource (data or content) with the given uri
 and an accepted return type</p><dl><dt><b>Output:</b></dt><dd><tt>javax.ws.rs.core.Response</tt></dd><dt><b>Query parameters:</b></dt><dd><b>genid</b></dd><dd><b>format</b> - forces representation format (optional, normal content negotiation performed if empty)</dd><dd><b>uri</b> - the fully-qualified URI of the resource to create in the triple store</dd><dt><b>Header parameters:</b></dt><dd><b>Accept</b></dd>
<DT><B>HTTP return codes:</B></DT><DD><B>303</B> - resource can be found in the requested format under Location</DD>
<DD><B>400</B> - bad request (maybe uri is not defined)</DD>
<DD><B>404</B> - resource cannot be found</DD>
<DD><B>406</B> - resource cannot be found in the given format</DD>
<DD><B>500</B> - Internal Error</DD>


<DT><B>HTTP response headers:</B></DT><DD><B>Location</B> - the url of the resource in the requested format</DD>
<DD><B>Content-Type</B> - (for HTTP 406) a list of available types
 (content and meta)</DD>


<DT><B>HTTP request headers:</B></DT><DD><B>Accept</B> - accepted mimetypes; value must follow the pattern
 (.+/.+(;rel=(content|meta))?,)+</DD>

</dl></td></tr><tr><td><a name='PUT'></a><table class='examples'><tr><td><b>HTTP Example:</b><pre>PUT /{BASE}/resource?uri=…
Content-Type: …

</pre></td><td><b>API Example:</b><p><tt>ResourceWebService.putRemote({'uri': <span class='comment'>/* uri , the fully-qualified URI of the resource to create in the
            triple store */</span>,<br/>&nbsp;&nbsp;'Content-Type': <span class='comment'>/* Returns a Link where the given data (metadata or content) can be put to
 the remote resource */</span>});</tt></p></td></tr></table><p>Returns a Link where the given data (metadata or content) can be put to
 the remote resource</p><dl><dt><b>Output:</b></dt><dd><tt>javax.ws.rs.core.Response</tt> - a link where the data can be put (depends on Content-Type)</dd><dt><b>Query parameters:</b></dt><dd><b>uri</b> - , the fully-qualified URI of the resource to create in the
            triple store</dd><dt><b>Header parameters:</b></dt><dd><b>Content-Type</b></dd>
<DT><B>HTTP return codes:</B></DT><DD><B>303</B> - resource in given format can be put under Location</DD>
<DD><B>400</B> - bad request (e.g. uri is null)</DD>
<DD><B>404</B> - resource cannot be found</DD>
<DD><B>415</B> - Content-Type is not supported</DD>
<DD><B>500</B> - Internal Error</DD>


<DT><B>HTTP response headers:</B></DT><DD><B>Location</B> - (for HTTP 303) the url where data can be put</DD>


<DT><B>HTTP request headers:</B></DT><DD><B>Content-Type</B> - type of the body; value must follow the
 pattern .+/.+(;rel=(content|meta))?</DD>

</dl></td></tr><tr><td><a name='DELETE'></a><table class='examples'><tr><td><b>HTTP Example:</b><pre>DELETE /{BASE}/resource?uri=…

</pre></td><td><b>API Example:</b><p><tt>ResourceWebService.deleteResourceRemote({'uri': <span class='comment'>/* uri , the fully-qualified URI of the resource to create in the
            triple store */</span>});</tt></p></td></tr></table><p>Delete remote resource with given uri</p><dl><dt><b>Output:</b></dt><dd><tt>javax.ws.rs.core.Response</tt> - HTTP response (success or error)</dd><dt><b>Query parameters:</b></dt><dd><b>uri</b> - , the fully-qualified URI of the resource to create in the
            triple store</dd>
<DT><B>HTTP return codes:</B></DT><DD><B>200</B> - resource deleted</DD>
<DD><B>400</B> - bad request (e.g, uri is null)</DD>
<DD><B>404</B> - resource not found</DD>

</dl></td></tr></tbody></table><hr/><table class='menu'><colgroup><col/><col/></colgroup><tbody><tr><td class='NavBarCell1' colspan='2'><table><tbody><tr><th><a href='../overview-summary.html'>Overview</a></th><th><a href='../overview-index.html'>Index</a></th><th><a href='../index.html'>Root resource</a></th></tr></tbody></table></td></tr><tr><td class='NavBarCell3'>summary: <a href='#resources'>resource</a> | <a href='#methods-summary'>method</a></td><td class='NavBarCell3'>detail: <a href='#methods-details'>method</a></td></tr></table></div><!--###END_CONTENT###--><hr/><div class='footer'>Generated by <a href='http://www.lunatech-labs.com/open-source/jax-doclets'>Lunatech Labs jax-doclets</a> v0.10.0</div></BODY></HTML>
New to GrepCode? Check out our FAQ X