I.R.I.S. Working Group

Interoperable Multimedia Retrieval in Distributed Systems

JPSearch - Transformation Rules Framework

According to the reference software development plan, this document describes the implementation of the JPSearch transformation rules parser which is a subcomponent of the first part. The parser provides a 1 to 1 mapping of XML instances of diverse metadata formats (currently MPEG-7 and Dublin Core is supported) to the JPSearch core format and vice versa.
The JPSearch transformation rules framework provides means for transforming XML instance documents of metadata formats into the JPSearch core metadata format and vice versa. For this purpose, the framework bases on the following external technologies: a XML database called BaseX for managing the individual transformation rules and JDOM which is an open-source library for java optimized XML data manipulation routines.


Class Hierarchy Architecture

This subsection describes the complete architecture of the metadata transformation. Figure 1 presents the individual components of the framework and its interplay. In the following, the components are described in more detail.

Transformation Rule Framework Class Hierarchy
Figure 1: Transformation Rule Framework Class Hierarchy


Transformation Manager

The transformation manager is a Java FX application which deals as frontend for user input and supports the registration of transformation rules and the transformation of XML input instances. Figure 2 presents a screenshot of the main frontend with the provided functionality: upload a new transformation rule, view the existing rules and transform an input document.

Transformation Manager
Figure 2: Transformation Manager

The transformation manager comes as web application and requires an Apache Tomcat server (or something similar) for running properly. The uploaded transformation rules are stored in the BaseX XML database.


Module Transformer

In our demo application the Transformer class is instantiated directly by the transformation manager. However, it can be used and instantiated in any other Java based application as well. As input parameters, the class requires a JPQF query and one or more namespaces denoting the target metadata format. Several constructors are available for different settings. If only a query is transmitted, the transformer assumes to transform the content of the input query into the JPSearch core metadata format. In this case the responsible class (TransformIntoJPSearch) is used. The needed transformation rules are (if not submitted by parameters) loaded from the BaseX database. Figure 3 presents the attributes and methods of the Transformer class as UML diagram.

Transformer Class
Figure 3: Transformer Class


Module TransformIntoXXX

For every supported metadata format a specific Java class has to be provided. This class follows a name convention like TransformTo<MetadataFormat>. For instance for a transformation into the Dublin Core schema a respective TransformIntoDublinCore need to be implemented. The main task of those classes is to construct a valid XML instance document regarding to the target scheme (here for instance Dublin Core) and the given transformation rule. See Figure 4 for an UML diagram of the TransformIntoDublinCore class.

TransformIntoDublinCore
Figure 4: TransformIntoDublinCore


Module Transform

The module Transform contains the whole application logic for applying the transformation rules. Figure 5 presents the UML diagram of the Transform class. The class receives the input query and the transformation rules. After preparation of the query, the executeTransformationRules method is executed. This method traverses over all transformation rules and calls the fitting rule paradigm (one-to-one, one-to-many, or many-to-one). In general, the available XPath expression is evaluated by using the JDOM-API in order to separate the desired value. The processing of the fromField expression is done automatic but for the evaluation of the toField the respective helper classes (TransformInto<MetadataFormat>) are required. In addition, it has to be noted that the order of the transformation rules is important for the final validity of the received instance document.

Transform class
Figure 5: Transform class


Integration of new metadata formats

For the integration of new metadata formats, a respective TransformIntoXXX implementation has to be provided. In addition, the necessary transformation rules for the new metadata formats needs to be established containing all XPath based rules for mapping a JPSearch core schema instance document into the target schema and vice versa. Finally, the TransformIntoXXX implementation has to be integrated into the project and the rules file can be uploaded by the user interface during demonstration.


back to JPSearch