@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <http://data.europa.eu/r5r#> .
@prefix adms: <http://www.w3.org/ns/adms#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix lcon: <http://www.w3.org/ns/locn#> .
@prefix org: <http://www.w3.org/ns/org#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix odrl: <http://www.w3.org/ns/odrl/2/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix spdx: <http://spdx.org/rdf/terms#> .
@prefix time: <http://www.w3.org/2006/time#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dcatap: <http://data.europa.eu/r5r/> .

#-------------------------------------------------------------------------
# The shapes in this file cover all URI changes that require attention
# by the catalogue owner.
#
# deprecated by the transition from version 1.x to 2.x
# 
#-------------------------------------------------------------------------

:PeriodOfTimeDeprecation_Shape
    a sh:NodeShape ;
    rdfs:label "PeriodOfTime Deprecation properties"@en ;
    sh:property [
        sh:path schema:endDate ;
        sh:severity sh:Warning ;
	sh:message "replace property schema:endDate with dcat:endDate"@en
    ], [
        sh:path schema:startDate ;
        sh:severity sh:Warning ;
	sh:message "replace property schema:startDate with dcat:startDate"@en
    ] ;
    sh:targetClass dct:PeriodOfTime .


#-------------------------------------------------------------------------
# The shapes in this file cover all URI changes that require attention
# by the catalogue owner.
#
# deprecated by the transition from version 1.x to 2.x
# 
#-------------------------------------------------------------------------


:DatasetDeprecation_Shape
    a sh:NodeShape ;
    rdfs:label "Dataset Deprecation properties"@en ;
    sh:property [
       sh:path dct:hasVersion ;
        sh:severity sh:Warning ;
       sh:message  "replace property dct:hasVersion with dcat:hasVersion"@en

    ], [
       sh:path dct:isVersionOf ;
        sh:severity sh:Warning ;
       sh:message "replace dct:isVersionOf with dcat:isVersionOf"@en
    ], [
       sh:path owl:versionInfo ;
        sh:severity sh:Warning ;
       sh:message "replace owl:versionInfo with dcat:version"@en
    ];
    sh:targetClass dcat:Dataset .


#-------------------------------------------------------------------------
# The shapes in this file cover all URI changes that require attention
# by the catalogue owner.
#
# deprecated by the transition from version 2.x to 3.x
# 
#-------------------------------------------------------------------------


:DatasetInverseProperties_Shape
    a sh:NodeShape ;
    rdfs:label "Dataset Deprecation properties"@en ;
    sh:property [
       sh:path dcat:isVersionOf ;
       sh:severity sh:Warning ;
       sh:message "dcat:isVersionOf is an inverse property and should only be used if dcat:hasVersion is present."@en
    ];
    sh:targetClass dcat:Dataset .



<http://data.europa.eu/r5r/codelist_imports>
  rdf:type owl:Ontology ;
  owl:imports <https://github.com/SEMICeu/ADMS-AP/raw/master/purl.org/ADMS_SKOS_v1.00.rdf> .


:StatusRestrictionADMS
    a sh:NodeShape ;
    rdfs:comment "Status restriction" ;
    rdfs:label "Status restriction" ;
    sh:property [
        sh:class skos:ConceptScheme ;
        sh:hasValue <http://purl.org/adms/status/1.0> ;
        sh:minCount 1 ;
        sh:nodeKind sh:IRI ;
        sh:path skos:inScheme
    ] .


:Distribution_ShapeCV
    a sh:NodeShape ;
    sh:property [
        sh:node :StatusRestrictionADMS ;
        sh:nodeKind sh:IRI ;
        sh:path adms:status ;
	sh:description "The codelist of adms:status has changed from DCAT-AP 2.1 to DCAT-AP 3.0.0" ; 
        sh:severity sh:Warning 
    ] ;
    sh:targetClass dcat:Distribution.
