@prefix :        <https://dataeuropa.gitlab.io/data-provider-manual/#> .
@prefix schema:  <https://schema.org/> .
@prefix prov:    <http://www.w3.org/ns/prov#> .
@prefix skos:    <http://www.w3.org/2004/02/skos/core#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix foaf:    <http://xmlns.com/foaf/0.1/> .
@prefix dbr:     <http://dbpedia.org/resource/> .
@prefix dc:      <http://purl.org/dc/terms/> .
@prefix leg:     <http://data.europa.eu/eli/ontology#> .

# ─── Portal Document ────────────────────────────────────────────────────────
:manual a schema:TechArticle ;
    schema:name "Data Provider Manual — European Data Portal" ;
    schema:url <https://dataeuropa.gitlab.io/data-provider-manual/> ;
    schema:publisher :publicationsOffice ;
    schema:about :edp, :openData, :dcatAp, :euroOpenDataSpace ;
    schema:description "Official documentation for data providers on the European Data Portal (data.europa.eu), covering portal architecture, DCAT-AP metadata standards, FAIR principles, and the EU open data legal framework." ;
    schema:keywords "open data", "DCAT-AP", "FAIR", "European Data Portal", "metadata", "public sector information" ;
    prov:wasGeneratedBy :kgGeneratorSkill .

# ─── Organizations ──────────────────────────────────────────────────────────
:edp a schema:Organization, foaf:Organization ;
    schema:name "European Data Portal (data.europa.eu)" ;
    schema:url <https://data.europa.eu/> ;
    schema:description "The EU's central point of access to open data from international, EU, national, regional, local and geodata portals. Consolidates the former European Data Portal and EU Open Data Portal since 2021." ;
    schema:foundingDate "2015"^^xsd:gYear ;
    schema:location :europeanUnion ;
    schema:memberOf :publicationsOffice ;
    owl:sameAs dbr:European_Data_Portal ;
    rdfs:label "European Data Portal" .

:publicationsOffice a schema:Organization, foaf:Organization ;
    schema:name "Publications Office of the European Union (OP)" ;
    schema:url <https://op.europa.eu/> ;
    schema:description "Official provider of publishing services to all EU institutions, bodies, and agencies; manages the European Data Portal operationally." ;
    schema:parentOrganization :europeanCommission ;
    owl:sameAs dbr:Publications_Office_of_the_European_Union ;
    rdfs:label "Publications Office of the EU" .

:europeanCommission a schema:Organization, foaf:Organization ;
    schema:name "European Commission" ;
    schema:url <https://ec.europa.eu/> ;
    schema:description "The EU's executive body; funds the European Data Portal." ;
    owl:sameAs dbr:European_Commission ;
    rdfs:label "European Commission" .

:dgCnect a schema:Organization, foaf:Organization ;
    schema:name "DG CONNECT" ;
    schema:url <https://commission.europa.eu/departments/directorate-general-communications-networks-content-and-technology_en> ;
    schema:description "Directorate-General for Communications Networks, Content and Technology; responsible for EU open data policy and cooperates on EDP management." ;
    schema:parentOrganization :europeanCommission ;
    rdfs:label "DG CONNECT" .

# ─── Software & Services ────────────────────────────────────────────────────
:dcatAp a schema:SoftwareApplication ;
    schema:name "DCAT-AP" ;
    schema:url <https://semiceu.github.io/DCAT-AP/releases/3.0.0/> ;
    schema:description "Application Profile for Data Portals in Europe. An RDF-based metadata standard used by the European Data Portal to ensure cross-border comparability of published datasets." ;
    schema:applicationCategory "Metadata Standard" ;
    rdfs:label "DCAT-AP" .

:eTranslation a schema:SoftwareApplication ;
    schema:name "eTranslation" ;
    schema:url <https://commission.europa.eu/resources-partners/etranslation_en> ;
    schema:description "European Commission's machine translation service; used by the EDP to provide metadata in all 24 official EU languages." ;
    schema:applicationCategory "Machine Translation" ;
    schema:provider :europeanCommission ;
    rdfs:label "eTranslation" .

