W3C W3C Member Submission

OWLlink:
HTTP/XML Binding

W3C Member Submission 1 July 2010

This version:
http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/
Latest version:
http://www.w3.org/Submission/owllink-httpxml-binding/
Authors:
Olaf Noppens, derivo GmbH (formerly Ulm University)
Marko Luther, DOCOMO Euro-Labs, Munich
Thorsten Liebig, derivo GmbH (formerly Ulm University)
Michael Wessel, Racer Systems GmbH & Co. KG
Contributors: (in alphabetic order)
Sean Bechhofer, The University of Manchester
Matthew Horridge, The University of Manchester
Ralf Möller, Hamburg University of Technology
Boris Motik, Oxford University

This document is available under the W3C Document License. See the W3C Intellectual Rights Notice and Legal Disclaimers for additional information.


Abstract

The OWLlink interface provides an implementation-neutral mechanism for accessing OWL reasoner functionality. OWLlink relies on OWL 2 for the primitives of the modeling language, and is thus fully compatible with OWL. The set of OWLlink primitives described in this document cover basic reasoner managment, assertion of axioms and elementary ask functionality. An extension mechanism is provided in order to easily add any required functionality in a controlled way to the core language. This document defines a concrete binding of OWLlink into [HTTP/1.1] and [XML Schema]. A structural specification of OWLlink is given in an accompanying document [OWLlink Structural Specification].

Status of this Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications can be found in the W3C technical reports index at http://www.w3.org/TR/.

This document is a part of the OWLllink Submission which comprises eight documents:

  1. OWLlink: Structural Specification
  2. OWLlink: HTTP/XML Binding (this document)
  3. OWLlink: HTTP/Functional Binding
  4. OWLlink: HTTP/S-Expression Binding
  5. OWLlink Extension: Retraction
  6. OWLlink Extension: Retraction HTTP/XML Binding
  7. OWLlink Extension: Retraction HTTP/Functional Binding
  8. OWLlink Extension: Retraction HTTP/S-Expression Binding

Earlier drafts of the OWLlink specification have been published by the informal OWLlink working group at http://www.owllink.org.

By publishing this document, W3C acknowledges that the Submitting Members have made a formal Submission request to W3C for discussion. Publication of this document by W3C indicates no endorsement of its content by W3C, nor that W3C has, is, or will be allocating any resources to the issues addressed by it. This document is not the product of a chartered W3C group, but is published as potential input to the W3C Process. A W3C Team Comment has been published in conjunction with this Member Submission. Publication of acknowledged Member Submissions at the W3C site is one of the benefits of W3C Membership. Please consult the requirements associated with Member Submissions of section 3.3 of the W3C Patent Policy. Please consult the complete list of acknowledged W3C Member Submissions.


Table of Contents


1 Introduction

OWLlink is defined in terms of a structural specification [OWLlink Structural Specification]. The following describes a binding of the specification to a concrete communication protocol, namely XML over HTTP. Note that this is only one conceivable binding. Other bindings may utilize [SOAP] or another particular Remote Message Invocation protocol.

The HTTP/XML binding of OWLlink uses HTTP as its underlying communication protocol for exchanging XML content between a reasoner and a client. More technically, the reasoner has to accept HTTP POST requests and responds as appropriate according to the OWLlink specification. The requests as well as responses have to consist of XML data according to the OWLlink HTTP/XML Schema. The schema is obtained by a translation of the objects from the UML diagrams of the OWLlink specification according to the translation rules (see Section 2.2).

Note that the HTTP/XML binding is not intended to be backwards compatible with existing implementations of the [DIG 1.1] specification. However, it relies on the [OWL 2 XML Serialization] for the primitives of the ontology language, and is thus fully compatible with OWL. As a result, implementors of the XML binding of OWLlink can re-use their implementation of OWL 2 parsers to parse the OWL 2 specific contents of OWLlink primitives.

2 Binding

A common transport mechanism for communicating with an OWLlink server is through the [HTTP/1.1] protocol. XML is a verbose format and large Knowledge Bases may require a lot of information to be transferred over the wire. It has been observed with DIG 1.1 implementations that this can introduce a considerable overhead into the communication process. To alleviate this, OWLlink servers should support the use of compression, with message pay-loads being compressed before transfer. This may be realized by standard compression technology of the HTTP/1.1 transport mechanism. For instance, a server may include Content-Encoding: gzip in the header of each HTTP message to specify that the content has been compressed according to the gzip specification. Alternatively, an OWLlink HTTP/XML implementation could make use of methods developed within the Efficient XML Interchange initiative [EXI]

2.1 Sessions and Messages

