Project

General

Profile

« Previous | Next » 

Revision 5224

Modified ResourceHandler to change the GET url from /objects to /object to
match the DataONE method name.

View differences:

lib/web.xml.tomcat5
367 367

  
368 368
    <servlet-mapping>
369 369
        <servlet-name>RestServlet</servlet-name>
370
        <url-pattern>/objects/*</url-pattern>
370
        <url-pattern>/object/*</url-pattern>
371 371
    </servlet-mapping>
372 372

  
373 373
    <servlet-mapping>
src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java
53 53
 * the specified <doc-id> in the resource path. For authenticated Get service, a session id must be provided 
54 54
 * in the query string. <br/><br/>
55 55
 * 
56
 * <b>REST URL:</b>	<code>GET, [context-root]/objects/[doc-id]?sessionid=[sessionid] </code><br/>
56
 * <b>REST URL:</b>	<code>GET, [context-root]/object/[doc-id]?sessionid=[sessionid] </code><br/>
57 57
 * <b>Returns:</b> data file <br/><br/>
58 58
 * </li>
59 59
 * 
......
65 65
 * a session id must be provided in the query string. See Earthgrid (a.k.a. Ecogrid) project for XSD files of 
66 66
 * query and resultset documents<br/><br/>
67 67
 * 
68
 * <b>REST URL:</b>	<code>POST, [context-root]/objects?sessionid=[sessionid]</code>    <br/>
68
 * <b>REST URL:</b>	<code>POST, [context-root]/object?sessionid=[sessionid]</code>    <br/>
69 69
 * <b>POST Data:</b> Earthgrid query document , Content-type: <code>text/xml</code><br/>
70 70
 * <b>Returns:</b> Earthgrid resultset document<br/><br/>
71 71
 * 
......
102 102
 * <ul>
103 103
 * <li><h3>Update/Insert: </h3>		
104 104
 * <br/>
105
 * <b>REST URL:</b>	<code>PUT, [context-root]/objects/[doc-id]?op={update|insert}&sessionid=[sessionid]</code>   <br/>
105
 * <b>REST URL:</b>	<code>PUT, [context-root]/object/[doc-id]?op={update|insert}&sessionid=[sessionid]</code>   <br/>
106 106
 * <b>POST Data:</b> document object, Content-type: <code>text/xml</code><br/>
107 107
 * <b>Returns:</b> message in XML format<br/><br/>
108 108
 * </li>
109 109
 * 
110 110
 * <li><h3>Delete: </h3>		
111 111
 * <br/>
112
 * <b>REST URL:</b>	<code>DELETE, [context-root]/objects/[doc-id]?sessionid=[sessionid]</code>   <br/>
112
 * <b>REST URL:</b>	<code>DELETE, [context-root]/object/[doc-id]?sessionid=[sessionid]</code>   <br/>
113 113
 * <b>Returns:</b> message in XML format<br/><br/>
114 114
 * </li>
115 115

  
......
164 164
    /*
165 165
     * API Resources
166 166
     */
167
    private static final String RESOURCE_OBJECTS = "objects";
167
    private static final String RESOURCE_OBJECTS = "object";
168 168
    private static final String RESOURCE_SESSION = "session";
169 169
    private static final String RESOURCE_IDENTIFIER = "identifier";
170 170

  

Also available in: Unified diff