The Data Binding Library
xADL 2.0 is defined in a set of XML schemas. As such, xADL 2.0 architecture descriptions are simply XML documents that conform to the language defined in the xADL 2.0 schemas.
While XML documents are plain ASCII and were originally designed to be human-readable and -writable, the advent of XML namespaces and multi-schema languages has made it difficult to do so. Here's a little snippet from an actual xADL 2.0 document that illustrates why:
<?xml version="1.0" encoding="UTF-8"?> <instance:xArch xmlns:instance="http://www.ics.uci.edu/pub/arch/xArch/instance.xsd" xmlns:types="http://www.ics.uci.edu/pub/arch/xArch/types.xsd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:schemaLocation="http://www.ics.uci.edu/pub/arch/xArch/types.xsd http://www.ics.uci.edu/~edashofy/xArch/types.xsd http://www.ics.uci.edu/pub/arch/xArch/instance.xsd http://www.ics.uci.edu/~edashofy/xArch/instance.xsd"> <instance:archInstance xsi:type="instance:ArchInstance"> <instance:description xsi:type="instance:Description">Stack App</instance:description> <instance:componentInstance instance:id="stackAdt_inst" xsi:type="types:PrescribedComponentInstance"> <instance:description xsi:type="instance:Description">Stack ADT</instance:description> <instance:interfaceInstance instance:id="stackAdt_inst.top" xsi:type="instance:InterfaceInstance"> <instance:description xsi:type="instance:Description">Stack ADT Top Interface</instance:description> <instance:direction xsi:type="instance:Direction">inout</instance:direction> </instance:interfaceInstance> <instance:interfaceInstance instance:id="stackAdt_inst.bottom" xsi:type="instance:InterfaceInstance"> <instance:description xsi:type="instance:Description">Stack ADT Bottom Interface</instance:description> <instance:direction xsi:type="instance:Direction">inout</instance:direction> </instance:interfaceInstance> <types:structure xlink:href="#stackAdt" xsi:type="instance:XMLLink" xlink:type="simple"/> </instance:componentInstance> <instance:componentInstance instance:id="stackArtist_inst" xsi:type="instance:ComponentInstance"> <instance:description xsi:type="instance:Description">Stack Artist</instance:description> <instance:interfaceInstance instance:id="stackArtist_inst.top" xsi:type="instance:InterfaceInstance"> <instance:description xsi:type="instance:Description">Stack Artist Top Interface</instance:description> <instance:direction xsi:type="instance:Direction">inout</instance:direction> </instance:interfaceInstance> <instance:interfaceInstance instance:id="stackArtist_inst.bottom" xsi:type="instance:InterfaceInstance"> <instance:description xsi:type="instance:Description">Stack Artist Bottom Interface</instance:description> <instance:direction xsi:type="instance:Direction">inout</instance:direction> </instance:interfaceInstance> </instance:componentInstance> ... |
As you can see, the amount of markup information required in a raw xADL 2.0 document makes it prohibitive to write one by hand. However, tools can simplify this process greatly. The basis for tools that can edit xADL 2.0 documents is the Data Binding Library, a Java library that contains classes for every XML schema type defined in the xADL 2.0 schemas. The Data Binding Library is automatically generated by a tool called apigen.
It is especially important for ArchStudio 3 component developers to familiarize themselves with the interface of the Data Binding Library. While this library is not directly called by ArchStudio components, it is called via the event-based interface of the xArchADT component.
The Data Binding Library is available on the xADL 2.0 website under Tools->Java Libraries. Its interface is available in Javadoc format here.