@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dctype: <http://purl.org/dc/dcmitype/> .
@prefix ns0: <http://purl.org/vocab/changeset/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix ns1: <http://iandavis.com/id/> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix cs: <http://purl.org/vocab/changeset/schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://vocab.org/changeset/schema.turtle> rdf:type foaf:Document ,
                                                    dctype:Text ;
                                           foaf:primaryTopic ns0:schema ;
                                           dct:hasFormat <http://vocab.org/changeset/schema.rdf> ,
                                                         <http://vocab.org/changeset/schema.html> ,
                                                         <http://vocab.org/changeset/schema.json> ;
                                           foaf:topic ns0:schema .

<http://vocab.org/changeset/schema.rdf> rdf:type dctype:Text ,
                                                 foaf:Document ;
                                        dc:format "application/rdf+xml" ;
                                        rdfs:label "RDF/XML" .

<http://vocab.org/changeset/schema.html> rdf:type dctype:Text ,
                                                  foaf:Document ;
                                         dc:format "text/html" ;
                                         rdfs:label "HTML" .

<http://vocab.org/changeset/schema.json> rdf:type dctype:Text ,
                                                  foaf:Document ;
                                         dc:format "application/json" ;
                                         rdfs:label "JSON" .

ns0:schema rdf:type owl:Ontology ;
           dct:date "2006-03-21" ;
           dct:title "Changeset"@en ;
           rdfs:comment """
      This vocabulary defines a set of terms for describing changes to resource descriptions.
    """@en ,
                        """
      The vocabulary introduces the notion of a ChangeSet which encapsulates the delta between two versions of a 
      resource description. In this context a resource description is the set of triples that in some way comprise a 
      description of a resource. The delta is represented by two sets of triples: additions and removals. A ChangeSet can be used to 
      modify a resource description by first removing all triples from the description that are in the removals set and
      adding the triples in the additions set.
    """@en ;
           dct:identifier "http://purl.org/vocab/changeset/schema-20060321" ;
           dct:isVersionOf <http://purl.org/vocab/changeset/schema#> ;
           dct:creator "Sam Tunnicliffe" ,
                       ns1:me ;
           dct:rights "Copyright © 2005 Talis Information Ltd." ;
           dct:replaces ns0:schema-20051214 ;
           vann:preferredNamespaceUri "http://purl.org/vocab/changeset/schema#" ;
           vann:preferredNamespacePrefix "cs" ;
           vann:example <http://vocab.org/changeset/changesets-example-20060321.html> ,
                        <http://vocab.org/changeset/changesets-example2-20060321.html> ,
                        <http://vocab.org/changeset/changesets-example3-20060321.html> ;
           dct:issued "2005-12-14" ;
           skos:changeNote _:arca34ab1 ,
                           _:arca34ab4 ;
           skos:historyNote _:arca34ab2 ,
                            _:arca34ab3 .

ns1:me rdf:type foaf:Person ;
       foaf:name "Ian Davis" .

<http://vocab.org/changeset/changesets-example-20060321.html> dct:title "A Simple ChangeSet" .

<http://vocab.org/changeset/changesets-example2-20060321.html> dct:title "Linked ChangeSets" .

<http://vocab.org/changeset/changesets-example3-20060321.html> dct:title "Implementing Undo With ChangeSets" .

_:arca34ab1 rdfs:label "Improved documentation"@en ;
            dct:date "2006-03-21" ;
            dct:creator ns1:me .

_:arca34ab2 rdfs:label "Introduced statement property"@en ;
            dct:date "2006-03-21" ;
            dct:creator ns1:me .

_:arca34ab3 rdfs:label "Updated dublin core properties to new namespace"@en ;
            dct:date "2009-05-18" ;
            dct:creator ns1:me .

_:arca34ab4 rdfs:label "Fixed invalid RDF"@en ;
            dct:date "2006-06-23" ;
            dct:creator ns1:me .

cs:statement rdf:type owl:ObjectProperty ;
             rdfs:label "statement"@en ;
             skos:definition "a triple included in this set of changes"@en ;
             rdfs:domain cs:ChangeSet ;
             rdfs:isDefinedBy ns0:schema ;
             rdfs:range rdf:Statement ;
             dct:issued "2006-03-21" .

