@prefix adms: <http://www.w3.org/ns/adms#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dcatap: <http://data.europa.eu/r5r/> .
@prefix eli: <http://data.europa.eu/eli/ontology#> .
@prefix eush: <https://purl.eu/ns/shacl#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@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 sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

@prefix dcatapnl-sh: <http://modellen.geostandaarden.nl/dcat-ap-nl/id/shape/> .

###########################################
#  dcat:Dataset
###########################################

dcatapnl-sh:DatasetShape a sh:NodeShape;
  sh:name "Dataset"@en;
  sh:targetClass dcat:Dataset;
  sh:property 
    dcatapnl-sh:DatasetShape_accessRights_minCount,
    dcatapnl-sh:DatasetShape_applicableLegislation_nodeKind,
    dcatapnl-sh:DatasetShape_contactPoint_minCount,
    dcatapnl-sh:DatasetShape_contactPoint_maxCount,
    dcatapnl-sh:DatasetShape_creator_minCount,
    dcatapnl-sh:DatasetShape_hvdCategory_nodeKind,
    dcatapnl-sh:DatasetShape_identifier_minCount,
    dcatapnl-sh:DatasetShape_identifier_maxCount,
    dcatapnl-sh:DatasetShape_publisher_minCount,
    dcatapnl-sh:DatasetShape_status_nodeKind,
    dcatapnl-sh:DatasetShape_status_maxCount,
    dcatapnl-sh:DatasetShape_theme_minCount,
    dcatapnl-sh:DatasetShape_version_maxCount;
.

dcatapnl-sh:DatasetShape_accessRights_minCount
  sh:minCount 1;
  sh:name "access rights"@en;
  sh:path dct:accessRights;
  eush:message "Minimally 1 values are expected for access rights"@en 
.

dcatapnl-sh:DatasetShape_applicableLegislation_nodeKind
  sh:name "applicable legislation"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dcatap:applicableLegislation;
  eush:message "The expected value for applicable legislation is a rdfs:Resource (URI or blank node)"@en 
.

dcatapnl-sh:DatasetShape_contactPoint_minCount
  sh:minCount 1;
  sh:name "contact point"@en;
  sh:path dcat:contactPoint;
  eush:message "Minimally 1 values are expected for contact point"@en 
.

dcatapnl-sh:DatasetShape_contactPoint_maxCount
  sh:maxCount 1;
  sh:name "contact point"@en;
  sh:path dcat:contactPoint;
  eush:message "Maximally 1 values are allowed for contact point"@en 
.

dcatapnl-sh:DatasetShape_creator_minCount
  sh:minCount 1;
  sh:name "creator"@en;
  sh:path dct:creator;
  eush:message "Minimally 1 values are expected for creator"@en 
.

dcatapnl-sh:DatasetShape_hvdCategory_nodeKind
  sh:description "The HVD category to which this Dataset belongs."@en;
  sh:name "HVD Category"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dcatap:hvdCategory;
  eush:message "The expected value for HVD Category is a rdfs:Resource (URI or blank node)"@en
.

dcatapnl-sh:DatasetShape_identifier_minCount
  sh:minCount 1;
  sh:name "identifier"@en;
  sh:path dct:identifier;
  eush:message "Minimally 1 values are expected for identifier"@en 
.

dcatapnl-sh:DatasetShape_identifier_maxCount
  sh:maxCount 1;
  sh:name "identifier"@en;
  sh:path dct:identifier;
  eush:message "Maximally 1 values are allowed for identifier"@en 
.

dcatapnl-sh:DatasetShape_publisher_minCount
  sh:minCount 1;
  sh:name "publisher"@en;
  sh:path dct:publisher;
  eush:message "Minimally 1 values are expected for publisher"@en 
.

dcatapnl-sh:DatasetShape_status_nodeKind
  sh:description "The status of the dataset in the context of editorial flow of the dataset and data service descriptions."@en;
  sh:name "status"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path adms:status;
  eush:message "The expected value for status is a rdfs:Resource (URI or blank node)"@en
.

dcatapnl-sh:DatasetShape_status_maxCount
  sh:maxCount 1;
  sh:name "status"@en;
  sh:path adms:status;
  eush:message "Maximally 1 values are allowed for status"@en 