:fairDashboard a schema:SoftwareApplication ;
    schema:name "Metadata Quality Assessment Dashboard" ;
    schema:url <https://data.europa.eu/mqa/> ;
    schema:description "Dashboard assessing metadata quality against FAIR indicators (Findable, Accessible, Interoperable, Reusable) for datasets published on the EDP." ;
    schema:applicationCategory "Quality Dashboard" ;
    schema:provider :edp ;
    rdfs:label "FAIR Metadata Quality Dashboard" .

:dataEuropaAcademy a schema:LearningResource ;
    schema:name "data.europa academy" ;
    schema:url <https://data.europa.eu/en/academy> ;
    schema:description "Training materials and e-learning resources on open data published by the European Data Portal." ;
    schema:provider :edp ;
    rdfs:label "data.europa academy" .

:licensingAssistant a schema:SoftwareApplication ;
    schema:name "Licensing Assistant" ;
    schema:url <https://data.europa.eu/en/training/licensing-assistant> ;
    schema:description "Tool provided by the EDP to help data providers and users navigate open data licensing." ;
    schema:provider :edp ;
    rdfs:label "Licensing Assistant" .

# ─── Concepts ───────────────────────────────────────────────────────────────
:openData a skos:Concept ;
    skos:prefLabel "Open Data" ;
    skos:definition "Data that can be freely accessed, used, modified, and shared by anyone for any purpose. The European Data Portal harvests and provides access to open datasets from across Europe." ;
    skos:related :publicSectorInfo, :euroOpenDataSpace, :fairPrinciples ;
    owl:sameAs dbr:Open_data ;
    rdfs:label "Open Data" .

:dataLiteracy a skos:Concept ;
    skos:prefLabel "Data Literacy" ;
    skos:definition "The ability to read, understand, create, and communicate data as information. One of the three service spheres of the European Data Portal alongside data providers and data users." ;
    skos:related :openData, :dataEuropaAcademy ;
    rdfs:label "Data Literacy" .

:dataProviders a skos:Concept ;
    skos:prefLabel "Data Providers" ;
    skos:definition "Entities that give access and distribute data to the public via the EDP. On the portal, these are official representatives from supranational, national and local public administration." ;
    skos:broader :openData ;
    rdfs:label "Data Providers" .

:fairPrinciples a skos:Concept ;
    skos:prefLabel "FAIR Principles" ;
    skos:definition "A set of guiding principles for scientific data management and stewardship: Findable, Accessible, Interoperable, and Reusable. Applied to metadata quality assessment on the EDP." ;
    skos:related :dcatAp, :fairDashboard ;
    rdfs:label "FAIR Principles" .

:euroOpenDataSpace a skos:Concept ;
    skos:prefLabel "European Open Data Space" ;
    skos:definition "An EU-wide interoperable data space enabling development of new products and services based on public data. An essential element of the EU single market for data, built on four pillars: catalogue, interoperability, visualisation, and governance." ;
    skos:related :openData, :dataGovernanceAct ;
    rdfs:label "European Open Data Space" .

:highValueDatasets a skos:Concept ;
    skos:prefLabel "High-Value Datasets" ;
    skos:definition "Datasets with high potential for economic and societal impact, mandated for publication under Commission Implementing Regulation (EU) 2023/138. First reporting exercise in 2025." ;
    skos:broader :openData ;
    skos:related :openDataDirective2019 ;
    rdfs:label "High-Value Datasets" .

:publicSectorInfo a skos:Concept ;
    skos:prefLabel "Public Sector Information (PSI)" ;
    skos:definition "Information produced, collected, or paid for by public sector bodies, subject to re-use under EU PSI Directives. The legal foundation of the European open data policy." ;
    skos:related :openData, :psiDirective2003 ;
    rdfs:label "Public Sector Information" .

# ─── Legal Instruments ──────────────────────────────────────────────────────
:psiDirective2003 a schema:Legislation ;
    schema:name "Directive 2003/98/EC (PSI Directive)" ;
    schema:url <https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32003L0098> ;
    schema:description "EU Directive on the re-use of public sector information (2003). Established the basis for the EU open data policy. Amended in 2013 and superseded by Directive 2019/1024." ;
    schema:dateCreated "2003"^^xsd:gYear ;
    rdfs:label "PSI Directive 2003/98/EC" .

