PREFIX : <https://data.idnau.org/pid/cp/validator/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX id: <http://id.loc.gov/vocabulary/identifiers/>
PREFIX ont: <https://data.idnau.org/pid/cp/validator>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <https://schema.org/>
PREFIX sh: <http://www.w3.org/ns/shacl#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX time: <http://www.w3.org/2006/time#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

ont:
    a owl:Ontology ;
    owl:versionIRI <https://data.idnau.org/pid/cp/1.0.0> ;
    owl:versionInfo "1.0.1" ;
    skos:historyNote "This validator for the IDN Catalogue Profile was made within the IDN's ID Catalogue project 2021 - 2022."@en ;
    schema:codeRepository "https://github.com/idn-au/idn-catalogue-profile/"^^xsd:anyURI ;
    schema:copyrightHolder <https://orcid.org/0000-0002-8742-7730> ;
    schema:copyrightNotice "(c) Indigenous Data Network, 2026" ;
    schema:copyrightYear "2026"^^xsd:gYear ;
    schema:creator <https://orcid.org/0000-0002-8742-7730> ;
    schema:dateCreated "2022-07-18"^^xsd:date ;
    schema:dateIssued "2022-07-19"^^xsd:date ;
    schema:dateModified "2026-08-10"^^xsd:date ;
    schema:description "A SHACL validator IDN Catalogue Profile."@en ;
    schema:license <http://purl.org/NET/rdflicense/cc-by4.0> ;
    schema:name "IDN CP Validator"@en ;
    schema:publisher <https://linked.data.gov.au/org/idn> ;
.

:agent
    a sh:NodeShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "IDN shape for Agent" ;
    schema:description "IDN shape for Agent" ;
    sh:property
        :agent-as-org-or-person ,
        :agent-description ,
        :agent-email ,
        :agent-identifier ,
        :agent-name ,
        :agent-url ;
    sh:targetClass prov:Agent ;
.

:attribution
    a sh:NodeShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "IDN shape for Attribution" ;
    schema:description "IDN shape for Attribution" ;
    sh:property
        :attribution-agent ,
        :attribution-roleCode ;
    sh:targetClass prov:Attribution ;
.

:catalog
    a sh:NodeShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "IDN shape for Catalog" ;
    schema:description "IDN shape for Catalog" ;
    sh:property
        :catalog-hasPart ,
        :resource-created ,
        :resource-description ,
        :resource-direct-roles ,
        :resource-identifier ,
        :resource-modified ,
        :resource-name ;
    sh:targetClass schema:DataCatalog ;
.

:concept
    a sh:NodeShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "IDN shape for Concept" ;
    schema:description "This profile implements no shapes for Concept but inherits those of the VocPub Profile of SKOS" ;
    sh:targetClass skos:Concept ;
.

:conceptScheme
    a sh:NodeShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "IDN shape for ConceptScheme" ;
    schema:description "This profile implements no shapes for ConceptScheme but inherits those of the VocPub Profile of SKOS" ;
    sh:targetClass skos:ConceptScheme ;
.

:dataset
    a sh:NodeShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "IDN shape for Dataset" ;
    schema:description "IDN shape for Dataset" ;
    sh:property
        :resource-additionalType ,
        :resource-created ,
        :resource-description ,
        :resource-direct-roles ,
        :resource-hasPart ,
        :resource-identifier ,
        :resource-modified ,
        :resource-name ;
    sh:targetClass schema:Dataset ;
.

:organization
    a sh:NodeShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "IDN shape for Organization" ;
    schema:description "IDN shape for Organization" ;
    sh:property
        :agent-description ,
        :agent-identifier ,
        :agent-name ,
        :organization-url ;
    sh:targetClass schema:Organization ;
.

:person
    a sh:NodeShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "IDN shape for Person" ;
    schema:description "IDN shape for Person" ;
    sh:property
        :agent-description ,
        :agent-identifier ,
        :agent-name ,
        :person-email ;
    sh:targetClass schema:Person ;
