\title{A Model-Driven Web Feature Service for Enhanced Semantic Interoperability\\}
\author{Peter Staub}

\maketitle

\section{Introduction}
\label{sec:introduction}

This article addresses current research issues in the field of interoperability of heterogeneous GIS. We focus on heterogeneity at the level of conceptual data models.
The presented research project of a model-driven Web Feature Service aims at enhancing semantic interoperability. The approaches of data interoperability such as OGC web services (OWS) are combined with methods of model interoperability. The model-driven approach of conceptual data modelling allows for keeping data models independent from any particular system.

Interoperability is a crucial capability to deal with in the context of geospatial applications and information communities. The use of web services is well-established and useable in a standardised way due to the efforts of the OGC. However, OWS such as the Web Feature Service (WFS) \cite{wfs:2005} provide data interoperability, but no model interoperability. Conceptual model mappings are a precondition for semantic interoperability but are not supported by OWS.

Among European initiatives for geodata infrastructures -- such as INSPIRE\footnote{INSPIRE project website: \tt{\url{http://www.ec-gis.org/inspire/index.cfm}}} -- the need for interoperability not only on the data level, but also on the model level, grows. The research project described in this article was initiated in the context of a project in the Lake Constance region\footnote{Bodensee-Geodatenpool (Lake Constance geodata pool) project website: \tt{\url{http://www.bodensee-geodatenpool.net}}}. The mentioned project aims at creating a cross-border web-based GIS for applications.\\

In the presented research project, we introduce a {\bf model-driven WFS} ({\bf mdWFS}) which combines both the advantages of OWS for data interoperability and those of the model-driven approach for conceptual data modelling. Furthermore, formalism for establishing conceptual model mappings is developed and a prototype is implemented. Because of this combination, the mdWFS we introduce is an approach that provides enhanced semantic interoperability.

\section{Fundamentals of Data Modelling and Semantic Interoperability}
\label{sec:dataModelling}

\subsection{The Model-Driven Approach}
\label{subsec:MDApproach}

The main idea of the model-driven approach is to describe (geo-)data models using a conceptual schema language (CSL). The use of a CSL for modelling allows for keeping data structures independent from any particular system or transfer format such as XML or GML. Virtually any transfer format can be derived from the conceptual schema (syn.\ model) automatically -- given an adequate model compiler.

If you want to reach semantic interoperability, you will have to create conceptual model mappings. A conceptual model mapping is converted into mapping functions ${\mathcal{F}}_M $ from a source schema $A$ to any target schema $B$:

$$ A \xrightarrow{{\mathcal{F}}_M} B $$

The model-driven approach consists of four steps (see figure \ref{fig:mdasemtrans}):

\begin{figure*}[htbp]
   \centering
   \includegraphics[width=0.85\textwidth]{./proceedings/staub/MDA_SemTrans}
   \caption{Model-driven approach and semantic interoperability}
   \label{fig:mdasemtrans}
\end{figure*}

\begin{enumerate}
\item Specification of an {\em application domain} (i.~e.\ ``what we are talking about'')
\item Specification of a {\em CSL} with a coherent UML metamodel
\item Description of the application domain with the chosen CSL $\rightarrow$ {\em conceptual schema}, platform independent model (PIM)
\item Derivation of any format schema (e.~g.\ a GML Application Schema) $\rightarrow$ {\em logical and physical schema}, platform specific model (PSM)
\end{enumerate}

As mentioned above, we assume that the generation of the logical schema is {\em automatically} carried out by a compiler and the encoding is done by an adequate encoding program.

In the presented research project, the (textual) CSL {\em Interlis} is applied for data modelling. Interlis is a Swiss standard \cite{ili:2006} and is widely applied in cadastral and planning applications. Interlis is based on a UML 2 profile and a compiler\footnote{Interlis compiler: see {\tt \url{http://www.interlis.ch}}. The compiler is free and open source.} generates XML schemas (Interlis format) or GML Application Schemas from any given Interlis data model.

According to the Model-Driven Architecture (MDA) specified by the Object Management Group (OMG) \cite{omg:2003}, the generation of a format schema from a conceptual schema is referred to as a PIM--PSM mapping. In terms of mapping directions, the PIM--PSM is also called a ``vertical'' mapping, whereas model mappings for semantic interoperability are ``horizontal'' (i.~e.\ PIM--PIM) mappings (see next section).

\subsection{Semantic Interoperability}
\label{subsec:semInterop}

Technically, there are two main aspects characterising ``interoperability'': 1) {\em Data interoperability} $=$ the ability of a system or process to exchange datasets using certain data transfer formats. 2) {\em Model interoperability} $=$ the ability to establish conceptual model mappings in order to execute semantic data transformations.

To achieve semantic interoperability, different data models have to be mapped. A translator then interprets the mapping rules from the conceptual model mapping and executes the instance translation automatically.

Semantic transformation approaches can be classified as follows \cite{donau:2007}:
\begin{itemize}
\item {\em Level of abstraction:} Semantic transformation can be performed on different levels of abstraction (on the conceptual level, on the logical level and on the physical (i.~e.\ transfer format) level). A semantic transformation on the conceptual level is platform independent, whereas approaches on the logical or physical level are platform specific.
\item {\em Orientation:} Horizontal semantic transformation between different schemas on the same level of abstraction (PIM--PIM; PSM--PSM) vs.\ vertical semantic transformation between different levels of abstraction (PIM--PSM).
\item {\em Level of automation:} Creating mapping rules by hand vs.\ automated schema matching which is only partially practicable.
\end{itemize}

\subsection{Shortcomings of Existing Approaches}
\label{subsec:Shortcomings}

One possibility is to integrate all data into one central system. This is very costly and requires expert knowledge. In order to integrate the data into the central system, 1:1-format conversions have to be carried out. This is often lossy because a data format which is different from the original one is in general not able to express the entire semantics of the original data format. Besides that, the inevitable redundant data storage possibly causes outdated data.

Existing OWS such as the WFS have some shortcomings with regard to semantic interoperability: OWS allow for syntactic interoperability (i.~e.\ data interoperability) but not for semantic interoperability (i.~e.\ model interoperability). Conceptual models of source systems are hidden from target systems and semantic transformations are not supported. So, the WFS lacks in the ability to handle conceptual model information aside from data information.

\section{Concept of the Model-Driven WFS}
\label{sec:mdWFSconcept}

\subsection{Preconditions for a Web-Based Semantic Transformation}
\label{subsec:precond}

If we want to have a web service that allows for data interoperability {\em and} that is able to store and deliver conceptual schemas, a number of preconditions must be fulfilled. It must be assured that conceptual schemas are described (i.~e.\ modelled) using a textual CSL with its graphic representation in UML 2 (and the respective exchange format XMI). Furthermore, a formal language is needed for expressing schema mapping rules on the conceptual level of abstraction. Finally, we use a standard WFS interface to provide satisfying data interoperability.

\subsection{Web Service Requirements}
\label{subsec:webserviceReq}

Web-enabling semantic transformations means in our case actually designing a web service. This service has to comply with two main requirements:
\begin{enumerate}
\item Provide access to geospatial data based on the data's original conceptual schema (source model) and on any user-defined conceptual schema acting as the target model.
\item Interoperability with existing OWS.
\end{enumerate}

\subsection{The mdWFS Interface}
\label{subsec:mdwfsInterface}

We designed a service called ``model-driven Web Feature Service'' (mdWFS) taking these requirements into account. The mdWFS has the task to store and deliver conceptual schemas and to carry out semantic transformations (PIM--PIM mappings) by means of interpreting transformation models. After a semantic transformation, the mdWFS configures a standard WFS to provide a service for data interoperability. The standard WFS is configured according the target model but delivers transformed feature data from the source model.

\subsection{WFS Protocol Extensions}
\label{subsec:wfsExtd}

In order to create a WFS that is able to store and deliver conceptual schemas, the OGC WFS specification needs to be extended. In the mdWFS specification, the extensions described below are applied \cite{donau:2007}:
\begin{itemize}
\item To provide a service protocol for the mdWFS, a new request parameter {\tt SERVICE=mdWFS} is implemented.
\item The {\tt GetCapabilities} request is extended to provide a {\tt SchemaList}. This list includes each conceptual schema that is available in the service.
\item The {\tt DescribeFeatureType} request is extended to provide the {\tt XMI} format for transferring model information.
\item Finally, a whole new request {\tt DoTransform} is introduced. This request transfers the conceptual mapping schema to the mdWFS and invokes the semantic transformation.
\end{itemize}

\section{UMLT, a Conceptual Schema Mapping Language}
\label{sec:UMLT}

\subsection{Concept of UMLT}
\label{subsec:conceptUMLT}

We introduce a conceptual mapping language that can be used to create conceptual mapping schemas (syn.\ transformation schemas) for semantic transformations. This formal language must comply with several requirements in order to be useable. Transformation schemas must be comprehensible also for non-computer scientists. Therefore, a UML 2 metamodel as well as syntax for a human useable textual notation (HUTN) is developed. Transformation schemas are represented in visual form (UML activity diagrams), in textual form (derived from Interlis CSL) and XML (i.~e.\ XMI), respectively. Common standards in the field of data modelling are taken into account\footnote{Such as standards from OMG, OGC and ISO}. We also apply an abstraction layer for (geo-)data types.

Two existing approaches from the OMG were examined. First, the Meta Object Facility Query/Views/Transformations formalism (MOF-QVT) \cite{mofqvt:2005}: this formalism is designed for the transformation of metamodels, e.~g.\ UML$\rightarrow$Java. MOF-QVT models are hard to understand and their visual representation helps little. The standard is complex since it actually consists of three languages: Relations, Core and Operational. Furthermore, the MOF-QVT standard is predominantly applied for PIM--PSM implementation mappings.

Another approach that was examined is UML 2 Activities. UML 2 activity diagrams can be used to describe transformations in terms of activity sequences. A clear description of the semantics and of the transfer format (XMI 2.1) is provided in the Superstructure for UML models. UML 2 models are comprehensible and a number of implementations and open source APIs are available.

Because of the above considerations, our conceptual mapping language is based on an independent extension of the UML 2 metamodel. To specify the language elements, a UML 2 model is created and the textual notation of the language is defined by a set of EBNF grammar rules. At project stage, we call our conceptual mapping language ``{\bf UMLT}''.

\subsection{UMLT Language Elements}
\label{subsec:languageUMLT}

\begin{figure*}[htbp]
   \centering
   \includegraphics[width=0.85\textwidth]{./proceedings/staub/UMLT_Language}
   \caption{UMLT language elements}
   \label{fig:umltlang}
\end{figure*}

The language elements of UMLT are an inheritance of UML 2 Activities \cite{omguml:2007}. We introduce the following language elements (see figure \ref{fig:umltlang}):
\begin{itemize}
\item {\tt StructuredTransformation}
\item {\tt SelectionCriteria}: selection of input data through a logical expression.
\item {\tt VirtualAssociation}: manage input objects that are not actually associated with an association object. These input objects may have link attributes or foreign key attributes that are evaluated at runtime in order to get calculated relations\footnote{A different example is a geometry/topology relation: a building {\em on} a parcel}. During a semantic transformation, such objects can be associated {\em in a virtual way} if needed. The {\tt VirtualAssociation} is introduced (in contrary to a common ``derived association'') to provide a means to explicitly specify the join property of the association with the {\tt joinCriteria} expression.
\item {\tt TransformationAction}: inheritance from a UML {\tt OpaqueAction} providing an activity element which cannot be structured any further. This is a transformation's elementary action.
\item {\tt AssignmentDefinition}s: address primitive types or expressions as value specification.
\item {\tt MappingRule}: the actual object mapping. Built as a composition of assignment definitions.
\item {\tt AssociationBinding}: selecting associated input objects, one may define how these associations are evaluated during input.
\item {\tt JoinType}: an enumeration type to specify the join type of the association binding.
\end{itemize}

\section{Prototype Implementation}
\label{sec:prototype}

In the context of the presented research project, a proof-of-concept prototype is implemented. Besides the WFS protocol extension and the UMLT language specification, this prototype consists of a model parser, a mapping model editor and a prototype test bed. The model parser and the editor are developed in the Eclipse environment\footnote{Eclipse: {\tt \url{http://www.eclipse.org}}}. The model parser creates an XMI file from a UML/Interlis data model and also from a UMLT mapping model.

In the prototype test bed, we use an ORACLE Spatial database and a deegree WFS implementation\footnote{deegree project page: {\tt \url{http://www.deegree.org}}} on which the mdWFS is built upon. Figure \ref{fig:mdwfsproto} shows the steps of a semantic transformation using mdWFS.

\begin{figure*}[htbp]
   \centering
   \includegraphics[width=0.85\textwidth]{./proceedings/staub/mdWFS_proto}
   \caption{Prototype implementation test bed}
   \label{fig:mdwfsproto}
\end{figure*}

We primarily focused on the WFS extension and on the conceptual mapping language UMLT. We consider ORACLE Spatial as a very suitable RDBMS for our needs, providing powerful spatial features. Therefore, we use the RDBMS we already had at hand although it is not a FOSS solution. Principally, an mdWFS can be applied on any RDBMS with a spatial extension.\\

Before you can start working with mdWFS, you need to configure the database according to the source data model $A$. This can be done using an existing FOSS tool called ``ili2ora''\footnote{Source: {\tt \url{http://www.eisenhutinformatik.ch/interlis/ili2ora/}}}. This tool allows to configure an ORACLE Spatial database according an UML/Interlis-data model and to import feature data into this database.

\begin{enumerate}
\item Client $B$ sends a model-catalogue request to the mdWFS
\item The mdWFS provides a catalogue of available data models
\item Client $B$ chooses a source data model (i.~e.\ model {\em $A$}) and orders the model information
\item The mdWFS fetches model information $A$ and sends the model (XMI) or a model reference to the client $B$
\item Client $B$ creates the model mapping $M : A \xrightarrow{{\mathcal{F}}_M} B$ by specifying adequate UMLT mapping rules
\item The transformation model {\em and} the target model $B$ are parsed and translated into XMI and sent to the mdWFS in a {\tt DoTransform}-request
\item According to the target model $B$, the mdWFS configures an ORACLE Spatial database using ili2ora again
\item The mapping rules from the transformation model are translated into SQL statements and Java instructions in order to actually transform feature data from source/server model $A$ into target/client model $B$
\item The mdWFS configures a standard WFS (deegree) according to the target model $B$. This WFS is connected to the database containing the transformed feature data
\item After finishing the transformation, the mdWFS sends a {\tt DoTransform}-response to the client $B$
\item Client $B$ accesses the transformed feature datasets from model/database $A$, transformed into model structure $B$, via standard WFS requests.
\end{enumerate}


\section{Conclusions}
\label{sec:conclusions}

The current evolution of GI systems shows that a conceptual schema language is usually applied for geodata modelling. This is a necessary precondition for semantic transformations on the conceptual level.
Any given application domain can be characterised by different data structures. This leads to different data models. Therefore, conceptual model mappings must be established in order to achieve semantic interoperability.

The new {\em mdWFS} presented in this article implements the methodology of the semantic transformation at the conceptual level of abstraction what allows for a much enhanced semantic interoperability.

Potentially, the mdWFS can be integrated in other (OWS based) infrastructures due to the sound basis of GI standards that are applied.


\section{Acknowledgements}
\label{sec:acknowledgements}

I would like to thank my colleagues at the ETH Zurich and at the TU Munich for their company and good collaboration in this research project: Dr.-Ing.\ A.\ Donaubauer, H.~R.\ Gn\"agi, A.\ Morf, F.\ Straub.
I also appreciate the excellent project lead of Prof.~Dr.\ A.\ Carosio, ETH Zurich and Prof.~Dr.-Ing.\ M.\ Schilcher, TU Munich.

This project is co-funded by the German Federal Office for Cartography and Geodesy BKG and the Swiss Federal Office for Topography swisstopo.


\begin{footnotesize}
\begin{thebibliography}{99}

\bibitem{donau:2007}
A.\ Donaubauer, F.\ Straub, M.\ Schilcher (2007)
\newblock mdWFS: A Concept of Web-enabling Semantic Transformation.
\newblock Proceedings of the 10$^{th}$ AGILE Conference on Geographic Information Science, 2007, Aalborg.

\bibitem{gnaegi:2006}
H.~R.\ Gn\"agi, A.\ Morf, P.\ Staub (2006)
\newblock Semantic Interoperability through the Definition of Conceptual Model Transformations.
\newblock Proceedings of the 9$^{th}$ AGILE Conference on Geographic Information Science, 2006, Visegr\'ad.

\bibitem{wfs:2005}
OGC Open Geospatial Consortium (2005)
\newblock Web Feature Service Implementation Specification: 1.1.0.
\newblock OpenGIS implementation specification OGC 04-094.

\bibitem{omg:2003}
OMG Object Management Group (2003)
\newblock MDA Guide Version 1.0.1.
\newblock OMG specification omg/2003-06-01.

\bibitem{mofqvt:2005}
OMG Object Management Group (2005)
\newblock MOF 2.0 Query/Views/Transformations Specification.
\newblock OMG specification ptc/05-11-01.

\bibitem{omg:2005}
OMG Object Management Group (2005)
\newblock MOF 2.0/XMI Mapping Specification, v2.1.
\newblock OMG specification formal/05-09-01.

\bibitem{omguml:2007}
OMG Object Management Group (2007)
\newblock UML Unified Modeling Language: Superstructure, version 2.1.1.
\newblock OMG specification formal/2007-02-05.

\bibitem{ili:2006}
SNV Swiss Association for Standardization (2006)
\newblock INTERLIS Reference Manual, version 2.3.
\newblock Swiss standard SN 612031.

\end{thebibliography}
\end{footnotesize}

\address{Peter Staub\\
  ETH Zurich, Institute of Geodesy and Photogrammetry, GIS Group\\
  \url{http://www.gis.ethz.ch}\\
  \email{peterstaub AT ethz.ch}}
  
