Konclude via OWLlink

Konclude can be used as an OWLlink server that answers OWLlink requests from an OWLlink client (typically an OWL-aware application) sent over HTTP. In this case Konclude has to be started with the 'owllinkserver' command. The listening port can optionally be specified by the parameter '-p', otherwise the default port 8080 is used.

 > Konclude owllinkserver -p 8080

Requests and Responses

Konclude accepts OWLlink request messages using an OWL 2 XML serialization via HTTP (cf. OWLlink HTTP/XML Binding). As an example consider the following request message (note that any declarations are omitted here for the sake of brevity - the complete version can be found alongside the release version):

 <RequestMessage xmlns="http://www.owllink.org/owllink#"
    xsi:schemaLocation="http://www.owllink.org/owllink#
    http://www.owllink.org/owllink-20091116.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:owl="http://www.w3.org/2002/07/owl#">

    <CreateKB kb="http://www.konclude.com/test"/>

    <Tell kb="http://www.konclude.com/test">
        <owl:EquivalentClasses>
            <owl:Class IRI="#A"/>
            <owl:ObjectIntersectionOf>
                <owl:Class IRI="#B"/>
                <owl:ObjectSomeValuesFrom>
                    <owl:ObjectProperty IRI="#r"/>
                    <owl:Class abbreviatedIRI="owl:Thing"/>
                </owl:ObjectSomeValuesFrom>
            </owl:ObjectIntersectionOf>
        </owl:EquivalentClasses>
        <owl:EquivalentClasses>
            <owl:Class IRI="#C"/>
            <owl:ObjectSomeValuesFrom>
                <owl:ObjectProperty IRI="#r"/>
                <owl:Class abbreviatedIRI="owl:Thing"/>
            </owl:ObjectSomeValuesFrom>
        </owl:EquivalentClasses>
        <owl:ClassAssertion>
            <owl:Class IRI="#B"/>
            <owl:NamedIndividual IRI="#i"/>
        </owl:ClassAssertion>
        <owl:ObjectPropertyAssertion>
            <owl:ObjectProperty IRI="#r"/>
            <owl:NamedIndividual IRI="#i"/>
            <owl:NamedIndividual IRI="#j"/>
        </owl:ObjectPropertyAssertion>
    </Tell>

    <IsClassSatisfiable kb="http://www.konclude.com/test">
        <owl:Class IRI="#A"/>
    </IsClassSatisfiable>

    <GetSubClassHierarchy kb="http://www.konclude.com/test"/>

    <GetFlattenedTypes kb="http://www.konclude.com/test" direct="true">
        <owl:NamedIndividual IRI="#i"/>
    </GetFlattenedTypes>

    <ReleaseKB kb="http://www.konclude.com/test"/>

</RequestMessage>

When sent to Konclude via HTTP - for instance via the 'curl' command line tool (comes with Linux or OS X and available also for Windows at cURL)

 > curl --upload-file ./Tests/test-request.xml http:⁄⁄localhost:8080 

Konclude will respond accordingly with the following response message (enriched below with some comments that help to identify the corresponding request commands):

<ResponseMessage xmlns="http://www.owllink.org/owllink#"
    xml:base="http://www.w3.org/2002/07/owl#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
    <KB kb="http://www.konclude.com/test"/> // response to CreateKB
    <OK/> // response to Tell
    <BooleanResponse result="true"/> // response to IsClassSatisfiable
    <ClassHierarchy> //response to GetSubClassHierarchy
        <ClassSynset>
            <owl:Class IRI="http://www.w3.org/2002/07/owl#Nothing"/>
        </ClassSynset>
        <ClassSubClassesPair>
            <ClassSynset>
                <owl:Class IRI="http://www.w3.org/2002/07/owl#Thing"/>
            </ClassSynset>
            <SubClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="#C"/>
                </ClassSynset>
                <ClassSynset>
                    <owl:Class IRI="#B"/>
                </ClassSynset>
            </SubClassSynsets>
        </ClassSubClassesPair>
        <ClassSubClassesPair>
            <ClassSynset>
                <owl:Class IRI="#C"/>
            </ClassSynset>
            <SubClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="#A"/>
                </ClassSynset>
            </SubClassSynsets>
        </ClassSubClassesPair>
        <ClassSubClassesPair>
            <ClassSynset>
                <owl:Class IRI="#B"/>
            </ClassSynset>
            <SubClassSynsets>
                <ClassSynset>
                    <owl:Class IRI="#A"/>
                </ClassSynset>
            </SubClassSynsets>
        </ClassSubClassesPair>
    </ClassHierarchy>
    <Classes> // response to GetFlattenedTypes
        <owl:Class IRI="#A"/>
    </Classes>
    <OK/> // response to ReleaseKB
</ResponseMessage>

Reasoner Configuration and KB Management

Note, Konclude uses for anonymous/unnamed knowledge bases IRIs that start with 'http://Konclude.com/Ontologies/UnnamedOntologies/'. Thus, the usage of IRIs that start with the same character sequence should be avoided by OWLlink clients.

Parsing Large Input

Note that if you aim at loading large ontologies you should not include the ontologies within a 'tell' command of an OWLlink request because the request files are completely loaded into the main memory of the system. In contrast, the files referenced by the 'LoadOntologies' command are parsed in a stream-based manner:

 <RequestMessage xmlns="http://www.owllink.org/owllink#">
   <CreateKB kb="http://foo.com/test"/>
   <LoadOntologies kb="http://foo.com/test">
     <OntologyIRI IRI="file:./Tests/large-ontology.owl"/>
   </LoadOntologies>
   <GetSubClassHierarchy kb="http://foo.com/test"/>
   <ReleaseKB kb="http://foo.com/test"/>
</RequestMessage>