Download Latest Version fidabpdm_R11B.zip (9.8 MB)
Email in envelope

Get an email when there's a new version of FIDAB PDM

Name Modified Size InfoDownloads / Week
Parent folder
readme 2010-04-04 3.4 kB
fidabwebgateway_R1A.zip 2010-04-04 52.2 kB
Totals: 2 Items   55.6 kB 0
FIDAB Web Gateway
=================

This software exposes the FIDAB database as JSON documents served over
HTTP. See http://fidab.sf.net for more information.

A number of CLI commands can be used to script the access to FIDAB data.



Install Web Gateway
-------------------

1. Install the FIDAB database in PostgreSQL using scripts and
instructions from FIDAB PDM release R7+.


2. Install Django.


3. Edit fidab/settings.py to match your environment.


4. Create django tables.

# fidab/manage.py syncdb


5. Start FIDAB Web Gateway.

# fidab/manage.py runserver



Install CLI
-----------

1. Set the environment variable FIDAB_HOME to the directory where the
cli/* files are installed.

# export FIDAB_HOME=/opt/fidab



Access FIDAB Web Gateway from a Browser
---------------------------------------

FIDAB is addressed within the Django framework with root URI
'fidab'. If you are running Django locally, you can open FIDAB with
'http://localhost:8000/fidab'. You will first have to login with your
Django manager account to access the FIDAB menu page.

If you use Firefox and install the JSONView extension, you will get
the JSON data pretty-printed and links clickable. This makes it much
easier to navigate the data.

Product and document lists can be filtered with GET parameters. To
only show products that belong to the product class ABC, use

'http://localhost:8000/fidab/product?productclass=http://localhost:8000/fidab/productclass/ABC'

or the short form with relative URI

'http://localhost:8000/fidab/product?productclass=productclass/ABC'

If you installed FIDAB from scratch, the database will be empty except
for the archive relation, which will have two objects.

To create a new data object in the database, you must POST to the type
URI with post parameters that match all immutable and mutable
attributes of the object.

To modify a data object, you must PUT an updated JSON document to the
object URI. Only mutable parameters will be updated, the rest will be
ignored.

To delete a data object, use HTTP DELETE on the object URI.

All data objects share the common attributes atoms, entities, mutable,
immutable and identity. Atoms are attributes with simple types, like
strings and numbers. Entities are attributes with relation
types. Immutable contains attributes that can only be set at object
creation time. Mutable contains attributes that can be updated with
PUT. Identity is a human readable name of the object.

Entity references are JSON objects themselves, containing at least the
attributes link, node, and identity. Link is the URI to the referenced
object. Node is the URI to the relationship object, really only useful
for many to many relationships. Identity is the human readable name of
the object.



Access FIDAB Web Gateway from the CLI
-------------------------------------

flogin and flogout will open and close a session to FIDAB.

fget, fpost, fput and fdelete runs the corresponding HTTP command on a
URI.

To create a product class, run

# fpost productclass code=ABC name="One of those classes."


To see a list of productclasses, run

# fget productclass


To see a productclass, run

# fget productclass/ABC


To modify a JSON object, run

# fput productclass/ABC name="New name."


To remove a JSON object, run

# fdelete productclass/ABC

Source: readme, updated 2010-04-04