.

dcatapnl-sh:DatasetShape_theme_minCount
  sh:minCount 1;
  sh:name "theme"@en;
  sh:path dcat:theme;
  eush:message "Minimally 1 values are expected for theme"@en 
.

dcatapnl-sh:DatasetShape_version_maxCount
  sh:maxCount 1;
  sh:name "version"@en;
  sh:path dcat:version;
  eush:message "Maximally 1 values are allowed for version"@en 
.


###########################################
#  dcat:Distribution
###########################################

dcatapnl-sh:DistributionShape a sh:NodeShape;
  sh:name "Distribution"@en;
  sh:targetClass dcat:Distribution;
  sh:property
    dcatapnl-sh:DistributionShape_accessService_maxCount,
    dcatapnl-sh:DistributionShape_accessURL_maxCount,
    dcatapnl-sh:DistributionShape_applicableLegislation_nodeKind,
    dcatapnl-sh:DistributionShape_downloadURL_maxCount,
    dcatapnl-sh:DistributionShape_language_maxCount,
    dcatapnl-sh:DistributionShape_license_minCount,
    dcatapnl-sh:DistributionShape_spatialResolutionInMeters_maxCount,
    dcatapnl-sh:DistributionShape_temporalResolution_maxCount
.

dcatapnl-sh:DistributionShape_accessService_maxCount
  sh:maxCount 1;
  sh:name "access service"@en;
  sh:path dcat:accessService;
  eush:message "Maximally 1 values are allowed for access service"@en 
.

dcatapnl-sh:DistributionShape_accessURL_maxCount
  sh:maxCount 1;
  sh:name "access URL"@en;
  sh:path dcat:accessURL;
  eush:message "Maximally 1 values are allowed for access URL"@en 
.

dcatapnl-sh:DistributionShape_applicableLegislation_nodeKind
  sh:name "applicable legislation"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dcatap:applicableLegislation;
  eush:message "The expected value for applicable legislation is a rdfs:Resource (URI or blank node)"@en 
.

dcatapnl-sh:DistributionShape_downloadURL_maxCount
  sh:maxCount 1;
  sh:name "download URL"@en;
  sh:path dcat:downloadURL;
  eush:message "Maximally 1 values are allowed for download URL"@en 
.

dcatapnl-sh:DistributionShape_language_maxCount
  sh:maxCount 1;
  sh:name "language"@en;
  sh:path dct:language;
  eush:message "Maximally 1 values are allowed for language"@en 
.

dcatapnl-sh:DistributionShape_license_minCount
  sh:minCount 1;
  sh:name "licence"@en;
  sh:path dct:license;
  eush:message "Minimally 1 values are expected for license"@en 
.

dcatapnl-sh:DistributionShape_spatialResolutionInMeters_maxCount
  sh:maxCount 1;
  sh:name "spatial resolution"@en;
  sh:path dcat:spatialResolutionInMeters;
  eush:message "Maximally 1 values are allowed for spatial resolution"@en 
.

dcatapnl-sh:DistributionShape_temporalResolution_maxCount
  sh:maxCount 1;
  sh:name "temporal resolution"@en;
  sh:path dcat:temporalResolution;
  eush:message "Maximally 1 values are allowed for temporal resolution"@en 
.


###########################################
#  dcat:DataService
###########################################