:openDataDirective2019 a schema:Legislation ;
    schema:name "Directive (EU) 2019/1024 (Open Data Directive)" ;
    schema:url <https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32019L1024> ;
    schema:description "EU Directive on open data and re-use of public sector information. Recasts the PSI Directive, extends scope, and introduces high-value datasets. Invites Member States to make public data resources available." ;
    schema:dateCreated "2019"^^xsd:gYear ;
    rdfs:label "Open Data Directive 2019/1024" .

:dataGovernanceAct a schema:Legislation ;
    schema:name "Data Governance Act (EU) 2022/868" ;
    schema:url <https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32022R0868> ;
    schema:description "EU regulation setting a framework for fostering voluntary data sharing beyond open data. Entered into force 2023. Complements the Open Data Directive." ;
    schema:dateCreated "2022"^^xsd:gYear ;
    rdfs:label "Data Governance Act" .

# ─── Places ─────────────────────────────────────────────────────────────────
:europeanUnion a schema:Place ;
    schema:name "European Union" ;
    schema:description "Political and economic union of 27 member states; the geographic and legal context for the European Data Portal and EU open data policy." ;
    owl:sameAs dbr:European_Union ;
    rdfs:label "European Union" .

# ─── Relationships ──────────────────────────────────────────────────────────
:edp schema:managedBy :publicationsOffice ;
    schema:funder :europeanCommission ;
    schema:isRelatedTo :dgCnect ;
    schema:usesFormat :dcatAp ;
    schema:hasPart :fairDashboard, :dataEuropaAcademy, :licensingAssistant ;
    schema:inLanguage "24 EU official languages" .

# ─── FAQ ────────────────────────────────────────────────────────────────────
:faq1 a schema:Question ;
    schema:name "What is the European Data Portal (data.europa.eu)?" ;
    schema:acceptedAnswer [ a schema:Answer ; schema:text "The European Data Portal is the EU's central point of access to open data from international, EU, national, regional, local and geodata portals. In 2021 it consolidated the former European Data Portal (data from EU Member States) and the EU Open Data Portal (data from EU institutions) into a single portal." ] .

:faq2 a schema:Question ;
    schema:name "What is DCAT-AP and why does the portal use it?" ;
    schema:acceptedAnswer [ a schema:Answer ; schema:text "DCAT-AP is the Application Profile for Data Portals in Europe — an RDF-based metadata standard. The portal uses it to ensure cross-border comparability of published datasets and to facilitate interoperability across national, regional, and local data portals." ] .

:faq3 a schema:Question ;
    schema:name "Who are data providers on the European Data Portal?" ;
    schema:acceptedAnswer [ a schema:Answer ; schema:text "Data providers are official representatives from supranational, national, and local public administration — EU institutions, EU agencies, European countries, and research projects — who publish metadata giving access to their data. They are autonomous in publishing their metadata on the portal." ] .

:faq4 a schema:Question ;
    schema:name "What are FAIR principles in the context of the portal?" ;
    schema:acceptedAnswer [ a schema:Answer ; schema:text "FAIR stands for Findable, Accessible, Interoperable, and Reusable. The portal's Metadata Quality Assessment Dashboard evaluates datasets against FAIR indicators, helping data providers improve the quality and discoverability of their metadata." ] .

:faq5 a schema:Question ;
    schema:name "What is the legal basis for the European Data Portal?" ;
    schema:acceptedAnswer [ a schema:Answer ; schema:text "The portal was originally established on Directive 2003/98/EC (PSI Directive). Directive 2013/37/EU and Directive 2019/1024 (Open Data Directive) extended its mandate. The Data Governance Act (2022) further complements the framework by enabling voluntary data sharing beyond open data." ] .

