Talk:Server-side Functions
From OPeNDAP Documentation
Tentative specification
This is a first tentative specification, just to see how far we can go with the ideas alreay in mind. Feel free to change, edit, adapt, modify or leave comments. --RobDeAlmeida
Capabilities introspection
The capabilities response is requested by accessing the URL /functions.xml
. Perhaps it would be also a good idea to embed the response in the thredds catalog, or perhaps put at least a pointer to it?
Capabilities response
This is a plain old xml response, inspired by XINS. Parameters are positional, and always required:
<functions xmlns="http://xml.opendap.org/ns/SSF"> <function name="mean"> <description>Calculates mean over axis between two points.</description> <input type="Grid"> <description>The name of the variable to be averaged.</description> </input> <input type="String"> <description>The name of the axis.</description> </input> <input type="Float64"> <description>The initial value of the averaging.</description> </input> <input type="Float64"> <description>The last value of the averaging.</description> </input> <output type="Grid"> <description>A new Grid with a degenerated axis.</description> </output> </function> </functions>
Problem: how do we specify more than one type of input type allowed? I can think of:
<input type="Grid Array">
But the list could get big quickly if we want to list Int32
, UInt16
, etc. It would be nice to have a shortcut to the base types:
<input type="Array Base">
With Base
meaning all the base types.