For developers of Apps
Exchange of information between Strap and the application
Information on proteins is passed as an XML document to the application.
For web services, the XML text is send via WIKI:HTTP_POST in the variable "strap".
For local applications, the first program parameter $1 (or %1 on Windows) is the file path of the xml file.
The application performs some kind of computation and may send information to the standard output.
The returned text can be an HTML document or a script for Strap or both.
In the later case the script is embedded in pre tags in the HTML document:
<pre class="strap_script">
... Here comes the script ...
</pre>
Scripts will be interpreted in Strap and HTML documents will be displayed.
HTML documents are shown in the browser, if the text contains the strings "<script" or "stylesheet".
Otherwise a Java based HTML view is used.
OS:W,
MS-Windows: If the program path contains the string "cygwin", then the process is started with a new Cygwin command interpreter.
Data structure
Atom Coordinates: Normally, the 3D-coordinates are not
included. For web applications that require 3D-coordinates, one of
the following flags should be added to the URL or the name of the local executable file:
- -ATOM_COORDINATES-
- -CALPHA_COORDINATES-
- -ATOM_COORDINATES_IF_SELECTED-
- -CALPHA_COORDINATES_IF_SELECTED-
- -FILE_CONTENT-
- -FILE_CONTENT_IF_SELECTED-
Example: http://www.myUrl/myScript.php?options=-ATOM_COORDINATES_IF_SELECTED-CALPHA_COORDINATES-
Please note that uploading of 3D coordinates and PDB files may take long time.
Server side cache:
Using the flag -SERVER_CACHE-, protein data is only uploaded, if it
had not yet been uploaded before or if it had been changed since then.
If the cached information on the application server is lost, the
server should return "RESET_CACHE". As a result, the request is
immediately sent again with all data included.
Adding Apps with program parameters when Strap is started
The program parameter -customizeAddStrapApps=file path or URL of a list of apps
can be used to register applications.
If Strap is web started the respective web variable can be used in the same way.