![]() ![]() ![]() |
RAMADDA User Guide
|
http://The base path (by default /repository) is the same for the entire repository. This is set with the ramadda.html.urlbase property. The API path determines what service is being invoked. When viewing an entry the default path is /entry/show. This supports a number of result encodings described below. Other paths include:/ / / ?entryid= e.g.: http://ramadda.org/repository/entry/show/Home/RAMADDA+Examples?entryid=a96b9616-40b0-41f5-914a-fb1be157d97c
/entry/get - return the file /opendap - access gridded data via OpenDAP.The entry is identified by the entryid URL argument:
http://ramadda.org/repository/entry/show/Home/RAMADDA+Examples?entryid=a96b9616-40b0-41f5-914a-fb1be157d97cThe path to the entry (e.g., /Home/RAMADDA+Examples) is optional if the entryid argument is provided. However, if the entryid argument is not provided then RAMADDA will use the path:
http://ramadda.org/repository/entry/show/Home/RAMADDA+ExamplesThough this works we kindof discourage this approach because if you change a name or location then any links the entry would break.
Note: The above file has "_dummy" appended to it. To actually use this in the IDV change the name so it ends with api.xml. This file can be organized as a set of group tags that define a handler and contain a set of api. The api tag can also define a handler. The handlers are one of: usermanager, admin, harvestermanager, actionmanager, accessmanager, metadatamanager, repository.<api> <property name="admin" value="false"/> <property name="cancache" value="true"/> <group handler="repository"> <api request="/entry/show" method="processEntryShow" name="Home" toplevel="true" ishome="true"/> <api request="/entry/show/*" method="processEntryShow"/> ... </group> <group handler="metadatamanager"> <api request="/metadata/list" method="processMetadataList"/> <api request="/metadata/form" method="processMetadataForm" actions="edit"/> ... </group> <group handler="admin"> <api request="/admin/sql" method="adminSql" admin="true"/> <api request="/admin/startstop" method="adminDbStartStop" admin="true"/> ... </group> </api> developer/api_dummy.xml
External classes can be used as handlers by providing the full
class name. These handlers need to implement RequestHandler
and need to have a public constructor that takes as argument the
Repository object and the xml api Element.
The api tag contains a path attribute which is used the
the url path. e.g., the main way to view an entry is the "/entry/show" path. The url ends up looking like:
<repository suffix>/entry/show?id=<entry id>
The method attribute is the method name on the handler that is called.
These methods have the signature:
public Result processEntryShow(Request request) throws Exception { ... }They take a
Request
object and return a Result
object.