<?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 openBiomedicalOntologies  "http://ontologies.ncgr.org/OpenBiomedicalOntologies/">
]>

<rdf:RDF xmlns:rdf                       = "&rdf;"
         xmlns:rdfs                      = "&rdfs;"
         xmlns:owl                       = "&owl;"
         xmlns:xsd                       = "&xsd;"
         xmlns:openBiomedicalOntologies  = "&openBiomedicalOntologies;"
         xmlns:base                      = "&openBiomedicalOntologies;"
         xmlns                           = "&openBiomedicalOntologies;">
         
    <owl:Class rdf:about="&openBiomedicalOntologies;Term">

        <rdfs:comment>
            Individuals of type Term represent ontological concepts, which
            can be defined in OBO flat format files, as described in the
            document at www.geneontology.org/GO.format.shtml. During
            conversion from a heirarchical, class-based representation,
            each OBO Term in the heirarchy is represented as an individual
            of type Term and related to the other Term individuals by the
            properties superProperty (for its superclasses), subProperty
            (for its immediate subclasses), and rootProperty (to identify
            which, if any, namespace the term is located in).
            
            Converted Term individuals are stored one per URI (in the
            simple case, they can be stored in files). For example, in the
            converted GO ontology, the GO Id (e.g. GO:0006260 for the GO
            Term "dna replication") uniquely identifies the term, so the
            GO Id is the obvious choice for the last part of the URI (e.g.
            file name) of the GOElement. Since the colon character is
            reserved in URI space for port designations, we follow the
            convention of the consortium's prototype OBO to OWL converter
            and replace the colon with an underscore. So, assuming that
            ontologies.ncgr.org/GeneOntology/ is the root URI from
            which this class definition was retrieved, the GOElement
            individual for GO:0006260 would be retrieved from
            ontologies.ncgr.org/GeneOntology/BiologicalProcess/GO_0006260

            All Term individuals must have the properties (from fields
            in the OBO file) and associated minimum..maximum cardinalities
            specified by the the subclass restrictions below. Note that the
            cardinalities of subProperty and subProperty are unrestricted,
            since not all GO Ids have is_a relationships, so there are no
            property restrictions for these two properties.
        </rdfs:comment>

        <!-- id (from id field) cardinality is 1..1 -->
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="&openBiomedicalOntologies;id"/>
                <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">
                    1
                </owl:minCardinality>
                <owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">
                    1
                </owl:maxCardinality>
            </owl:Restriction>
        </rdfs:subClassOf>

        <!-- name (from name field) cardinality is 1..1 -->
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="&openBiomedicalOntologies;name"/>
                <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">
                    1
                </owl:minCardinality>
                <owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">
                    1
                </owl:maxCardinality>
            </owl:Restriction>
        </rdfs:subClassOf>

        <!-- rootProperty (based on namespace field) cardinality is 0..1 -->
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="&openBiomedicalOntologies;rootProperty"/>
                <owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">
                    1
                </owl:maxCardinality>
            </owl:Restriction>
        </rdfs:subClassOf>

        <!-- obo:def (from def field) cardinality is 0..1 -->
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="&openBiomedicalOntologies;def"/>
                <owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">
                    1
                </owl:maxCardinality>
            </owl:Restriction>
        </rdfs:subClassOf>

        <!-- rdfs:comment (from comment field) cardinality is 0..1 -->
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="&rdfs;comment"/>
                <owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">
                    1
                </owl:maxCardinality>
            </owl:Restriction>
        </rdfs:subClassOf>

        <!-- obo:is_obsolete (from is_obsolete field) cardinality is 0..1 -->
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="&openBiomedicalOntologies;is_obsolete"/>
                <owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">
                    1
                </owl:maxCardinality>
            </owl:Restriction>
        </rdfs:subClassOf>

    </owl:Class>

</rdf:RDF>