An OWLlink session is mapped to an HTTP connection and is typically established upon sending the first request. HTTP servers are in general allowed to close the HTTP connection at their own discretion, which in effect terminates the OWLlink session. In order to prevent this from happening, the client can include the keepAlive in the header of each HTTP request it sends. Note that closing an OWLlink session does not imply the release of the Knowledge Base. OWLlink HTTP servers are required to recognize this HTTP header and implement its functionality according to the HTTP/1.1 specification.

Messages are sent using the HTTP POST requests. The content type for messages is text/xml. The Content-Length must be explicitly set and confirm to the HTTP standard.

2.2 XML Schema

The XML syntax for OWLlink is defined as an [XML Schema] within the following document.

<owllink.xsd>

It has been obtained by a straightforward translation of the structural specification from the [OWLlink Specification] in the following way:

Certain global conditions on OWLlink XML documents that are related to the communication cannot be captured in an XML Schema, i.e. the correspondence of requests and responses. Furthermore, the root element of any OWLlink XML document written in this syntax must be either RequestMessage for bundling requests or ResponseMessage for bundling responses.

The XML schema presented in this document covers the entire OWLlink specification including all management, tell and ask primitives.

2.3 OWLlink Requests and Responses

Following a straightforward translation of the OWLlink specification into a XML schema the content body of a HTTP message is either the root element RequestMessage or a ResponseMessage containing requests resp. responses. Each Request need to be acknowledged with a Response element as described in the OWLlink specification document in the order of the corresponding requests.

