<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rdf:RDF [
    <!ENTITY rdf   "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <!ENTITY rdfs  "http://www.w3.org/2000/01/rdf-schema#">
    <!ENTITY owl   "http://www.w3.org/2002/07/owl#">
    <!ENTITY xsd   "http://www.w3.org/2001/XMLSchema#">
    <!ENTITY sswap "http://sswapmeet.sswap.info/sswap/">
]>

<rdf:RDF
    xmlns:rdf   = "&rdf;"
    xmlns:rdfs  = "&rdfs;"
    xmlns:owl   = "&owl;"
    xmlns:xsd   = "&xsd;"
    xmlns:sswap = "&sswap;"
    xmlns       = "&sswap;"
>

    <!-- Read in the SSWAP protocol to define all SSWAP terms -->
    <owl:Ontology rdf:about="&sswap;owlOntology">
        <owl:imports rdf:resource="&sswap;owlOntology"/>
    </owl:Ontology>

    <!-- Define this term using OWL + SSWAP semantics -->
    <owl:Class rdf:about="&sswap;Object">

        <!-- Declare simple subsumption relations -->
        <rdfs:subClassOf rdf:resource="&sswap;SSWAP"/>

        <!-- Declare necessary conditions (i.e., subClassOf ) -->
        <!--
             These are essentially *optional* properties, so an
             individual may belong to this class and not have
             these properties instantiated.

             The cardinality constraints do not constrain how many
             instances of the property can exist, but it does allow
             a reasoner to infer how many semantically distinct
             objects (values) exist.  In the case of an
             owl:DatatypeProperty and an owl:maxCardinality = 1,
             it essentially means that if a value is defined, then
             it is the only allowed valued.  (Two semantically
             distinct values [e.g., 1 and 2] would yield the
             ontology inconsistent.
        -->
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty>
                    <owl:DatatypeProperty rdf:about="&sswap;metadata"/>
                </owl:onProperty>
                <owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:maxCardinality>
            </owl:Restriction>
        </rdfs:subClassOf>

        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty>
                    <owl:ObjectProperty rdf:about="&sswap;mapsTo"/>
                </owl:onProperty>
                <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">0</owl:minCardinality>
            </owl:Restriction>
        </rdfs:subClassOf>

        <!-- Declare necessary and sufficient conditions (i.e., equivalentClass) -->
        <!--
             These are essentially *required* properties, an individual must
             satisfy these conditions in order to belong to this class.
        -->
        <owl:equivalentClass>
            <owl:Restriction>
                <owl:onProperty>
		        <owl:ObjectProperty rdf:about="&sswap;mapsTo"/>
                </owl:onProperty>
                <owl:allValuesFrom>
                    <owl:Class rdf:about="&sswap;Subject"/>
                </owl:allValuesFrom>
            </owl:Restriction>
        </owl:equivalentClass>

        <!-- Self-documenting comment about this term -->
        <rdfs:comment rdf:datatype="&xsd;string"
            >A required class. In the concept of a service mapping an input to an output, the sswap:Object corresponds to the output. The property sswap:mapsTo explicitly demarcates the mapping (or transformation) from an input to this output. One can also use sswap:mapsTo to describe inverse mappings where the stated relationship is *from* a sswap:Object to a sswap:Subject.

Required predicates:
	&lt;none&gt;

Optional predicates:
	mapsTo
	metadata</rdfs:comment>

    </owl:Class>

</rdf:RDF>
