<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [
  <!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 data 'http://sswapmeet.sswap.info/data/'>
  <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>]>
<rdf:RDF
    xmlns:rdf="&rdf;"
    xmlns:owl="&owl;"
    xmlns:data="&data;"
    xmlns:xsd="&xsd;"
    xmlns:rdfs="&rdfs;">
    <owl:Ontology rdf:about="&data;owlOntology">
        <owl:imports rdf:resource="&data;owlOntology"/>
    </owl:Ontology>
    <owl:Class rdf:about="&data;Parser"/>
    <owl:Class rdf:about="&data;Data"/>
    <owl:Class rdf:about="&data;Accessor"/>
    <owl:Class rdf:about="&data;Validator"/>
    <owl:Class rdf:about="&data;Serializer"/>
    <owl:Class rdf:about="&data;DataFormat">
        <rdfs:label rdf:datatype="&xsd;string">Data Format</rdfs:label>
        <rdfs:comment rdf:datatype="&xsd;string">Super class of the data itself in a particular format. It is used to tag resources as belonging to a specified data format as well as presenting a mechanism for linking validators, parsers, serializers, and visualizers to the resource.

Specific formats are built by subclassing these classes; e.g.:

    seq:FASTA rdfs:subClassOf data:DataFormat.

For data that is large in volume, or inherently binary, a useful pattern is to not serialize the data in OWL, but to type its URL with a subClass of data:DataFormat and then associate it with helper resources such as parsers, validators, and so forth.

For example, the URI of a text file could belong to both classes seq:Sequence and seq:FASTA, tagging the type of data and its format  respectively (e.g., a DNA sequence in FASTA format, where seq:FASTA is a rdfs:subClassOf data:DataFormat).  The resource may also have the predicates data:hasParser and data:hasValidator each pointing to a parser and validator for the FASTA sequence.  Possibly these two URIs are the same. The actual sequence data would be at the resource itself.

Alternatively, the sequence data could be serialized as the value of the datatype property data:literalData or custom user-defined subproperty.

The owl:minCardinality constraints of zero (0) annotationally tie this class to optional predicates, without making a logical requirement that such predicates be instantiated.</rdfs:comment>
        <rdfs:subClassOf rdf:resource="&data;Data"/>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:allValuesFrom rdf:resource="&data;Accessor"/>
                <owl:onProperty>
                    <owl:ObjectProperty rdf:about="&data;hasAccessor"/>
                </owl:onProperty>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty>
                    <owl:ObjectProperty rdf:about="&data;hasValidator"/>
                </owl:onProperty>
                <owl:allValuesFrom rdf:resource="&data;Validator"/>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty>
                    <owl:ObjectProperty rdf:about="&data;hasParser"/>
                </owl:onProperty>
                <owl:allValuesFrom rdf:resource="&data;Parser"/>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty>
                    <owl:DatatypeProperty rdf:about="&data;literalData"/>
                </owl:onProperty>
                <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger"
                >0</owl:minCardinality>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:allValuesFrom rdf:resource="&data;Serializer"/>
                <owl:onProperty>
                    <owl:ObjectProperty rdf:about="&data;hasSerializer"/>
                </owl:onProperty>
            </owl:Restriction>
        </rdfs:subClassOf>
    </owl:Class>
    <owl:DatatypeProperty rdf:about="&data;literalData">
        <rdf:type rdf:resource="&owl;FunctionalProperty"/>
    </owl:DatatypeProperty>
</rdf:RDF>