dcatapnl-sh:DataServiceShape a sh:NodeShape;
  sh:name "DataService"@en;
  sh:targetClass dcat:DataService;
  sh:property
    dcatapnl-sh:DataServiceShape_accessRights_minCount,
    dcatapnl-sh:DataServiceShape_applicableLegislation_nodeKind,
    dcatapnl-sh:DataServiceShape_applicationProfile_nodeKind,
    dcatapnl-sh:DataServiceShape_contactPoint_minCount,
    dcatapnl-sh:DataServiceShape_contactPoint_maxCount,
    dcatapnl-sh:DataServiceShape_creator_nodeKind,
    dcatapnl-sh:DataServiceShape_creator_maxCount,
    dcatapnl-sh:DataServiceShape_description_minCount,
    dcatapnl-sh:DataServiceShape_documentation_nodeKind,
    dcatapnl-sh:DataServiceShape_endpointDescription_minCount,
    dcatapnl-sh:DataServiceShape_endpointDescription_maxCount,
    dcatapnl-sh:DataServiceShape_endpointURL_maxCount,
    dcatapnl-sh:DataServiceShape_hvdCategory_nodeKind,
    dcatapnl-sh:DataServiceShape_identifier_nodeKind,
    dcatapnl-sh:DataServiceShape_identifier_minCount,
    dcatapnl-sh:DataServiceShape_identifier_maxCount,
    dcatapnl-sh:DataServiceShape_keyword_nodeKind,
    dcatapnl-sh:DataServiceShape_landingPage_nodeKind,
    dcatapnl-sh:DataServiceShape_language_nodeKind,
    dcatapnl-sh:DataServiceShape_language_nodeKind,
    dcatapnl-sh:DataServiceShape_license_minCount,
    dcatapnl-sh:DataServiceShape_modified_nodeKind,
    dcatapnl-sh:DataServiceShape_modified_node,
    dcatapnl-sh:DataServiceShape_modified_maxCount,
    dcatapnl-sh:DataServiceShape_otherIdentifier_nodeKind,
    dcatapnl-sh:DataServiceShape_publisher_nodeKind,
    dcatapnl-sh:DataServiceShape_publisher_minCount,
    dcatapnl-sh:DataServiceShape_publisher_maxCount,
    dcatapnl-sh:DataServiceShape_rights_nodeKind,
    dcatapnl-sh:DataServiceShape_theme_nodeKind,
    dcatapnl-sh:DataServiceShape_theme_minCount
.

dcatapnl-sh:DataServiceShape_accessRights_minCount
  sh:minCount 1;
  sh:name "access rights"@en;
  sh:path dct:accessRights;
  eush:message "Minimally 1 values are expected for access rights"@en 
.

dcatapnl-sh:DataServiceShape_applicableLegislation_nodeKind
  sh:name "applicable legislation"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dcatap:applicableLegislation;
  eush:message "The expected value for applicable legislation is a rdfs:Resource (URI or blank node)"@en 
.

dcatapnl-sh:DataServiceShape_applicationProfile_nodeKind
  sh:name "conforms to"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dct:conformsTo;
  eush:message "The expected value for application profile is a rdfs:Resource (URI or blank node)"@en 
.

dcatapnl-sh:DataServiceShape_contactPoint_minCount
  sh:minCount 1;
  sh:name "contact point"@en;
  sh:path dcat:contactPoint;
  eush:message "Minimally 1 values are expected for contact point"@en 
.

dcatapnl-sh:DataServiceShape_contactPoint_maxCount
  sh:maxCount 1;
  sh:name "contact point"@en;
  sh:path dcat:contactPoint;
  eush:message "Maximally 1 values are allowed for contact point"@en 
.

dcatapnl-sh:DataServiceShape_creator_nodeKind
  sh:name "creator"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dct:creator;
  eush:message "The expected value for creator is a rdfs:Resource (URI or blank node)"@en 
.

dcatapnl-sh:DataServiceShape_creator_maxCount
  sh:maxCount 1;
  sh:name "creator"@en;
  sh:path dct:creator;
  eush:message "Maximally 1 values are allowed for creator"@en 
.

dcatapnl-sh:DataServiceShape_description_minCount
  sh:minCount 1;
  sh:name "description"@en;
  sh:path dct:description;
  eush:message "Minimally 1 values are expected for description"@en 
.

dcatapnl-sh:DataServiceShape_documentation_nodeKind
  sh:name "documentation"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path foaf:page;
  eush:message "The expected value for documentation is a rdfs:Resource (URI or blank node)"@en 
.

dcatapnl-sh:DataServiceShape_endpointDescription_minCount
  sh:minCount 1;
  sh:name "endpoint description"@en;
  sh:path dcat:endpointDescription;
  eush:message "Minimally 1 values are expected for endpoint description"@en 
.

dcatapnl-sh:DataServiceShape_endpointDescription_maxCount
  sh:maxCount 1;
  sh:name "endpoint description"@en;
  sh:path dcat:endpointDescription;
  eush:message "Maximally 1 values are allowed for endpoint description"@en 
