RESTXQ annotations


This is a very powerful mechanism introduced by RESTXQ spec. It allows dynamic publishing of custom resources defined via annotations assigned to functions in XQuery modules. The supported annotations are similar to the ones specified in JAX-RS spec:

  • @rest:GET/@rest:POST/@rest:PUT/@rest:DELETE – specifies HTTP method to access the annotated XQuery functions;
  • @rest:consumes/@rest:produces – specifies payload mime types;
  • @rest:path – specifies resource path and parameters provided via path templates;
  • @rest:cookie-param/@rest:form-param/@rest:header-param/@rest:query-param/@rest:matrix-param – parameter annotations specifying mechanism used to pass parameters to XQuery functions;

XQuery modules and REST resources are managed dynamically via Bagri management interfaces. So, it is very easy to extend existing Schema with some custom behavior implemented in a new XQuery module, then publish it via Schema resource and access it by HTTP entirely on the fly with no server downtime.