How to create a new widget for CARGO
A widget for CARGO (biowidget) is a mini-application for helping experimental biologists, with no training in bioinformatics, to answer biomedical questions. They provide pieces of minimal, relevant and descriptive biomedical information comming from different Internet resources, independently of their native format or access method. A good widget for CARGO shows the requested information in a fast, flexible and intuitive way.
It receives request, such as GET HTTP, whose parameter name is denoted by one identifier that widget could receive from namespace list. (see "namespace list" part of Widget description section). If a widget accepts entity identifiers from "Ensembl" data base the GET parameter will be ensemblId, for example:
A widget for CARGO is described by an XML Document that contains several fields providing information about itself. In the following lines we are going to explain its structure, giving the meaning for each field, and the different ways to describe and register it in CARGO.
Widget XML Document
The XML Document keeps relevant information describing the widget. Use the XML Document shown bellow as an example.
Likewise, the XML Document, an XML Schema is created. The XML Schema describes the XML Document's structure allowing us to validate its XML frame. Here you are the link where the XML Schema is:
If you want more information about xml schema link to this XMLSchema Documentation.
A XML Document can house several widgets. All of them are holding within "widgetList" tag. The XML Document uses the following namespace for widget list:
- widget: Every widget has XML structure that describes itself.
- quarantine (attribute): Boolean value that describes if the widget is in commissioning ('false') or developing ('true'). By the default a widget is in quarantine ('true').
- name: Name of widget.
- description: Widget description.
- url: URL where the widget is located .
- documentation: Additional Online documentation which gives more information about the widget. This tag is optional
- icon: Image file URI. The widget icon. This tag is optional.
- window: Provides the default widget's window size.
- width: Widget's width. Default value "300px". This value must to be an integer. This tag is optional.
- height: Widget's height. Default value "300px". Must be an integer. This tag is optional.
- type: Every widget must be classified into one type.
- name: Widget's type. The value must be one of following:
- namespaceList:The list of input namespaces that widget accepts. By default, the widget must admit gene identifiers whose namespace is "Ensembl".
- id: Tag for the namespace attribute. It is the passing parameter.
This attribute is required. At the moment, the unique value is "ensemblId" which is the identifier of "Ensembl" database.
- projectList: The list of projects where every given widget is registered. At least, the widget must be associated to one project.
- name: Each project has one name.
- provider: Information related to the widget provider.
- username: Widget provider.
Because the widget provider has be registered the "username" field is good enough for its identification.
The list of types uses is own namespace:
Identifying the list of namespaces, the XML Document uses the namespace:
Identify the project name to avoid any conflict, the list of projects is identified by the namespace:
Identifying the provider, the XML Document uses the namespace:
Note: XML Namespaces provide a method to avoid element name conflicts. So, it is required to supply every namespace ("widgetList", "namespaceList", "typeList", "projectList", and "provider").
Note2:Your widget XML Document is validated when you register it. So, be careful with its XML structure. Here you are some advices:
- XML tags must keep the same order shown in the example.
- The value of permanent tags (like "type" and "namespace id") must be the same as described before.
How to register your widget in CARGO
If you want to register a widget in CARGO first of all you must create a new account in CARGO.
In the registration web page there are three ways to edit your widget.
- Using an XML file: The user uploads an XML Document describing his/her widget.
- Using an URL: The user gives an "Uniform Resource Locator" (URL) where the widget's XML Document is located.
- Filling a web form: Self-explanatory ;).
There are three tasks the widget provider can make:
- Register new widget: Register a new widget using one of three different ways mentioned before.
- Update old widget: Modify the field values that describe the widget. The only way to do this is using the web form.
- Delete old widget: Delete a widget. The only way to do this is using the web form.