.

dcatapnl-sh:DataServiceShape_endpointURL_maxCount
  sh:maxCount 1;
  sh:name "endpoint URL"@en;
  sh:path dcat:endpointURL;
  eush:message "Maximally 1 values are allowed for endpoint URL"@en 
.

dcatapnl-sh:DataServiceShape_hvdCategory_nodeKind
  sh:description "The HVD category to which this Data Service belongs."@en;
  sh:name "HVD Category"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dcatap:hvdCategory;
  eush:message "The expected value for HVD Category is a rdfs:Resource (URI or blank node)"@en
.

dcatapnl-sh:DataServiceShape_identifier_nodeKind
  sh:name "identifier"@en;
  sh:nodeKind sh:Literal;
  sh:path dct:identifier;
  eush:message "The expected value for identifier is a Literal"@en 
.

dcatapnl-sh:DataServiceShape_identifier_minCount
  sh:minCount 1;
  sh:name "identifier"@en;
  sh:path dct:identifier;
  eush:message "Minimally 1 values are expected for identifier"@en 
.

dcatapnl-sh:DataServiceShape_identifier_maxCount
  sh:maxCount 1;
  sh:name "identifier"@en;
  sh:path dct:identifier;
  eush:message "Maximally 1 values are allowed for identifier"@en 
.

dcatapnl-sh:DataServiceShape_keyword_nodeKind
  sh:name "keyword"@en;
  sh:nodeKind sh:Literal;
  sh:path dcat:keyword;
  eush:message "The expected value for language is a rdfs:Resource (URI or blank node)"@en 
.

dcatapnl-sh:DataServiceShape_landingPage_nodeKind
  sh:name "landing page"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dcat:landingPage;
  eush:message "The expected value for landing page is a Literal"@en 
.

dcatapnl-sh:DataServiceShape_language_nodeKind
  sh:name "language"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dct:language;
  eush:message "The expected value for language is a Literal"@en 
.

dcatapnl-sh:DataServiceShape_license_minCount
  sh:minCount 1;
  sh:name "licence"@en;
  sh:path dct:license;
  eush:message "Minimally 1 values are expected for license"@en 
.

dcatapnl-sh:DataServiceShape_modified_nodeKind
  sh:name "modification date"@en;
  sh:nodeKind sh:Literal;
  sh:path dct:modified;
  eush:message "The expected value for modification date is a Literal"@en 
.

dcatapnl-sh:DataServiceShape_modified_node
  sh:name "modification date"@en;
  sh:node dcatapnl-sh:TemporalLiteralShape;
  sh:path dct:modified;
  eush:message "The expected value for modification date is a Literal"@en 
.

dcatapnl-sh:DataServiceShape_modified_maxCount
  sh:maxCount 1;
  sh:name "modification date"@en;
  sh:path dct:modified;
  eush:message "Maximally 1 values are allowed for modification date"@en 
.

dcatapnl-sh:DataServiceShape_otherIdentifier_nodeKind
  sh:name "other identifier"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path adms:identifier;
  eush:message "The expected value for other identifier is a rdfs:Resource (URI or blank node)"@en 
.

dcatapnl-sh:DataServiceShape_publisher_nodeKind
  sh:name "publisher"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dct:publisher;
  eush:message "The expected value for publisher is a rdfs:Resource (URI or blank node)"@en 
.

dcatapnl-sh:DataServiceShape_publisher_minCount
  sh:minCount 1;
  sh:name "publisher"@en;
  sh:path dct:publisher;
  eush:message "Minimally 1 values are expected for publisher"@en 
.

dcatapnl-sh:DataServiceShape_publisher_maxCount
  sh:maxCount 1;
  sh:name "publisher"@en;
  sh:path dct:publisher;
  eush:message "Maximally 1 values are allowed for publisher"@en 
.

dcatapnl-sh:DataServiceShape_rights_nodeKind
  sh:description "A statement that specifies rights associated with the Data Service."@en;
  sh:name "rights"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dct:rights;
  eush:message "The expected value for rights is a rdfs:Resource (URI or blank node)"@en 
.

