Difference between revisions of "ADA Documentation"

(application)
(ADA Applications)
Line 25: Line 25:
 
http://localhost:8877/decor/services/RetrieveTransaction?id=2.16.840.1.113883.3.1937.99.62.3.4.2&language=en-US&version=2014-05-12T14:02:55&format=xml
 
http://localhost:8877/decor/services/RetrieveTransaction?id=2.16.840.1.113883.3.1937.99.62.3.4.2&language=en-US&version=2014-05-12T14:02:55&format=xml
  
 +
With RetrieveTransaction, a decor/transaction is 'enhanced' with all the goodies the dataset and terminology provide. It is:
 +
- a decor transaction
 +
- with the tree view from the dataset
 +
- all concept adornments (names, valueDomains, you name it) from the dataset
 +
- for every valueDomain of type 'code', the relevant valueSet pulled in
 +
- and all this filtered for just one particular language so you don't need to worry about stuff you don't need to worry about.
 
===ADA Definitions===
 
===ADA Definitions===
 
Now make an ADA definition file in /projects/my-project/definitions and call it demoapp-ada.xml. Here's an overview of the structure.
 
Now make an ADA definition file in /projects/my-project/definitions and call it demoapp-ada.xml. Here's an overview of the structure.

Revision as of 19:58, 12 May 2014

This chapter contains a walkthrough of ADA, for those who want to get up to speed deploying ADA.

Installing ADA

To get started with the examples, you'll need ADA Core checked out to a local directory. Either get it from SourceForge, or install the ADA package in eXist and copy that to disk.

Start with this layout:

my-directory - core (for ada/core)

 - projects
   - my-project (we'll use demo1 in this Guide)
     - definitions
     - modules
     - new
     - schemas
     - views
     - xslt

After downloading ADA, ada/projects/empty contains the layout to get you started.

ADA Applications

ADA starts with a DECOR release, as made in the ART project form. Make one (or refer to an existing one), and retrieve the URI to it through: http://localhost:8877/decor/services/ProjectIndex (Throughout this Guide, we'll use localhost:8877 for the host - use another if you don't run a local instance on port 8877). Search for your project, and get an URL like this one: http://localhost:8877/decor/services/RetrieveTransaction?id=2.16.840.1.113883.3.1937.99.62.3.4.2&language=en-US&version=2014-05-12T14:02:55&format=xml

With RetrieveTransaction, a decor/transaction is 'enhanced' with all the goodies the dataset and terminology provide. It is: - a decor transaction - with the tree view from the dataset - all concept adornments (names, valueDomains, you name it) from the dataset - for every valueDomain of type 'code', the relevant valueSet pulled in - and all this filtered for just one particular language so you don't need to worry about stuff you don't need to worry about.

ADA Definitions

Now make an ADA definition file in /projects/my-project/definitions and call it demoapp-ada.xml. Here's an overview of the structure.

<?xml version="1.0" encoding="UTF-8"?>
<ada ...>
    <project ...>
        <release ...>
    </project>
    <applications>
        <application ...>
            <views>
                <view ...>
                    <name>...</name>
                    <concepts include="all">
                        <concept ...>
                        <concept ...>
                    </concepts>
                </view>
            </views>
        </application>
    </applications>
</ada>

The root is called /ada, below are:

project

<project prefix="demoapp-" language="en-US" versionDate="2014-05-12T14:02:55">
     <release baseUri="http://localhost:8877/decor/services/RetrieveTransaction"/>
</project>

Change the following:

  • set project/@prefix to a memorable project prefix (lowercase letters and digits only, end with a hyphen)
  • set project/@language to the language from the RetrieveTransaction link
  • set project/@versionDate to the date from the RetrieveTransaction link

ADA retrieves all necessary information from the RetrieveTransaction service. Make sure this is OK (like, all names for the required language are provided, valueSets are present in the concepts etc.).

If not all is present - ADA is a really good way to test the completeness of your DECOR specs. Just generate an ADA app, run it and see what's missing.

application and view

Next comes a bit of housekeeping. ADA

<applications>
    <application version="1">
        <views>
            <view ...>
            </view>
        </views>
    </application>
</applications>

Except the application/@version this is just a way to get you to where it really happens: the view. An ADA view is - basically - an enhanced DECOR transaction.

view

<?xml version="1.0" encoding="UTF-8"?>
<ada xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../core/ada.xsd">
    <project ref="2.16.840.1.113883.3.1937.99.62.3" prefix="demoapp-" language="en-US" versionDate="2014-05-12T14:02:55">
        <release baseUri="http://localhost:8877/decor/services/RetrieveTransaction"/>
    </project>
    <applications>
        <application language="nl-NL" version="1">
            <views>
                <view type="crud" target="xforms" transactionId="2.16.840.1.113883.3.1937.99.62.3.4.2" transactionEffectiveDate="2012-09-05T16:59:35">
                    <name>Measurement Form</name>
                    <concepts include="all">
                        <concept ref="2.16.840.1.113883.3.1937.99.62.3.2.1" widget="tab"/>
                        <concept ref="2.16.840.1.113883.3.1937.99.62.3.2.6" widget="tab"/>
                    </concepts>
                </view>
                <view type="index" target="xquery" transactionId="2.16.840.1.113883.3.1937.99.62.3.4.2" transactionEffectiveDate="2012-09-05T16:59:35">
                    <name>Measurement Index</name>
                    <concepts include="only">
                        <concept ref="2.16.840.1.113883.3.1937.99.62.3.2.4"/>
                        <concept ref="2.16.840.1.113883.3.1937.99.62.3.2.2"/>
                    </concepts>
                </view>
            </views>
        </application>
    </applications>
</ada>

Making an ADA release

Generating an ADA App

Deploying an ADA App