cs:addition rdf:type owl:ObjectProperty ;
            rdfs:label "addition"@en ;
            skos:definition "a triple to be added to the resource description"@en ;
            rdfs:comment """
      By convention the subject of the triple being added should be the same as the subjectOfChange
    """@en ;
            rdfs:subPropertyOf cs:statement ;
            rdfs:domain cs:ChangeSet ;
            rdfs:isDefinedBy ns0:schema ;
            rdfs:range rdf:Statement ;
            dct:issued "2005-12-14" ;
            skos:changeNote _:arca34ab5 ;
            skos:historyNote _:arca34ab6 ,
                             _:arca34ab7 .

_:arca34ab5 rdf:value "Added definitition and documentation" ;
            dct:date "2006-03-21" ;
            dct:creator "Ian Davis" .

_:arca34ab6 rdf:value "Made owl:ObjectProperty" ;
            dct:date "2006-03-21" ;
            dct:creator "Ian Davis" .

_:arca34ab7 rdf:value "Made a sub-property of statement" ;
            dct:date "2006-03-21" ;
            dct:creator "Ian Davis" .

cs:removal rdf:type owl:ObjectProperty ;
           rdfs:label "removal"@en ;
           skos:definition "a triple to be removed from the resource description"@en ;
           rdfs:comment """
      By convention the subject of the triple being removed should be the same as the subjectOfChange
    """@en ;
           rdfs:subPropertyOf cs:statement ;
           rdfs:domain cs:ChangeSet ;
           rdfs:isDefinedBy ns0:schema ;
           rdfs:range rdf:Statement ;
           dct:issued "2005-12-14" ;
           skos:changeNote _:arca34ab8 ;
           skos:historyNote _:arca34ab9 ,
                            _:arca34ab10 .

_:arca34ab8 rdf:value "Added definitition and documentation" ;
            dct:date "2006-03-21" ;
            dct:creator "Ian Davis" .

_:arca34ab9 rdf:value "Made owl:ObjectProperty" ;
            dct:date "2006-03-21" ;
            dct:creator "Ian Davis" .

_:arca34ab10 rdf:value "Made a sub-property of statement" ;
             dct:date "2006-03-21" ;
             dct:creator "Ian Davis" .

cs:subjectOfChange rdf:type owl:ObjectProperty ;
                   rdfs:label "subjectOfChange"@en ;
                   skos:definition "the resource to which this set of changes applies"@en ;
                   rdfs:domain cs:ChangeSet ;
                   rdfs:isDefinedBy ns0:schema ;
                   rdfs:range rdfs:Resource ;
                   dct:issued "2005-12-14" ;
                   skos:changeNote _:arca34ab11 ;
                   skos:historyNote _:arca34ab12 .

_:arca34ab11 rdf:value "Added definitition and documentation" ;
             dct:date "2006-03-21" ;
             dct:creator "Ian Davis" .

_:arca34ab12 rdf:value "Made owl:ObjectProperty" ;
             dct:date "2006-03-21" ;
             dct:creator "Ian Davis" .

cs:precedingChangeSet rdf:type owl:ObjectProperty ;
                      rdfs:label "precedingChangeSet"@en ;
                      skos:definition "the changeset that immediately precedes this one"@en ;
                      rdfs:comment """
      This property can be used to build a history of changes to a particular resource description. The first
      ChangeSet in the history will have no precedingChangeSet property. Each subsequent ChangeSet added
      to the history references the preceding one resulting in a singly-linked list of changes.  Care must be taken
      not to introduce cycles in the history.
    """@en ,
                                   """
      In systems that assume a closed world, the most recent ChangeSet for a particular resource description 
      can be discovered by looking for the ChangeSet that is not the value of a precedingChangeSet property. 
      Conversely, the earliest ChangeSet is the one that is not the subject of a precedingChangeSet property.
    """@en ;
                      rdfs:domain cs:ChangeSet ;
                      rdfs:isDefinedBy ns0:schema ;
                      rdfs:range cs:ChangeSet ;
                      dct:issued "2005-12-14" ;
                      skos:changeNote _:arca34ab13 ;
                      skos:historyNote _:arca34ab14 .

_:arca34ab13 rdf:value "Added definitition and documentation" ;
             dct:date "2006-03-21" ;
             dct:creator "Ian Davis" .

_:arca34ab14 rdf:value "Made owl:ObjectProperty" ;
             dct:date "2006-03-21" ;
             dct:creator "Ian Davis" .

