Data:Protocol

From DAAP
Jump to navigation Jump to search
@prefix daapp: <http://daap.eu/wiki/Data:Project#> .
@prefix daapo: <http://daap.eu/wiki/Data:Organization#> .

@prefix daap: <http://daap.eu/wiki/> .
@prefix daapProp: <http://daap.eu/wiki/Property:> .
@prefix device: <http://daap.eu/ontology/2015/device#> .
@prefix maintenance: <http://daap.eu/ontology/2015/maintenance#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix wd: <http://www.wikidata.org/entity/> .
@prefix world: <http://daap.eu/ontology/2015/world#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

daap:Protocol
  rdf:type owl:Class ;
  rdf:type sh:Shape ;
  rdfs:label "Protocol"@en ;
  rdfs:label "Protocole"@fr ;
  rdfs:seeAlso <https://www.wikidata.org/wiki/Q367158> ;
  rdfs:subClassOf owl:Thing ;
  sh:constraint [
      sh:message "Check if the fields exist (label (en) and website)"^^xsd:string ;
      sh:predicate daap:checkProtocol ;
      sh:sparql """prefix daap: <http://daap.eu/wiki/> 
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

select ?this (?this AS ?subject) (?this AS ?object)
where {
 ?this
  rdf:type daap:Project .
         OPTIONAL {
   ?this rdfs:label ?label .

 FILTER langMatches( lang(?label), \"EN\" )  }        
 FILTER (
! bound(?label) )
} """ ;
    ] ;
  sh:property [
      rdfs:label "check by"^^xsd:string ;
      sh:maxCount 1 ;
      sh:minCount 1 ;
      sh:nodeKind sh:IRI ;
      sh:predicate <http://daap.eu/wiki/Help:checkBy> ;
      sh:valueClass daap:Individual ;
    ] ;
  sh:property [
      rdfs:label "contact"^^xsd:string ;
      sh:minCount 1 ;
      sh:nodeKind sh:IRI ;
      sh:predicate <http://daap.eu/wiki/Property:contact> ;
      sh:valueClass daap:Individual ;
    ] ;
  sh:property [
      rdfs:label "item"^^xsd:string ;
      sh:nodeKind sh:IRI ;
      sh:predicate <http://daap.eu/wiki/Property:item> ;
      sh:valueClass <http://wikiba.se/ontology#Item> ;
    ] ;
  sh:property [
      rdfs:label "see also website"^^xsd:string ;
      sh:maxCount 1 ;
      sh:minCount 1 ;
      sh:nodeKind sh:IRI ;
      sh:predicate rdfs:seeAlso ;
      sh:valueClass rdfs:Resource ;
    ] ;
  sh:property [
      sh:class daap:Campaign ;
      sh:minCount 1 ;
      sh:name "campaign"^^xsd:string ;
      sh:nodeKind sh:IRI ;
      sh:predicate <http://daap.eu/wiki/Property:campaign> ;
    ] ;
.