Project

General

Profile

« Previous | Next » 

Revision 5211

Merging in REST interface implementation that was created by Serhan Akin. Main change is
a refactored MetaCatServlet.java class, in which all of the handle* methods were moved
into a separate MetacatHandler.java class. This allows both the standard MetaCatServlet
and the new RestServlet to both call the MetacatHandler.handle* methods as needed. This
is a basic port of Akin's work without any major changes to his design or architecture.
One major difference is that the ResourceHandler.query() method has been essentially
disabled because it relied on EcoGrid classes which would have generated a circular
dependency between EcoGrid and Metacat. See the comments in ResourceHandler describing
these issues. Until the circularities are resolved, the REST query() method will
be disabled.

View differences:

web.xml.tomcat5
279 279
    <load-on-startup>100</load-on-startup>
280 280
  </servlet>
281 281

  
282
<!-- REST Servlet -->
283
    <servlet>
284
      <servlet-name>RestServlet</servlet-name>
285
      <servlet-class>edu.ucsb.nceas.metacat.restservice.RestServlet</servlet-class>
286
      <init-param>
287
        <param-name>debug</param-name>
288
        <param-value>1</param-value>
289
      </init-param>
290
      <init-param>
291
        <param-name>listings</param-name>
292
        <param-value>true</param-value>
293
      </init-param>
294
      <load-on-startup>10</load-on-startup>
295
    </servlet>
296

  
282 297
  <!--<servlet-mapping>
283 298
        <servlet-name>gwt</servlet-name>
284 299
        <url-pattern>/gwt</url-pattern>
......
350 365
    <url-pattern>/SOAPMonitor</url-pattern>
351 366
  </servlet-mapping>
352 367

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

  
373
    <servlet-mapping>
374
        <servlet-name>RestServlet</servlet-name>
375
        <url-pattern>/session/*</url-pattern>
376
    </servlet-mapping>
377

  
378
    <servlet-mapping>
379
        <servlet-name>RestServlet</servlet-name>
380
        <url-pattern>/identifier/*</url-pattern>
381
    </servlet-mapping>
382

  
383

  
353 384
 <!-- uncomment this if you want the admin servlet -->
354 385
  <servlet-mapping>
355 386
    <servlet-name>AdminServlet</servlet-name>

Also available in: Unified diff