The <tiger2/> Object Model and API
In parallel to the <tiger2/> format we provide a processable Java API based upon the model of <tiger2/>. The <tiger2/> model is directly based upon the model of SynAF, therefore the <tiger2/> API also includes an API for SynAF. The API further provides all the functionality of an API for SynAF.
The main aspect of the <tiger2/> API is to provide accessibility for programs to data coming from the <tiger2/> format. This enables other tools to have direct access to the data without dealing with the <tiger2/> format and limitations from dealing with pure XML.
Benefits of the <tiger2/> API at a glance:
- the <tiger2/> API is an open source project
- you only have to use Java instead of dealing with pure XML when using the API
- additional functions are included, for example traversing graphs or querying annotations
- less effort when developing tools dealing with <tiger2/>, since a lot of work can be done by the <tiger2/> API
- synchronous development of the <tiger2/> format, the <tiger2/> model and the <tiger2/> API, ensuring all features are included
The <tiger2/> API also contains a mechanism to deal with the original TigerXML format (see: http://www.ims.uni-stuttgart.de/projekte/TIGER/), enabling the conversion of data between Tiger XML and the <tiger2/> format via the <tiger2/> API.
The following figure shows the relationship between the formats, the model, the API and other tools:
As already mentioned, the <tiger2/> model and the <tiger2/> API are directly based on SynAF. The following figure shows the relationsihp between MAF, SynAF and <tiger2/>.
The <tiger2/> model is created by a model based approach, using the EMF technology(Eclipse modeling framework, http://www.eclipse.org/modeling/emf/). EMF is a very UML-near technology based on the same core model (see http://www.omg.org/technology/documents/formal/uml.htm for UML). This framework enables the generation of code (for instance Java code) based on a well defined model. Both the <tiger2/> model and the <tiger2/> API are developed using this technology.
Note: The <tiger2/> model is currently in a draft status, therefore the model shown in here is not necessary the final version.
The figure below shows a class diagram containing the elements of the <tiger2/> model. Also shown in this diagram are the derivations of elements from the SynAF model. This model represents all data from the <tiger2/> format, and its elements are named in a similar fashion.
A more detailed description of all model elements will be completed in the near future. Until then, please take a look at the <tiger2/> format description for further information.
The EMF diagram of the <tiger2/> model will be the basis of the <tiger2/> Java-API. A more precise description in the form of a JavaDoc (http://java.sun.com/j2se/javadoc/) and further UML-diagrams will be given in the next months.