dcatapnl-sh:DataServiceShape_theme_nodeKind
  sh:description "A category of the Data Service."@en;
  sh:name "theme"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dcat:theme;
  eush:message "The expected value for theme is a rdfs:Resource (URI or blank node)"@en 
.

dcatapnl-sh:DataServiceShape_theme_minCount
  sh:minCount 1;
  sh:name "theme"@en;
  sh:path dcat:theme;
  eush:message "Minimally 1 values are expected for theme"@en 
.


###########################################
#  dcat:Catalog
###########################################

dcatapnl-sh:CatalogShape a sh:NodeShape;
  sh:name "Catalog"@en;
  sh:targetClass dcat:Catalog;
  sh:property
    dcatapnl-sh:CatalogShape_applicableLegislation_nodeKind,
    dcatapnl-sh:CatalogShape_contactPoint_nodeKind,
    dcatapnl-sh:CatalogShape_contactPoint_minCount,
    dcatapnl-sh:CatalogShape_contactPoint_maxCount,
    dcatapnl-sh:CatalogShape_dataset_minCount
.

dcatapnl-sh:CatalogShape_applicableLegislation_nodeKind
  sh:name "applicable legislation"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dcatap:applicableLegislation;
  eush:message "The expected value for applicable legislation is a rdfs:Resource (URI or blank node)"@en 
.

dcatapnl-sh:CatalogShape_contactPoint_nodeKind
  sh:description "Contact information that can be used for sending comments about the Catalogue."@en;
  sh:name "contact point"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dcat:contactPoint;
  eush:message "The expected value for theme is a rdfs:Resource (URI or blank node)"@en 
.

dcatapnl-sh:CatalogShape_contactPoint_minCount
  sh:minCount 1;
  sh:name "contact point"@en;
  sh:path dcat:contactPoint;
  eush:message "Minimally 1 values are expected for contact point"@en 
.

dcatapnl-sh:CatalogShape_contactPoint_maxCount
  sh:maxCount 1;
  sh:name "contact point"@en;
  sh:path dcat:contactPoint;
  eush:message "Maximally 1 values are allowed for contact point"@en 
.

dcatapnl-sh:CatalogShape_dataset_minCount
  sh:minCount 1;
  sh:name "dataset"@en;
  sh:path dcat:dataset;
  eush:message "Minimally 1 values are expected for dataset"@en 
.


###########################################
#  dcat:DatasetSeries
###########################################

dcatapnl-sh:DatasetSeriesShape a sh:NodeShape;
  sh:name "DatasetSeries"@en;
  sh:targetClass dcat:DatasetSeries;
  sh:property
    dcatapnl-sh:DatasetSeriesShape_applicableLegislation_nodeKind
.

dcatapnl-sh:DatasetSeriesShape_applicableLegislation_nodeKind
  sh:name "applicable legislation"@en;
  sh:nodeKind sh:BlankNodeOrIRI;
  sh:path dcatap:applicableLegislation;
  eush:message "The expected value for applicable legislation is a rdfs:Resource (URI or blank node)"@en 
.


###########################################
#  dcat:CatalogRecord
###########################################

dcatapnl-sh:CatalogRecordShape a sh:NodeShape;
  sh:name "CatalogRecord"@en;
  sh:targetClass dcat:CatalogRecord;
  sh:property
    dcatapnl-sh:CatalogRecordShape_language_minCount
.


dcatapnl-sh:CatalogRecordShape_language_minCount
  sh:minCount 1;
  sh:name "language"@en;
  sh:path dct:language;
  eush:message "Minimally 1 values are expected for language"@en 
.



###########################################
#  Temporal Literal
###########################################

dcatapnl-sh:TemporalLiteralShape a sh:NodeShape ;
  sh:name "Temporal Literal"@en;
  sh:xone (
    [ sh:datatype xsd:gYear ]
    [ sh:datatype xsd:gYearMonth ]
    [ sh:datatype xsd:date ]
    [ sh:datatype xsd:dateTime ]
  ) ;
  eush:message "The value of a Temporal Literal should have a temporal datatype."@en ;
  rdfs:seeAlso <https://semiceu.github.io/DCAT-AP/releases/3.0.0/#TemporalLiteral> ;
.