.

:resource
    a sh:NodeShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "IDN shape for catalogued resource" ;
    schema:description "IDN shape for catalogued resource" ;
    sh:or (

        [
            sh:class schema:DataCatalog ;
            sh:maxCount 1 ;
            sh:path
                [
                    sh:inversePath schema:hasPart ;
                ] ;
        ]

        [
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:path schema:isPartOf ;
        ]
    ) ;
    sh:property
        :resource-additionalType ,
        :resource-created ,
        :resource-description ,
        :resource-direct-roles ,
        :resource-identifier ,
        :resource-modified ,
        :resource-name ;
    sh:targetClass schema:CreativeWork ;
.

:agent-as-org-or-person
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Agent as Org or Person" ;
    sh:maxCount 1 ;
    sh:message "Req AG1: Each Agent instance MUST be either an schema:Organization or a schema:Person instance." ;
    sh:minCount 1 ;
    sh:or (

        [
            sh:class schema:Organization ;
        ]

        [
            sh:class schema:Person ;
        ]
    ) ;
    sh:path rdf:type ;
.

:agent-email
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Person email" ;
    sh:datatype xsd:anyURI ;
    sh:message "Req AG2: Each Agent instance MUST be described with at least the schema:name property and, if a schema:Organization, also a schema:url property with a xsd:anyURI value. An Agent that is a schema:Person SHOULD be described with a schema:email property with a xsd:anyURI value." ;
    sh:path schema:email ;
.

:agent-url
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Agent URL" ;
    sh:datatype xsd:anyURI ;
    sh:message "Req AG2: Each Agent instance MUST be described with at least the schema:name property and, if a schema:Organization, also a schema:url property with a xsd:anyURI value. An Agent that is a schema:Person SHOULD be described with a schema:email property with a xsd:anyURI value." ;
    sh:path schema:url ;
.

:attribution-agent
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Attribution Agent" ;
    sh:maxCount 1 ;
    sh:message "Req A1: Each Attribution instance MUST indicate an Agent instance with the property schema:agent." ;
    sh:minCount 1 ;
    sh:or (

        [
            sh:class schema:Organization ;
        ]

        [
            sh:class schema:Person ;
        ]
    ) ;
    sh:path schema:agent ;
.

:attribution-roleCode
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Attribution Role" ;
    sh:class skos:Concept ;
    sh:message "Req A1: Each Attribution instance MUST indicate a role for the Agent, as a skos:Concept, using either the schema:roleName or prov:hadRole property." ;
    sh:minCount 1 ;
    sh:path [
        sh:alternativePath (
            schema:roleName
            prov:hadRole
        )
    ] ;
.

:catalog-hasPart
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Catalogue Parts" ;
    sh:message "Req C2: Each Catalog instance MUST contain at least one Resource indicated by the hasPart property." ;
    sh:minCount 1 ;
    sh:or (

        [
            sh:class schema:CreativeWork ;
        ]

        [
            sh:class schema:Dataset ;
        ]
    ) ;
    sh:path schema:hasPart ;
.

:organization-url
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Organization URL" ;
    sh:datatype xsd:anyURI ;
    sh:maxCount 1 ;
    sh:message "Req AG2: (organization-url) Each Agent instance MUST be described with at least the schema:name property and, if a schema:Organization, also a schema:url property with a xsd:anyURI value. An Agent that is a schema:Person SHOULD be described with a schema:email property with a xsd:anyURI value." ;
    sh:minCount 1 ;
    sh:path schema:url ;
.

:person-email
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Person email" ;
    sh:datatype xsd:anyURI ;
    sh:maxCount 1 ;
    sh:message "Req AG2: (person-email) Each Agent instance MUST be described with at least the schema:name property and, if a schema:Organization, also a schema:url property with a xsd:anyURI value. An Agent that is a schema:Person SHOULD be described with a schema:email property with a xsd:anyURI value." ;
    sh:path schema:email ;
