Unicorn Contract Specification

Presentation

The contract between the framework and one observer is composed of two files located on observer side :

WADL

Information about WADL can be found here. This file describes the communication protocol between an observer and the framework who wants to use it. It defines all communication methods with their parameters and values allowed. An example WADL file for the css observer can be found here.

Application

The application element is the root of the WADL file and contains the following elements :

Resource

The resource element describes a single resource provided by the observer. It contains method element to describe the input to the observer.

Method

A method element describes the input of a HTTP protocol method that may be applied to a resource. A method element has the following combinations of attributes :

A method element has one child element :

Request

A request element describes the input that may be included when applying a HTTP method to a resource. A request element has no attributes and may contains zero or more query_variable elements.

Query variable

A query_variable element represents a URI query parameter as described in section 17.13 of HTML 4.01. The runtime values of query variables are sent as URI query parameters when the HTTP method is invoked. A query_variable element has no defined child elements and has the following attributes :

RDF

This file contain all localized information, lists of mimetypes handled by each method of the observer and information about input parameter handle by the observer. An example RDF file for the css observer can be found here. This file has an ucn:Observer element which contains :