<RequestMessage>
    [request #1]
    [request #2]
    [ ... ]
    [request #n]
</RequestMessage>
<ResponseMessage>
    [response #1 (for request #1)]
    [response #2 (for request #2)]
    [ ... ]
    [response #n (for request #n)]
</ResponseMessage>

If a server cannot process a request, it should attempt to recover gracefully, and process other pending requests as if the error did not happen. If, however, this recovery is not possible, after sending the Error response, the server should close the OWLlink session. If the OWLlink client or server detects a violation of the HTTP protocol such as invalid headers, it should respond as specified in the HTTP standard and then close the HTTP connection, i.e. the OWLlink session.

3 Extensions

To enable the embedding of new requests and responses into XML messages, implementors should use the redefinition mechanism of XML Schema and extend the ol:Request and ol:Response element groups. We strongly encourage the definition of two files: one which contains the schema file of the new elements with a separate namespace and one file which redefines the OWLlink schema. Otherwise, if two different extensions directly extend the OWLlink schema without defining a new namespace it is not possible to use them at the same time because XML schema does not allow for the redefinition of two schemas at the same time.

For instance, let us assume that some extension defines a new Knowledge Base request and an additional request with a corresponding response. This extension can be defined in a separate XML schema file with a separate namespace.

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ol="http://www.owllink.org/owllink#"
    targetNamespace="http://www.owllink.org/ext/sample-xml#" elementFormDefault="qualified"
    attributeFormDefault="unqualified">

    <xsd:import namespace="http://www.w3.org/2002/07/owl#" 
        schemaLocation="http://www.w3.org/2009/09/owl2-xml.xsd"/>
    <xsd:import namespace="http://www.owllink.org/owllink"
        schemaLocation="http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd"/>

    <!-- simple request without additional parameters -->
    <xsd:element name="NewRequest1" type="ol:Request"/>
    <!-- simple KBRequest without additional parameters -->
    <xsd:element name="NewKBRequest1" type="ol:KBRequest"/>

    <!-- complex request -->
    <xsd:element name="NewKBRequest2">
        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="ol:KBRequest"> [...definition...] </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>

    <!-- complex response -->
    <xsd:element name="NewResponse1">
        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="ol:Response"> [...definition...] </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>

    <!-- complex KBResponse -->
    <xsd:element name="NewKBResponse1">
        <xsd:complexType>
            <xsd:complexContent>
                <xsd:extension base="ol:KBResponse"> [...definition...] </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>

The next step is to redefine the OWLlink schema. It is not necessary to modify the original OWLlink file. Instead a new file (e.g., sample-20091116.xsd) according to the following structure should be used:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ol="http://www.owllink.org/owllink#" 
    xmlns:ext="http://www.owllink.org/sample-xml#"
    targetNamespace="http://www.owllink.org/owllink#" 
    elementFormDefault="qualified"
    attributeFormDefault="unqualified">

    <xsd:import namespace="http://www.w3.org/2002/07/owl#" 
        schemaLocation="http://www.w3.org/2009/09/owl2-xml.xsd"/>
    <xsd:import namespace="http://www.owllink.org/sample-xml#"
        schemaLocation="sample-def-20091116.xsd"/>

    <xsd:redefine schemaLocation="http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
        <xsd:group name="Request">
            <xsd:choice>
                <xsd:group ref="ol:Request"/>
                <xsd:element ref="ext:NewRequest1"/>
                <xsd:element ref="ext:NewKBRequest1"/>
                <xsd:element ref="ext:NewKBRequest2"/>
            </xsd:choice>
        </xsd:group>

        <xsd:group name="Response">
            <xsd:choice>
                <xsd:group ref="ol:Response"/>
                <xsd:element ref="ext:NewResponse1"/>
                <xsd:element ref="ext:NewKBResponse1"/>
            </xsd:choice>
        </xsd:group>
    </xsd:redefine>
</xsd:schema>

4 Examples

Here are several basic examples of OWLlink communication in accordance with this specification.

4.1 Introspecting Reasoner Capabilities

To introspect reasoner capabilities OWLlink offers the GetDescription request.

<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <GetDescription/>
</RequestMessage>

The answer response Description must contain the reasoner name (e.g. MyOwnReasoner), the version of the reasoner as well as of the supported OWLlink protocol. In addition, the answer has to consist of a set of supported settings (Setting element) and (read-only) properties (Property element) as well as the supported OWLlink extensions (Extension) and the public Knowledge Bases. For instance, in the following sample response message the reasoner states that it supports the following profiles: OWL 2 EL and OWL DL. In addition, OWL 2 EL is used as the profile for newly created Knowledge Bases by default. The default values can be overridden for each Knowledge Base separately as shown in Section 4.2 . The ignoresAnnotations Property informs that the reasoner ignores annotation and that this behavior can not be changed.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ResponseMessage [
<!ENTITY ole "http://www.owllink.org/ext/"> ]>
<ResponseMessage xmlns="http://www.owllink.org/owllink#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <Description name="MyOwnReasoner">
        <ProtocolVersion major="1" minor="0"/>
        <ReasonerVersion major="1" minor="0" build="0"/>
        <Setting key="selectedProfile">
            <OneOf abbreviatedIRI="xsd:string">
                <Literal>OWL DL</Literal>
                <Literal>OWL 2 EL</Literal>
            </OneOf>
            <Literal>OWL 2 EL</Literal>
        </Setting>
        <Property key="appliedSemantics">
            <OneOf abbreviatedIRI="xsd:string">
                <Literal>RDF-based</Literal>
            </OneOf>
            <Literal>RDF-based</Literal>
        </Property>
        <Property key="supportedDatatypes">
            <List abbreviatedIRI="xsd:anyURI"/>
            <Literal>http://www.w3.org/2001/XMLSchema#long</Literal>
            <Literal>http://www.w3.org/2001/XMLSchema#int</Literal>
            <Literal>http://www.w3.org/2001/XMLSchema#nonPositiveInteger</Literal>
            <Literal>http://www.w3.org/2001/XMLSchema#nonNegativeInteger</Literal>
            <Literal>http://www.w3.org/2001/XMLSchema#short</Literal>
            <Literal>http://www.w3.org/2002/07/owl#real</Literal>
        </Property>
        <Setting key="abbreviatesIRIs">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Setting>
        <Property key="ignoresAnnotations">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Property>
        <Property key="ignoresDeclarations">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Property>
        <Setting key="uniqueNameAssumption">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Setting>
        <SupportedExtension identifier="&ole;retraction"/>
        <SupportedExtension identifier="&ole;told"/>
        <PublicKB kb="http://www.owllink.org/examples/KB_1" name="Test KB 1"/>
        <PublicKB kb="http://www.owllink.org/examples/KB_2" name="Test KB 2"/>
    </Description>
</ResponseMessage>

4.2 Creating Knowledge Bases

The following sample request starts with a CreateKB request in order to allocate a new Knowledge Base at the server. This is followed by a Tell request which asserts two subclass axioms to the new KB. Finally a single ask request checks the satisfiability of one of the classes introduced in one of the subclass axioms (IsClassSatisfiable).

<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <CreateKB kb="http://www.owllink.org/examples/KB_1"/>
    <Tell kb="http://www.owllink.org/examples/KB_1">
        <owl:SubClassOf>
            <owl:Class IRI="http://www.owllink.org/examples/myOntology#A"/>
            <owl:Class IRI="http://www.owllink.org/examples/myOntology#B"/>
        </owl:SubClassOf>
        <owl:SubClassOf>
            <owl:Class IRI="http://www.owllink.org/examples/myOntology#B"/>
            <owl:Class IRI="http://www.owllink.org/examples/myOntology#C"/>
        </owl:SubClassOf>
    </Tell>
    <IsClassSatisfiable kb="http://www.owllink.org/examples/KB_1">
        <owl:Class IRI="http://www.owllink.org/examples/myOntology#A"/>
    </IsClassSatisfiable>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_1"/>
</RequestMessage>

According to the [OWLlink Structural Specification] every single Request must be acknowledged with a corresponding Response considering the ordered sequence of request elements. The CreateKB is acknowledged by a KB element, the Tell request is acknowledged by an OK response and the satisfiability ask is acknowledged by a BooleanResponse carrying a positive answer.

<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <KB kb="http://www.owllink.org/examples/KB_1"/>
    <OK/>
    <BooleanResponse result="true"/>
    <OK/>
</ResponseMessage>

4.3 Retrieving Settings

The actual settings for a Knowledge Base can be retrieved by sending a GetSettings message.

<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <CreateKB kb="http://www.owllink.org/examples/KB_1" name="KB 1"/>
    <GetSettings kb="http://www.owllink.org/examples/KB_1"/>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_1"/>
</RequestMessage>

The corresponding ResponseMessage will contain all settings of the specified Knowledge Base.

<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink# 
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <KB kb="http://www.owllink.org/examples/KB_1"/>
    <Settings>
        <Setting key="selectedProfile">
            <OneOf abbreviatedIRI="xsd:string">
                <Literal>OWL 2 QL</Literal>
                <Literal>OWL 2 RL</Literal>
            </OneOf>
            <Literal>OWL 2 RL</Literal>
        </Setting>
        <Setting key="abbreviatesIRIs">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>false</Literal>
        </Setting>
    </Settings>
    <OK/>
</ResponseMessage>

4.4 Changing Settings

Set allows to modify a KB setting. All available settings as well as their default value can be inspected using GetDescription as shown in Section 4.1 Introspecting Reasoner Capabilities.

<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <CreateKB kb="http://www.owllink.org/examples/KB_1" name="KB 1"/>
    <Set kb="http://www.owllink.org/examples/KB_1" key="abbreviatesIRIs">
        <Literal>true</Literal>
    </Set>
    <GetSettings kb="http://www.owllink.org/examples/KB_1"/>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_1"/>
</RequestMessage>

If the Set has not been refused an OK will be returned, otherwise an Error.

<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <KB kb="http://www.owllink.org/examples/KB_1"/>
    <OK/>
    <Settings>
        <Setting key="selectedProfile">
            <OneOf abbreviatedIRI="xsd:string">
                <Literal>OWL 2 QL</Literal>
                <Literal>OWL 2 RL</Literal>
            </OneOf>
            <Literal>OWL 2 RL</Literal>
        </Setting>
        <Setting key="abbreviatesIRIs">
            <Datatype abbreviatedIRI="xsd:boolean"/>
            <Literal>true</Literal>
        </Setting>
    </Settings>
    <OK/>
</ResponseMessage>

4.5 Declaring Prefixes

CreateKB allows for declaring prefixes. All abbreviated IRIs are then resolved with respect to the prefixes.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE RequestMessage [
<!ENTITY ont "http://www.owllink.org/examples/myOntology#"> ]>
<RequestMessage xmlns="http://www.owllink.org/owllink#"
    xml:base="http://www.owllink.org/examples/myOntology#"
    xmlns:owl="http://www.w3.org/2002/07/owl#" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <CreateKB kb="http://www.owllink.org/examples/KB_2">
        <Prefix name="test" fullIRI="http://www.owllink.org/test/ont#"/>
        <Prefix name="myOnt" fullIRI="http://www.owllink.org/examples/myOntology#"/>
    </CreateKB>
    <Tell kb="http://www.owllink.org/examples/KB_2">
        <owl:SubClassOf>
            <owl:Class abbreviatedIRI="test:A"/>
            <owl:Class abbreviatedIRI="myOnt:A"/>
        </owl:SubClassOf>
    </Tell>
    <Set kb="http://www.owllink.org/examples/KB_2" key="abbreviatesIRIs">
        <Literal>false</Literal>
    </Set>
    <GetSubClasses kb="http://www.owllink.org/examples/KB_2" direct="false">
        <owl:Class IRI="&ont;A"/>
    </GetSubClasses>
    <GetSubClasses kb="http://www.owllink.org/examples/KB_2" direct="false">
        <owl:Class abbreviatedIRI="myOnt:A"/>
    </GetSubClasses>
    <Set kb="http://www.owllink.org/examples/KB_2" key="abbreviatesIRIs">
        <Literal>true</Literal>
    </Set>
    <GetSubClasses kb="http://www.owllink.org/examples/KB_2" direct="false">
        <owl:Class IRI="http://www.owllink.org/examples/myOntology#A"/>
    </GetSubClasses>
    <GetSubClasses kb="http://www.owllink.org/examples/KB_2" direct="false">
        <owl:Class IRI="A"/>
    </GetSubClasses>
    <GetPrefixes kb="http://www.owllink.org/examples/KB_2"/>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_2"/>
</RequestMessage>

If the CreateKB and the Tell are processed successfully the corresponding ResponseMessage will contain a KB and a OK response.

<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <KB kb="http://www.owllink.org/examples/KB_2"/>
    <OK/>
    <OK/>
    <SetOfClassSynsets>
        <ClassSynset>
            <owl:Class IRI="http://www.owllink.org/test/ont#A"/>
        </ClassSynset>
        <ClassSynset>
            <owl:Class IRI="http://www.w3.org/2002/07/owl#Nothing"/>
        </ClassSynset>
    </SetOfClassSynsets>
    <SetOfClassSynsets>
        <ClassSynset>
            <owl:Class IRI="http://www.owllink.org/test/ont#A"/>
        </ClassSynset>
        <ClassSynset>
            <owl:Class IRI="http://www.w3.org/2002/07/owl#Nothing"/>
        </ClassSynset>
    </SetOfClassSynsets>
    <OK/>
    <SetOfClassSynsets>
        <ClassSynset>
            <owl:Class abbreviatedIRI="test:A"/>
        </ClassSynset>
        <ClassSynset>
            <owl:Class abbreviatedIRI="owl:Nothing"/>
        </ClassSynset>
    </SetOfClassSynsets>
    <SetOfClassSynsets>
        <ClassSynset>
            <owl:Class abbreviatedIRI="test:A"/>
        </ClassSynset>
        <ClassSynset>
            <owl:Class abbreviatedIRI="owl:Nothing"/>
        </ClassSynset>
    </SetOfClassSynsets>
    <Prefixes>
        <Prefix name="rdf" fullIRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
        <Prefix name="rdfs" fullIRI="http://www.w3.org/2000/01/rdf-schema#"/>
        <Prefix name="xsd" fullIRI="http://www.w3.org/2001/XMLSchema#"/>
        <Prefix name="owl" fullIRI="http://www.w3.org/2002/07/owl#"/>
        <Prefix name="test" fullIRI="http://www.owllink.org/test/ont#"/>
        <Prefix name="myOnt" fullIRI="http://www.owllink.org/examples/myOntology#"/>
    </Prefixes>
    <OK/>
</ResponseMessage>

4.6 Loading Ontologies

The following example demonstrates that it is possible to create a Knowledge Base and fill it with both (i) axioms of ontologies loaded directly from their location and (ii) directly transmitted axioms. Note that the prefix declared for the Knowledge Base are not considered when executing the LoadOntologies request.

<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <CreateKB kb="http://www.owllink.org/examples/families">
        <Prefix name="families" fullIRI="http://example.com/owl/families/"/>
        <Prefix name="otherOnt" fullIRI="http://example.org/otherOntologies/families/"/>
    </CreateKB>
    <LoadOntologies kb="http://www.owllink.org/examples/families">
        <OntologyIRI IRI="http://www.owllink.org/ontologies/primer.owl"/>
    </LoadOntologies>
    <GetInstances kb="http://www.owllink.org/examples/families">
      <owl:Class abbreviatedIRI="families:Person"/>
    </GetInstances>
    <GetTypes kb="http://www.owllink.org/examples/families" direct="false">
      <owl:NamedIndividual abbreviatedIRI="families:John"/>
    </GetTypes>
    <Tell kb="http://www.owllink.org/examples/families">
        <owl:SubClassOf>
            <owl:Class abbreviatedIRI="families:HappyPerson"/>
            <owl:Class abbreviatedIRI="families:Person"/>
        </owl:SubClassOf>
        <owl:SubClassOf>
            <owl:Class abbreviatedIRI="otherOnt:ExcitedPerson"/>
            <owl:Class abbreviatedIRI="families:HappyPerson"/>
        </owl:SubClassOf>
    </Tell>
    <GetSuperClasses kb="http://www.owllink.org/examples/families" direct="false">
      <owl:Class abbreviatedIRI="otherOnt:ExcitedPerson"/>
    </GetSuperClasses>
    <GetObjectPropertySources kb="http://www.owllink.org/examples/families">
      <owl:ObjectProperty abbreviatedIRI="families:hasWife"/>
      <owl:NamedIndividual abbreviatedIRI="families:Mary"/>
    </GetObjectPropertySources>
    <ReleaseKB kb="http://www.owllink.org/examples/families"/>
</RequestMessage>

The corresponding response message contains a KB response as well as OK messages indicating that the LoadOntologies respectively Tell requests have been successfully processed by the server.

<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink#"
  xmlns:owl="http://www.w3.org/2002/07/owl#"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
  <KB kb="http://www.owllink.org/examples/families"/>
  <OK/>
  <SetOfIndividualSynsets>
    <IndividualSynset>
      <owl:NamedIndividual abbreviatedIRI="families:Jack"/>
    </IndividualSynset>
    <IndividualSynset>
      <owl:NamedIndividual abbreviatedIRI="families:Mary"/>
      <owl:NamedIndividual abbreviatedIRI="otherOnt:MaryBrown"/>
    </IndividualSynset>
    <IndividualSynset>
      <owl:NamedIndividual abbreviatedIRI="families:John"/>
      <owl:NamedIndividual abbreviatedIRI="otherOnt:JohnBrown"/>
    </IndividualSynset>
  </SetOfIndividualSynsets>
  <ClassSynsets>
    <ClassSynset>
      <owl:Class abbreviatedIRI="families:Father"/>
    </ClassSynset>
    <ClassSynset>
      <owl:Class abbreviatedIRI="families:Man"/>
    </ClassSynset>
    <ClassSynset>
      <owl:Class abbreviatedIRI="families:Human"/>
      <owl:Class abbreviatedIRI="families:Person"/>
    </ClassSynset>
    <ClassSynset>
      <owl:Class abbreviatedIRI="owl:Thing"/>
    </ClassSynset>
    <ClassSynset>
      <owl:Class abbreviatedIRI="families:Parent"/>
    </ClassSynset>
    <ClassSynset>
      <owl:Class abbreviatedIRI="families:MyBirthdayGuests"/>
    </ClassSynset>
  </ClassSynsets>
  <OK/>
  <SetOfClassSynsets>
    <ClassSynset>
      <owl:Class abbreviatedIRI="families:HappyPerson"/>
    </ClassSynset>
    <ClassSynset>
      <owl:Class abbreviatedIRI="families:Parent"/>
    </ClassSynset>
    <ClassSynset>
      <owl:Class abbreviatedIRI="owl:Thing"/>
    </ClassSynset>
    <ClassSynset>
      <owl:Class abbreviatedIRI="families:Human"/>
      <owl:Class abbreviatedIRI="families:Person"/>
    </ClassSynset>
  </SetOfClassSynsets>
  <SetOfIndividualSynsets>
    <IndividualSynset>
      <owl:NamedIndividual abbreviatedIRI="families:John"/>
      <owl:NamedIndividual abbreviatedIRI="otherOnt:JohnBrown"/>
    </IndividualSynset>
  </SetOfIndividualSynsets>
  <OK/>
</ResponseMessage>

4.7 Pooling Requests

The following example demonstrates that it is possible to pool tell and ask operations for different Knowledge Bases within one RequestMessage. This is useful, say for test-suites or benchmarking. The following request creates first a KB, adds OWL axioms, poses queries, and then creates a second KB.

<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink#"
    xml:base="http://www.owllink.org/examples/myOntology#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <CreateKB kb="http://www.owllink.org/examples/KB_1"/>
    <!-- Some tells in KB_1 -->
    <Tell kb="http://www.owllink.org/examples/KB_1">
        <owl:SubClassOf>
            <owl:Class IRI="B"/>
            <owl:Class IRI="A"/>
        </owl:SubClassOf>
        <owl:SubClassOf>
            <owl:Class IRI="C"/>
            <owl:Class IRI="A"/>
        </owl:SubClassOf>
        <owl:EquivalentClasses>
            <owl:Class IRI="D"/>
            <owl:Class IRI="E"/>
        </owl:EquivalentClasses>
        <owl:ClassAssertion>
            <owl:Class IRI="A"/>
            <owl:NamedIndividual IRI="iA"/>
        </owl:ClassAssertion>
        <owl:SubClassOf>
            <owl:Class IRI="C"/>
            <owl:Class IRI="A"/>
        </owl:SubClassOf>
    </Tell>
    <!-- Some asks -->
    <GetAllClasses kb="http://www.owllink.org/examples/KB_1"/>
    <GetEquivalentClasses kb="http://www.owllink.org/examples/KB_1">
        <owl:Class IRI="D"/>
    </GetEquivalentClasses>
    <IsEntailedDirect kb="http://www.owllink.org/examples/KB_1">
        <owl:SubClassOf>
            <owl:Class abbreviatedIRI="owl:Thing"/>
            <owl:Class abbreviatedIRI="owl:Nothing"/>            
        </owl:SubClassOf>
    </IsEntailedDirect>
    <GetSubClasses kb="http://www.owllink.org/examples/KB_1">
        <owl:Class IRI="C"/>
    </GetSubClasses>
    <!-- Some tells for the public KB named 'MyKB_2' -->
    <CreateKB kb="http://www.owllink.org/examples/KB_2" name="MyKB_2"/>
    <Tell kb="http://www.owllink.org/examples/KB_2">
        <owl:SubClassOf>
            <owl:Class IRI="A"/>
            <owl:Class IRI="B"/>
        </owl:SubClassOf>
    </Tell>
    <!-- KB Management -->
    <ReleaseKB kb="http://www.owllink.org/examples/KB_2"/>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_1"/>
    <!-- One more ask -->
    <GetAllClasses kb="http://www.owllink.org/examples/KB_1"/>
</RequestMessage>

Note that the request message contains a repetition of an axiom and therefore the OWLlink server acknowledges the Tell with a warning. The response to the last request has to be an Error because KB_1 has been released before.

<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink#"
    xml:base="http://www.owllink.org/examples/myOntology#"
    xmlns:owl="http://www.w3.org/2002/07/owl#" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink# 
      http://www.owllink.org/owllink-20091116.xsd">
    <KB kb="http://www.owllink.org/examples/KB_1"/>
    <OK warning="Duplicate axiom ignored"/>
    <SetOfClasses>
        <owl:Class IRI="A"/>
        <owl:Class IRI="B"/>
        <owl:Class IRI="C"/>
        <owl:Class IRI="D"/>
        <owl:Class IRI="E"/>                       
    </SetOfClasses>
    <SetOfClasses>
        <owl:Class IRI="D"/>
        <owl:Class IRI="E"/>
    </SetOfClasses>
    <BooleanResponse result="false"/>
    <SetOfClassSynsets>
        <ClassSynset>
            <owl:Class abbreviatedIRI="owl:Nothing"/>
        </ClassSynset>
    </SetOfClassSynsets>
    <KB kb="http://www.owllink.org/examples/KB_2"/>
    <OK/>
    <OK/>
    <OK/>
    <KBError error="http://www.owllink.org/examples/KB_1 does not exist!"/>
</ResponseMessage>

4.8 Retrieving Taxonomies

The following example shows how to retrieve the class-subsumption hierarchy of a KB. In this example four Knowledge Bases are creates and the class-subsumption hierarchy is requested for each of them. Note that these four KBs correspond to the example KB introduced in Section '5.4.2 Retrieving the Class Hierarchy' [OWLlink Structural Specification]

<?xml version="1.0" encoding="UTF-8"?>
<RequestMessage xmlns="http://www.owllink.org/owllink#"
    xml:base="http://www.owllink.org/examples/myOntology#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <CreateKB kb="http://www.owllink.org/examples/KB_1"/>
    <CreateKB kb="http://www.owllink.org/examples/KB_2"/>
    <Tell kb="http://www.owllink.org/examples/KB_2">
        <owl:SubClassOf>
            <owl:Class IRI="A"/>
            <owl:Class abbreviatedIRI="owl:Thing"/>
        </owl:SubClassOf>
    </Tell>
    <CreateKB kb="http://www.owllink.org/examples/KB_3"/>
    <Tell kb="http://www.owllink.org/examples/KB_3">
        <owl:SubClassOf>
            <owl:Class IRI="A"/>
            <owl:Class abbreviatedIRI="owl:Thing"/>
        </owl:SubClassOf>
        <owl:SubClassOf>
            <owl:Class IRI="B"/>
            <owl:Class IRI="A"/>
        </owl:SubClassOf>
        <owl:SubClassOf>
            <owl:Class IRI="D"/>
            <owl:Class IRI="A"/>
        </owl:SubClassOf>
    </Tell>
    <CreateKB kb="http://www.owllink.org/examples/KB_4"/>
    <Tell kb="http://www.owllink.org/examples/KB_4">
        <owl:EquivalentClasses>
            <owl:Class IRI="A"/>
            <owl:Class abbreviatedIRI="owl:Thing"/>
        </owl:EquivalentClasses>
        <owl:EquivalentClasses>
            <owl:Class IRI="C"/>
            <owl:Class abbreviatedIRI="owl:Nothing"/>
        </owl:EquivalentClasses>
        <owl:SubClassOf>
            <owl:Class IRI="B"/>
            <owl:Class abbreviatedIRI="owl:Thing"/>
        </owl:SubClassOf>
    </Tell>
    <GetSubClassHierarchy kb="http://www.owllink.org/examples/KB_1"/>
    <GetSubClassHierarchy kb="http://www.owllink.org/examples/KB_2"/>
    <GetSubClassHierarchy kb="http://www.owllink.org/examples/KB_3"/>
    <GetSubClassHierarchy kb="http://www.owllink.org/examples/KB_4"/>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_1"/>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_2"/>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_3"/>
    <ReleaseKB kb="http://www.owllink.org/examples/KB_4"/>
</RequestMessage>

The corresponding response message contains responses for the management requests as well as the GetSubClassHierarchy request.

<?xml version="1.0" encoding="UTF-8"?>
<ResponseMessage xmlns="http://www.owllink.org/owllink#"
    xml:base="http://www.owllink.org/examples/myOntology#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.owllink.org/owllink#
      http://www.w3.org/Submission/2010/SUBM-owllink-httpxml-binding-20100701/owllink.xsd">
    <KB kb="http://www.owllink.org/examples/KB_1"/>
    <KB kb="http://www.owllink.org/examples/KB_2"/>
    <OK/>
    <KB kb="http://www.owllink.org/examples/KB_3"/>
    <OK/>
    <KB kb="http://www.owllink.org/examples/KB_4"/>
    <OK/>
    <ClassHierarchy>
        <ClassSynset>
            <owl:Class abbreviatedIRI="owl:Nothing"/>
        </ClassSynset>     
    </ClassHierarchy>
    <ClassHierarchy>
        <ClassSynset>
            <owl:Class abbreviatedIRI="owl:Nothing"/>
        </ClassSynset>
        <ClassSubClassesPair>
            <ClassSynset>
                <owl:Class abbreviatedIRI="owl:Thing"/>
            </ClassSynset>
            <SubClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="A"/>
                </ClassSynset>
            </SubClassSynsets>
        </ClassSubClassesPair>
    </ClassHierarchy>
    <ClassHierarchy>
        <ClassSynset>
            <owl:Class abbreviatedIRI="owl:Nothing"/>
        </ClassSynset>
        <ClassSubClassesPair>
            <ClassSynset>
                <owl:Class abbreviatedIRI="owl:Thing"/>
            </ClassSynset>
            <SubClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="A"/>
                </ClassSynset>
            </SubClassSynsets>
        </ClassSubClassesPair>
        <ClassSubClassesPair>
            <ClassSynset>
                <owl:Class IRI="A"/>
            </ClassSynset>
            <SubClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="B"/>
                </ClassSynset>
                <ClassSynset>
                    <owl:Class IRI="D"/>
                </ClassSynset>
            </SubClassSynsets>
        </ClassSubClassesPair>
    </ClassHierarchy>
    <ClassHierarchy>
        <ClassSynset>
            <owl:Class IRI="C"/>
            <owl:Class abbreviatedIRI="owl:Nothing"/>
        </ClassSynset>
        <ClassSubClassesPair>
            <ClassSynset>
                <owl:Class IRI="A"/>
                <owl:Class abbreviatedIRI="owl:Thing"/>
            </ClassSynset>
            <SubClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="B"/>
                </ClassSynset>
            </SubClassSynsets>
        </ClassSubClassesPair>
    </ClassHierarchy>
    <OK/>
    <OK/>
    <OK/>
    <OK/>
</ResponseMessage>

5 Acknowledgments

This specification has been produced by the OWLlink Working Group under consideration of contributions from Peter F. Patel-Schneider (Bell Labs Research, Alcatel-Lucent), Dmitry Tsarkov (University of Manchester), Anni-Yasmin Turhan (TU Dresden), Timo Weithöner (Ulm University).


6. References

[DIG 1.1]
The DIG Description Logic Interface: DIG/1.1. Sean Bechhofer. Technical Report, Feb 2003.
[EXI]
Efficient XML Interchange Format 1.0 John Schneider and Takuki Kamiya. W3C Working Draft, March 2008.
[HTTP/1.1]
Hypertext Transfer Protocol – HTTP/1.1, Request for Comments 2616. R. Fielding, J. Gettys, J. Mogul, H. Frystyk, L. Masinter, P. Leach, and T. Berners-Lee.
[OWL 2 XML Serialization]
OWL 2 Web Ontology Language: XML Serialization Boris Motik, Bijan Parsia, Peter F. Patel-Schneider, eds. W3C Recommendation, 27 October 2009, http://www.w3.org/TR/2009/REC-owl2-xml-serialization-20091027/. Latest version available at http://www.w3.org/TR/owl2-xml-serialization/.
[OWLlink Structural Specification]
OWLlink: Structural Specification Document included in the present W3C Member Submission.
[SOAP]
SOAP Version 1.2 Part 1: Messaging Framework (Second Edition). M. Gudgin, M. Hadley, N. Mendelsohn, J-J. Moreau, H. F. Nielsen, A. Karmarkar, Y. Lafon, eds. W3C Recommendation 27 April 2007, http://www.w3.org/TR/2007/REC-soap12-part1-20070427/.
[XML Schema]
XML Schema Part 1: Structures Second Edition. Henry S. Thompson, David Beech, Murray Maloney, Noah Mendelsohn, eds. W3C Recommendation 28 October 2004, http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/.