.

:resource-hasPart
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Resource hasPart" ;
    sh:class schema:DataCatalog ;
    sh:maxCount 1 ;
    sh:message "Req R5: Each Resource instance, if it is not a Catalog instance MUST, and if it is a Catalog instance MAY, indicate that it is within at least one Catalog instance with an in-bound hasPart property from a Catalog instance." ;
    sh:path
        [
            sh:inversePath schema:hasPart ;
        ] ;
.

<https://kurrawong.ai>
    a schema:Organization ;
    schema:description "KurrawongAI is a small, Artificial Intelligence, company in Australia specialising in Knowledge Graphs." ;
    schema:name "KurrawongAI" ;
    schema:url "https://kurrawong.ai"^^xsd:anyURI ;
.

<https://linked.data.gov.au/org/idn>
    a schema:Organization ;
    schema:description "The IDN is within the University of Melbourne. It was established in 2018 to support and coordinate the governance of Indigenous data for Aboriginal and Torres Strait Islander peoples and empower Aboriginal and Torres Strait Islander communities to decide their own local data priorities." ;
    schema:name "Indigenous Data Network" ;
    schema:url "https://mspgh.unimelb.edu.au/centres-institutes/centre-for-health-equity/research-group/indigenous-data-network"^^xsd:anyURI ;
.

:resource-additionalType
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Nothing to test" ;
    schema:description "Nothing to test" ;
    sh:path schema:additionalType ;
.

<https://orcid.org/0000-0002-8742-7730>
    a schema:Person ;
    schema:affiliation <https://kurrawong.ai> ;
    schema:email "nick@kurrawong.ai"^^xsd:anyURI ;
    schema:name "Nicholas J. Car"@en ;
.

:agent-description
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Agent description" ;
    sh:maxCount 1 ;
    sh:message "Req AG3: Each Agent instance SHOULD be described with a schema:description property and, if the Agent has them, identifiers for it should be indicated with schema:identifier with xsd:anyURI or xsd:token values." ;
    sh:or (

        [
            sh:datatype xsd:string ;
        ]

        [
            sh:datatype rdf:langString ;
        ]
    ) ;
    sh:path schema:description ;
.

:agent-identifier
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Agent identifier" ;
    sh:message "Req AG3: Each Agent instance SHOULD be described with a schema:description property and, if the Agent has them, identifiers for it should be indicated with schema:identifier with either xsd:anyURI, xsd:token or a datatype from the Library of Congress Standard Identifiers vocabulary." ;
    sh:or  (

        [
            sh:datatype xsd:token ;
        ]

        [
            sh:datatype xsd:anyURI ;
        ]
    ) , (

        [
            sh:datatype xsd:string ;
        ]

        [
            sh:datatype rdf:langString ;
        ]

        [
            sh:datatype id:orcid ;
        ]

        [
            sh:datatype id:ror ;
        ]

        [
            sh:datatype id:ausbn ;
        ]

        [
            sh:datatype id:auscn ;
        ]

        [
            sh:datatype id:ausrn ;
        ]

        [
            sh:datatype id:viaf ;
        ]
    ) ;
    sh:path schema:identifier ;
.

:agent-name
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Agent name" ;
    sh:maxCount 1 ;
    sh:message "Req AG2: Each Agent instance MUST be described with at least the schema:name property and, if a schema:Organization, also a schema:url property with a xsd:anyURI value. An Agent that is a schema:Person SHOULD be described with a schema:email property with a xsd:anyURI value." ;
    sh:minCount 1 ;
    sh:or (

        [
            sh:datatype xsd:string ;
        ]

        [
            sh:datatype rdf:langString ;
        ]
    ) ;
    sh:path schema:name ;
.

