<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [
  <!ENTITY sswap 'http://sswapmeet.sswap.info/sswap/'>
  <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
  <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#'>
  <!ENTITY owl 'http://www.w3.org/2002/07/owl#'>
  <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>]>
<rdf:RDF
    xmlns:rdf="&rdf;"
    xmlns:sswap="&sswap;"
    xmlns:owl="&owl;"
    xmlns:xsd="&xsd;"
    xmlns:rdfs="&rdfs;">
    <owl:Ontology rdf:about="&sswap;owlOntology">
        <owl:imports rdf:resource="&sswap;owlOntology"/>
    </owl:Ontology>
    <owl:Class rdf:about="&sswap;Resource">
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty>
                    <owl:FunctionalProperty rdf:about="&sswap;oneLineDescription"/>
                </owl:onProperty>
                <owl:maxCardinality rdf:datatype="&xsd;int">1</owl:maxCardinality>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:maxCardinality rdf:datatype="&xsd;int">1</owl:maxCardinality>
                <owl:onProperty>
                    <owl:FunctionalProperty rdf:about="&sswap;inputURI"/>
                </owl:onProperty>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:maxCardinality rdf:datatype="&xsd;int">1</owl:maxCardinality>
                <owl:onProperty>
                    <owl:FunctionalProperty rdf:about="&sswap;outputURI"/>
                </owl:onProperty>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:label rdf:datatype="&xsd;string">Resource</rdfs:label>
        <owl:disjointWith>
            <owl:Class rdf:about="&sswap;Graph"/>
        </owl:disjointWith>
        <rdfs:subClassOf>
            <owl:Class rdf:about="&sswap;SSWAP"/>
        </rdfs:subClassOf>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:maxCardinality rdf:datatype="&xsd;int">1</owl:maxCardinality>
                <owl:onProperty>
                    <owl:FunctionalProperty rdf:about="&sswap;aboutURI"/>
                </owl:onProperty>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:comment rdf:datatype="&xsd;string">A sswap:Resource designates a semantically described web resource.

Resources that "do things" for example, transform some input to some output are called services. A sswap:Resource sswap:operatesOn one or more sswap:Graphs, where the sswap:Graph acts as a data structure for the mapping of some input (sswap:Subject) to some output (sswap:Object). A resource that is a sswap:Resource has the URI of its Resource Description Graph (RDG).

All sswap:Resources have a sole and unique sswap:Provider (indicated by the sswap:providedBy predicate) which claims ownership of the resource (reciprocated by the sswap:providesResource predicate). If the resource's URI is a lexical sub-path of the provider, then the provider does not have to reciprocate the sswap:providesResource claim. But if the resource is claiming ownership by a provider whose URI is not a lexical sub-path, then the provider must explicitly reciprocate the claim with sswap:providesResource. Similarly, if a provider claims a resource which is not in a sub-path, then the resource must reciprocate the claim.

        Required predicates: sswap:name, sswap:operatesOn, sswap:providedBy;

        Optional predicates: sswap:aboutURI, sswap:inputURI, sswap:metadata, sswap:oneLineDescription, sswap:outputURI.</rdfs:comment>
        <owl:equivalentClass>
            <owl:Class>
                <owl:intersectionOf rdf:parseType="Collection">
                    <owl:Restriction>
                        <owl:onProperty>
                            <owl:FunctionalProperty rdf:about="&sswap;name"/>
                        </owl:onProperty>
                        <owl:cardinality rdf:datatype="&xsd;int"
                        >1</owl:cardinality>
                    </owl:Restriction>
                    <owl:Restriction>
                        <owl:allValuesFrom rdf:resource="&sswap;Graph"/>
                        <owl:onProperty>
                            <owl:InverseFunctionalProperty rdf:about="&sswap;operatesOn"/>
                        </owl:onProperty>
                    </owl:Restriction>
                    <owl:Restriction>
                        <owl:someValuesFrom rdf:resource="&sswap;Graph"/>
                        <owl:onProperty>
                            <owl:InverseFunctionalProperty rdf:about="&sswap;operatesOn"/>
                        </owl:onProperty>
                    </owl:Restriction>
                    <owl:Restriction>
                        <owl:onProperty>
                            <owl:FunctionalProperty rdf:about="&sswap;providedBy"/>
                        </owl:onProperty>
                        <owl:cardinality rdf:datatype="&xsd;int"
                        >1</owl:cardinality>
                    </owl:Restriction>
                    <owl:Restriction>
                        <owl:onProperty>
                            <owl:FunctionalProperty rdf:about="&sswap;providedBy"/>
                        </owl:onProperty>
                        <owl:allValuesFrom>
                            <owl:Class rdf:about="&sswap;Provider"/>
                        </owl:allValuesFrom>
                    </owl:Restriction>
                </owl:intersectionOf>
            </owl:Class>
        </owl:equivalentClass>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty>
                    <owl:DatatypeProperty rdf:about="&sswap;metadata"/>
                </owl:onProperty>
                <owl:minCardinality rdf:datatype="&xsd;int">0</owl:minCardinality>
            </owl:Restriction>
        </rdfs:subClassOf>
    </owl:Class>
    <owl:FunctionalProperty rdf:about="&sswap;outputURI">
        <rdf:type rdf:resource="&owl;DatatypeProperty"/>
    </owl:FunctionalProperty>
    <owl:FunctionalProperty rdf:about="&sswap;inputURI">
        <rdf:type rdf:resource="&owl;DatatypeProperty"/>
    </owl:FunctionalProperty>
    <owl:FunctionalProperty rdf:about="&sswap;aboutURI">
        <rdf:type rdf:resource="&owl;DatatypeProperty"/>
    </owl:FunctionalProperty>
    <owl:FunctionalProperty rdf:about="&sswap;name">
        <rdf:type rdf:resource="&owl;DatatypeProperty"/>
    </owl:FunctionalProperty>
    <owl:FunctionalProperty rdf:about="&sswap;oneLineDescription">
        <rdf:type rdf:resource="&owl;DatatypeProperty"/>
    </owl:FunctionalProperty>
    <owl:FunctionalProperty rdf:about="&sswap;providedBy">
        <rdf:type rdf:resource="&owl;ObjectProperty"/>
    </owl:FunctionalProperty>
    <owl:InverseFunctionalProperty rdf:about="&sswap;operatesOn">
        <rdf:type rdf:resource="&owl;ObjectProperty"/>
    </owl:InverseFunctionalProperty>
</rdf:RDF>