:faq6 a schema:Question ;
    schema:name "What are high-value datasets?" ;
    schema:acceptedAnswer [ a schema:Answer ; schema:text "High-value datasets are defined under Commission Implementing Regulation (EU) 2023/138 as datasets with high potential for economic and societal impact. EU Member States were required to make these available from 2024, with the first reporting exercise taking place in 2025." ] .

:faq7 a schema:Question ;
    schema:name "How does the portal handle multiple EU languages?" ;
    schema:acceptedAnswer [ a schema:Answer ; schema:text "The portal provides translations of metadata descriptions in all 24 official EU languages using eTranslation, the European Commission's machine translation service. Machine-based translation may be less efficient than human translation in some situations." ] .

# ─── Glossary ───────────────────────────────────────────────────────────────
:glossary1 a schema:DefinedTerm ; schema:name "DCAT-AP" ; schema:description "Data Catalogue Vocabulary Application Profile — the RDF metadata standard for data portals in Europe." .
:glossary2 a schema:DefinedTerm ; schema:name "FAIR" ; schema:description "Findable, Accessible, Interoperable, Reusable — principles guiding metadata quality on the portal." .
:glossary3 a schema:DefinedTerm ; schema:name "PSI" ; schema:description "Public Sector Information — data produced by public bodies, subject to EU re-use legislation since 2003." .
:glossary4 a schema:DefinedTerm ; schema:name "High-Value Datasets" ; schema:description "Datasets mandated for open publication under EU 2023/138 due to their economic and societal impact potential." .
:glossary5 a schema:DefinedTerm ; schema:name "Data Governance Act" ; schema:description "EU Regulation 2022/868 establishing a framework for voluntary data sharing beyond open data." .
:glossary6 a schema:DefinedTerm ; schema:name "eTranslation" ; schema:description "The European Commission's machine translation service; provides metadata in all 24 EU official languages." .
:glossary7 a schema:DefinedTerm ; schema:name "Harvesting" ; schema:description "The automated process by which the EDP collects metadata from connected national, regional, and local data portals." .
:glossary8 a schema:DefinedTerm ; schema:name "Data Literacy" ; schema:description "The ability to read, understand, create, and communicate data as information — a core service pillar of the EDP." .

# ─── HowTo ──────────────────────────────────────────────────────────────────
:howTo a schema:HowTo ;
    schema:name "How to Publish Data on the European Data Portal" ;
    schema:step
        [ a schema:HowToStep ; schema:position 1 ; schema:name "Prepare DCAT-AP-compliant metadata" ;
          schema:text "Structure your dataset metadata according to the DCAT-AP standard. Ensure descriptions, keywords, licences, and contact information are complete and accurate in at least one EU language." ] ,
        [ a schema:HowToStep ; schema:position 2 ; schema:name "Register your data portal for harvesting" ;
          schema:text "Contact the EDP team to suggest your portal for harvesting. The portal will collect your metadata automatically whenever new datasets are published or updated." ] ,
        [ a schema:HowToStep ; schema:position 3 ; schema:name "Assign an open licence" ;
          schema:text "Apply a recognised open licence (e.g. Creative Commons, CC0) to your datasets. Use the EDP's Licensing Assistant tool to identify the right licence for your use case." ] ,
        [ a schema:HowToStep ; schema:position 4 ; schema:name "Assess and improve metadata quality" ;
          schema:text "Use the Metadata Quality Assessment Dashboard to check your datasets against FAIR indicators. Address any findability, accessibility, interoperability, or reusability gaps identified." ] ,
        [ a schema:HowToStep ; schema:position 5 ; schema:name "Maintain and update" ;
          schema:text "Keep your metadata current. The EDP updates automatically when new content is available in your source portal. Monitor the quality dashboard regularly and respond to feedback." ] .