:resource-created
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Catalog basic resource metadata" ;
    sh:maxCount 1 ;
    sh:message "Req R2: Each Resource instance MUST provide basic Resource metadata so that exactly one of each of the following properties is required with range value as per Resource requirements: name, description, created & modified. The particular validator violated here is for created. Req R3: Allowed Semantic Web date/time properties for created & modified properties are xsd:date, xsd:dateTime, xsd:dateTimeStamp, time:Interval" ;
    sh:minCount 1 ;
    sh:or (

        [
            sh:datatype xsd:dateTime ;
        ]

        [
            sh:datatype xsd:date ;
        ]

        [
            sh:datatype xsd:dateTimeStamp ;
        ]

        [
            sh:datatype xsd:gYear ;
        ]

        [
            sh:datatype time:Instant ;
        ]
    ) ;
    sh:path schema:dateCreated ;
.

:resource-description
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Catalog basic resource metadata" ;
    sh:maxCount 1 ;
    sh:message "Req R2: Each Resource instance MUST provide basic Resource metadata so that exactly one of each of the following properties is required with range value as per Resource requirements: name, description, created & modified. The particular validator violated here is for description." ;
    sh:minCount 1 ;
    sh:or (

        [
            sh:datatype xsd:string ;
        ]

        [
            sh:datatype rdf:langString ;
        ]
    ) ;
    sh:path schema:description ;
.

:resource-direct-roles
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Not direct Agent roles" ;
    sh:maxCount 0 ;
    sh:message "Req R4: Each Resource instance MUST NOT indicate Agent roles with direct properties other than publisher and creator and MUST instead indicate them with PROV qualified attribution pattern with each prov:Attribution indicated with the property prov:qualifiedAttribution." ;
    sh:path
        [
            sh:alternativePath (
                schema:audienceType
                schema:contactPoint
                schema:contributor
                schema:copyrightHolder
            ) ;
        ] ;
.

:resource-identifier
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Resource persistent identifier" ;
    sh:message "Req R1: Each Resource instance SHOULD indicate a persistent identifier to be used to gain access to its point-of-truth metadata. The PID SHOULD be used as the Dataset instance's IRI, if it is an HTTP/HTTPS IRI, or else it SHOULD be quoted as a literal value, indicated with the property schema:identifier of datatype xsd:token." ;
    sh:path schema:identifier ;
    sh:or (

        [
            sh:nodeKind sh:IRI ;
        ]
        [
            sh:datatype xsd:token ;
        ]
    )
.

:resource-modified
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Catalog basic resource metadata" ;
    sh:maxCount 1 ;
    sh:message "Req R2: Each Resource instance MUST provide basic Resource metadata so that exactly one of each of the following properties is required with range value as per Resource requirements: name, description, created & modified. The particular validator violated here is for modified. Req R3: Allowed Semantic Web date/time properties for created & modified properties are xsd:date, xsd:dateTime, xsd:dateTimeStamp, time:Interval" ;
    sh:minCount 1 ;
    sh:or (

        [
            sh:datatype xsd:dateTime ;
        ]

        [
            sh:datatype xsd:date ;
        ]

        [
            sh:datatype xsd:dateTimeStamp ;
        ]

        [
            sh:datatype xsd:gYear ;
        ]

        [
            sh:datatype time:Instant ;
        ]
    ) ;
    sh:path schema:dateModified ;
.

:resource-name
    a sh:PropertyShape ;
    rdfs:isDefinedBy ont: ;
    schema:name "Catalog basic resource metadata" ;
    sh:maxCount 1 ;
    sh:message "Req R2: Each Resource instance MUST provide basic Resource metadata so that exactly one of each of the following properties is required with range value as per Resource requirements: name, description, created & modified. The particular validator violated here is for name." ;
    sh:minCount 1 ;
    sh:or (
        
        [
            sh:datatype xsd:string ;
        ]
        
        [
            sh:datatype rdf:langString ;
        ]
    ) ;
    sh:path schema:name ;
.