cs:createdDate rdf:type owl:DatatypeProperty ;
               rdfs:label "createdDate"@en ;
               skos:definition "the date that the changeset was created"@en ;
               rdfs:comment """
      The date should be in W3CDTF format
    """@en ;
               rdfs:domain cs:ChangeSet ;
               rdfs:subPropertyOf dc:date ;
               rdfs:isDefinedBy ns0:schema ;
               dct:issued "2005-12-14" ;
               skos:historyNote _:arca34ab15 .

_:arca34ab15 rdf:value "Made owl:DatatypeProperty" ;
             dct:date "2006-03-21" ;
             dct:creator "Ian Davis" .

cs:changeReason rdf:type owl:DatatypeProperty ;
                rdfs:label "changeReason"@en ;
                skos:definition "a  short, human readable description of the purpose for the changeset"@en ;
                rdfs:domain cs:ChangeSet ;
                rdfs:isDefinedBy ns0:schema ;
                rdfs:range rdfs:Literal ;
                dct:issued "2005-12-14" ;
                skos:historyNote _:arca34ab16 .

_:arca34ab16 rdf:value "Made owl:DatatypeProperty" ;
             dct:date "2006-03-21" ;
             dct:creator "Ian Davis" .

cs:creatorName rdf:type owl:DatatypeProperty ;
               rdfs:label "creatorName"@en ;
               skos:definition "the name of the entity responsible for creating the changeset"@en ;
               rdfs:domain cs:ChangeSet ;
               rdfs:isDefinedBy ns0:schema ;
               rdfs:range rdfs:Literal ;
               dct:issued "2005-12-14" ;
               skos:historyNote _:arca34ab17 .

_:arca34ab17 rdf:value "Made owl:DatatypeProperty" ;
             dct:date "2006-03-21" ;
             dct:creator "Ian Davis" .

cs:ChangeSet rdf:type owl:Class ;
             rdfs:label "ChangeSet"@en ;
             skos:definition "The encapsulation of a delta between two versions of a resource description"@en ;
             rdfs:isDefinedBy ns0:schema ;
             dct:issued "2005-12-14" ;
             skos:changeNote _:arca34ab18 ;
             skos:historyNote _:arca34ab19 ;
             rdfs:subClassOf _:arca34ab20 .

_:arca34ab18 rdf:value "Improved documentation" ;
             dct:date "2006-03-21" ;
             dct:creator "Ian Davis" .

_:arca34ab19 rdf:value "Added property cardinality restrictions" ;
             dct:date "2006-03-21" ;
             dct:creator "Ian Davis" .

_:arca34ab20 rdf:type owl:Class ;
             owl:intersectionOf _:arca34ab22 .

_:arca34ab22 rdf:first _:arca34ab21 ;
             rdf:rest _:arca34ab24 .

_:arca34ab21 rdf:type owl:Restriction ;
             owl:onProperty cs:statement ;
             owl:minCardinality "1"^^xsd:nonNegativeInteger .

_:arca34ab24 rdf:first _:arca34ab23 ;
             rdf:rest _:arca34ab26 .

_:arca34ab23 rdf:type owl:Restriction ;
             owl:onProperty cs:previousChangeSet ;
             owl:maxCardinality "1"^^xsd:nonNegativeInteger .

_:arca34ab26 rdf:first _:arca34ab25 ;
             rdf:rest _:arca34ab28 .

_:arca34ab25 rdf:type owl:Restriction ;
             owl:onProperty cs:subjectOfChange ;
             owl:maxCardinality "1"^^xsd:nonNegativeInteger .

_:arca34ab28 rdf:first _:arca34ab27 ;
             rdf:rest _:arca34ab30 .

_:arca34ab27 rdf:type owl:Restriction ;
             owl:onProperty cs:createdDate ;
             owl:maxCardinality "1"^^xsd:nonNegativeInteger .

_:arca34ab30 rdf:first _:arca34ab29 ;
             rdf:rest _:arca34ab32 .

_:arca34ab29 rdf:type owl:Restriction ;
             owl:onProperty cs:creatorName ;
             owl:maxCardinality "1"^^xsd:nonNegativeInteger .

_:arca34ab32 rdf:first _:arca34ab31 ;
             rdf:rest rdf:nil .

_:arca34ab31 rdf:type owl:Restriction ;
             owl:onProperty cs:changeReason ;
             owl:maxCardinality "1"^^xsd:nonNegativeInteger .