# ─── Provenance ─────────────────────────────────────────────────────────────
:kgGeneratorSkill a prov:SoftwareAgent ; schema:name "KG Generator Skill" ; rdfs:label "KG Generator Skill" .
:rdfInfographicSkill a prov:SoftwareAgent ; schema:name "RDF Infographic Skill v1.1" ; rdfs:label "RDF Infographic Skill" .
:claudeSonnetInterface a prov:SoftwareAgent ; schema:name "Claude Sonnet (claude-sonnet-4-6)" ; rdfs:label "Claude Sonnet Interface" .
:coworkDesktopEnvironment a prov:SoftwareAgent ; schema:name "Cowork Desktop Environment" ; rdfs:label "Cowork Desktop Environment" .
:uriBurnerResolver a prov:SoftwareAgent ; schema:name "URIBurner Linked Data Resolver" ; schema:url <https://linkeddata.uriburner.com/> ; rdfs:label "URIBurner Resolver" .
:virtuosoServer a prov:SoftwareAgent ; schema:name "OpenLink Virtuoso Server" ; rdfs:label "Virtuoso Server" .

:manual prov:wasGeneratedBy :kgGeneratorSkill, :rdfInfographicSkill, :claudeSonnetInterface,
        :coworkDesktopEnvironment, :uriBurnerResolver, :virtuosoServer .

# ─── SPARQL Endpoint & HVD Query Service (added from /hvd/sparql_queries/) ────
:edpSparqlEndpoint a schema:EntryPoint, schema:SoftwareApplication ;
    schema:name "European Data Portal SPARQL Endpoint" ;
    schema:url <https://data.europa.eu/sparql> ;
    schema:description "A Virtuoso-powered SPARQL 1.1 endpoint that exposes the full EDP metadata catalogue, including all harvested High-Value Datasets from EU Member State catalogues. Supports CONSTRUCT and SELECT queries; pagination required for large result sets (max 50,000 rows, recommended 10,000)." ;
    schema:applicationCategory "SPARQL Query Service" ;
    schema:provider :edp ;
    schema:softwareRequirements "OpenLink Virtuoso" ;
    rdfs:label "EDP SPARQL Endpoint" .

:virtuoso a schema:SoftwareApplication ;
    schema:name "OpenLink Virtuoso" ;
    schema:url <https://virtuoso.openlinksw.com/> ;
    schema:description "Multi-model database and SPARQL endpoint engine powering the European Data Portal's linked data query service." ;
    schema:applicationCategory "RDF Triple Store / SPARQL Engine" ;
    rdfs:label "OpenLink Virtuoso" .

:hvdReportingTool a schema:SoftwareApplication ;
    schema:name "High-Value Datasets Reporting Tool" ;
    schema:url <https://data.europa.eu/en/hvd-reporting> ;
    schema:description "Comprehensive tool for analysing and generating HVD compliance reports. Built on top of the EDP SPARQL endpoint. Simplifies the Article 5 HVD IR reporting process for Member States." ;
    schema:applicationCategory "Reporting Tool" ;
    schema:provider :edp ;
    rdfs:label "HVD Reporting Tool" .

:sparql a skos:Concept ;
    skos:prefLabel "SPARQL" ;
    skos:definition "SPARQL Protocol and RDF Query Language — the W3C standard query language for RDF data. The EDP exposes its metadata through a SPARQL 1.1-compliant Virtuoso endpoint." ;
    skos:related :dcatAp, :edpSparqlEndpoint ;
    rdfs:label "SPARQL" .

