not logged in  
login | register  


Web Services


3.3 Custom parameters

The IVOA standard of spectral data model is flexible enough to allow adding custom properties to the exinting schema. In VOTable representation adding custom properties is done by adding additional <PARAM> tags to the XML file, which may be easy to write programatically, but difficult to read, since the the reader code should distiguish between predefined and custom properties. Since the web service standard (SOAP) doesn't provide an easy way to deal with previously undeclared schema members, in Spectrum Services we choose an other approach to group custom properties together in an array. A Custom class is derived from the Group class allowing users to add any number and type of Param classes to a collection on a key-value pair basis.

(It would be an option to store all parameters in a tree-like structure and identify each node by a key, but this would cause problems in writing program code, since predefined variables are strongly typed and named and iit gives a compile time error when there's a typo somewhere. When identifying nodes by keys, the strings are not evaluated in compile time, only run-time making debuging a disaster.)