:hvdQueryLibrary a schema:CreativeWork ;
    schema:name "HVD SPARQL Query Library" ;
    schema:url <https://dataeuropa.gitlab.io/data-provider-manual/hvd/sparql_queries/> ;
    schema:description "Nine official SPARQL queries (and sub-queries) developed by the European Commission for retrieving and reporting on High-Value Datasets from the EDP endpoint. Covers catalogue snapshots, key metadata, distributions, APIs, and licence compliance." ;
    schema:hasPart
        [ schema:name "Query 1 — HVD catalogue snapshot (CONSTRUCT)" ; schema:description "Constructs a full snapshot of a Member State HVD catalogue. Uses ?MScat? parameter, union of dataset/distribution/API/DataService patterns. Pagination required." ] ,
        [ schema:name "Query 2 — HVD catalogue URIs per country" ; schema:description "SELECT DISTINCT returning catalogue URIs having at least one resource with r5r:applicableLegislation pointing to the HVD IR." ] ,
        [ schema:name "Query 3 — HVD datasets per catalogue" ; schema:description "Returns original source identifiers for each HVD dataset to enable internal cross-check against Member State records." ] ,
        [ schema:name "Query 4.1 — HVD datasets with source portal links" ; schema:description "Returns EDP dataset identifiers and original catalogue record identifiers (dct:identifier via dcat:CatalogRecord)." ] ,
        [ schema:name "Query 4.2 — HVD key metadata" ; schema:description "Returns title, description, and HVD category for each dataset. English language filter applied." ] ,
        [ schema:name "Query 5 — HVD distributions" ; schema:description "Returns distributions (bulk downloads) per HVD dataset, including accessURL. One dataset may have multiple distributions." ] ,
        [ schema:name "Query 6 — HVD APIs" ; schema:description "Returns data services (APIs) per HVD dataset. Handles two DCAT-AP association patterns: via distribution accessService and via dcat:servesDataset." ] ,
        [ schema:name "Query 7 — HVD APIs with key information" ; schema:description "Returns API title, description, HVD category, endpointURL, and endpointDescription." ] ,
        [ schema:name "Query 8 — Legal information" ; schema:description "Returns access rights, licences and rights for HVD APIs. Covers three DCAT-AP legal properties." ] ,
        [ schema:name "Query 9 — Licence compliance" ; schema:description "Sub-queries for API licences (9.1), distribution licences (9.2), and all licences per catalogue (9.3). Uses SKOS exactMatch/narrowMatch/broadMatch to assess CC-BY 4.0 permissiveness." ] ;
    rdfs:label "HVD SPARQL Query Library" .

# Link new entities to existing ones
:edp schema:hasOfferCatalog :edpSparqlEndpoint ;
     schema:hasPart :hvdReportingTool, :hvdQueryLibrary .
:edpSparqlEndpoint schema:softwareRequirements "OpenLink Virtuoso" .
:highValueDatasets schema:isAccessibleForFree "true"^^xsd:boolean .

# Additional FAQ
:faq8 a schema:Question ;
    schema:name "What SPARQL endpoint does the European Data Portal expose?" ;
    schema:acceptedAnswer [ a schema:Answer ; schema:text "The EDP provides a Virtuoso-powered SPARQL 1.1 endpoint at data.europa.eu/sparql. It exposes the full metadata catalogue including all harvested High-Value Datasets from EU Member State catalogues. Because the portal actively harvests Member State endpoints, the SPARQL endpoint always reflects the most recent state. Pagination (max 50,000 rows, recommended 10,000) is required for large result sets." ] .

:faq9 a schema:Question ;
    schema:name "What SPARQL queries are provided for High-Value Datasets?" ;
    schema:acceptedAnswer [ a schema:Answer ; schema:text "The European Commission provides nine official SPARQL queries: (1) HVD catalogue snapshot via CONSTRUCT, (2) HVD catalogue URIs per country, (3) HVD datasets per catalogue with original identifiers, (4.1/4.2) HVD key metadata and source links, (5) HVD distributions/bulk downloads, (6) HVD APIs, (7) HVD APIs with key information, (8) legal information (licences, access rights, rights), and (9) licence compliance assessment for APIs, distributions, and full catalogues." ] .

# Additional glossary
:glossary9 a schema:DefinedTerm ; schema:name "SPARQL Endpoint" ; schema:description "A Virtuoso-hosted query service at data.europa.eu/sparql exposing EDP metadata, including HVD data, via SPARQL 1.1 SELECT and CONSTRUCT queries." .
:glossary10 a schema:DefinedTerm ; schema:name "r5r:applicableLegislation" ; schema:description "RDF property from the DCAT-AP for HVD extension identifying that a dataset/distribution/API falls under a specific legislative act. The HVD IR URI is http://data.europa.eu/eli/reg_impl/2023/138/oj." .
:glossary11 a schema:DefinedTerm ; schema:name "Pagination" ; schema:description "Technique required when querying the EDP SPARQL endpoint for large result sets. Uses LIMIT (max 50,000, recommended 10,000) and OFFSET incremented until results are empty." .
