{{! PREFIX mustache: <http://plugins.linkedpipes.com/ontology/t-mustache#> }} { "_id" : "keywords_by_publishers", "json": [ {{#http://localhost/temp/entry}} {{^mustache:first}},{{/mustache:first}} {"value" : "{{http://www.w3.org/ns/dcat#keyword}}", "count" : "{{http://www.w3.org/1999/02/22-rdf-syntax-ns#value}}" } {{/http://localhost/temp/entry}} ] }
DELETE { ?distribution ?p ?o } WHERE { ?distribution a <http://www.w3.org/ns/dcat#Distribution> ; ?p ?o . }
construct { ?s <http://www.w3.org/2004/02/skos/core#prefLabel> ?label . } where { ?s <http://www.w3.org/2004/02/skos/core#inScheme> <http://publications.europa.eu/resource/authority/file-type> ; <http://www.w3.org/2004/02/skos/core#prefLabel> ?label . FILTER(LANG(?label) = 'en') }
PREFIX dcat: <http://www.w3.org/ns/dcat#> CONSTRUCT { <http://localhost/resources/root> a <https://data.gov.cz/slovník/nkod/Root> ; <http://plugins.linkedpipes.com/ontology/t-mustache#fileName> "nkod_dump_for_solr.json" ; <https://data.gov.cz/slovník/nkod/dataset> ?dataset . ?dataset <http://purl.org/dc/terms/modified> ?modifiedStr ; <http://purl.org/dc/terms/accrualPeriodicity> ?accrualPeriodicityStr ; <http://purl.org/dc/terms/description> ?escaped_description ; <http://purl.org/dc/terms/issued> ?issuedStr ; <http://purl.org/dc/terms/publisher> ?publisherStr ; <https://data.gov.cz/slovník/nkod/publisherName> ?escaped_publisherName ; <http://purl.org/dc/terms/title> ?escaped_title ; <https://data.gov.cz/slovník/nkod/keywords> ?keywordEntity ; <http://localhost/ontology/themes> ?theme ; <http://purl.org/dc/terms/format> ?format ; <http://purl.org/dc/terms/license> ?license ; <https://data.gov.cz/slovník/nkod/temporalStart> ?temporalStartStr ; <https://data.gov.cz/slovník/nkod/temporalEnd> ?temporalEndStr ; <http://purl.org/dc/terms/spatial> ?spatialStr . ?keywordEntity <http://localhost/value> ?keywordStr . ?format <http://localhost/value> ?formatStr ; <http://localhost/name> ?formatName . ?license <http://localhost/value> ?licenseStr . } WHERE { ?dataset a <http://www.w3.org/ns/dcat#Dataset> ; <http://purl.org/dc/terms/description> ?description ; <http://purl.org/dc/terms/title> ?title . OPTIONAL { ?dataset <http://www.w3.org/ns/dcat#distribution> ?distribution . ?distribution a <http://www.w3.org/ns/dcat#Distribution> . } OPTIONAL { ?dataset <http://purl.org/dc/terms/modified> ?modified . } OPTIONAL { ?dataset <http://purl.org/dc/terms/accrualPeriodicity> ?accrualPeriodicity . } OPTIONAL { ?dataset <http://purl.org/dc/terms/issued> ?issued . } OPTIONAL { ?dataset <http://purl.org/dc/terms/publisher> ?publisher . ?publisher <http://xmlns.com/foaf/0.1/name> ?publisherName . } OPTIONAL { ?dataset <http://www.w3.org/ns/dcat#keyword> ?keyword . } OPTIONAL { ?dataset <http://www.w3.org/ns/dcat#theme> ?theme . } OPTIONAL {?distribution <http://purl.org/dc/terms/format> ?format . } OPTIONAL {?distribution <http://purl.org/dc/terms/license> ?license . } OPTIONAL {?dataset <http://purl.org/dc/terms/temporal> ?temporal . ?temporal <http://schema.org/startDate> ?temporalStart . } OPTIONAL {?dataset <http://purl.org/dc/terms/temporal> ?temporal . ?temporal <http://schema.org/endDate> ?temporalEnd . } OPTIONAL {?dataset <http://purl.org/dc/terms/spatial> ?spatial . } BIND(IF(CONTAINS(STR(?temporalStart),"+"),STRBEFORE(STR(?temporalStart), "+"), STR(?temporalStart)) AS ?temporalStartStr) BIND(IF(CONTAINS(STR(?temporalEnd),"+"),STRBEFORE(STR(?temporalEnd), "+"), STR(?temporalEnd)) AS ?temporalEndStr) BIND(STR(?spatial) AS ?spatialStr) BIND(STR(?modified) as ?modifiedStr) BIND(STR(?accrualPeriodicity) as ?accrualPeriodicityStr) BIND(STR(?issued) as ?issuedStr) BIND(STR(?publisher) as ?publisherStr) BIND(STR(?keyword) as ?keywordStr) BIND(IRI(CONCAT(STR(?dataset), ENCODE_FOR_URI(STR(?keyword)))) AS ?keywordEntity) BIND(STR(?format) as ?formatStr) BIND(STR(?license) as ?licenseStr) BIND(REPLACE(STR(?title), "\"", "\\\\\"") as ?escaped_title) BIND(REPLACE(STR(?description), "\"", "\\\\\"") as ?escaped_description) BIND(REPLACE(STR(?publisherName), "\"", "\\\\\"") as ?escaped_publisherName) }
{{! PREFIX mustache: <http://plugins.linkedpipes.com/ontology/t-mustache#> }} [ {{#https://data.gov.cz/slovník/nkod/dataset}} {{^mustache:first}},{{/mustache:first}} { "iri": "{{{@id}}}", "modified" : "{{http://purl.org/dc/terms/modified}}", "accrualPeriodicity" : "{{http://purl.org/dc/terms/accrualPeriodicity}}", "description" : "{{{http://purl.org/dc/terms/description}}}", "issued" : "{{http://purl.org/dc/terms/issued}}", "publisherName" : "{{{https://data.gov.cz/slovník/nkod/publisherName}}}", "title" : "{{{http://purl.org/dc/terms/title}}}", "keyword" : [{{#https://data.gov.cz/slovník/nkod/keywords}}{{^mustache:first}},{{/mustache:first}}"{{{http://localhost/value}}}"{{/https://data.gov.cz/slovník/nkod/keywords}} ], "theme" : [{{#http://localhost/ontology/themes}}{{^mustache:first}},{{/mustache:first}}"{{{@id}}}"{{/http://localhost/ontology/themes}} ], "formatName" : [{{#http://purl.org/dc/terms/format}}{{^mustache:first}},{{/mustache:first}}"{{{http://www.w3.org/2004/02/skos/core#prefLabel}}}"{{/http://purl.org/dc/terms/format}} ], "license" : [{{#http://purl.org/dc/terms/license}}{{^mustache:first}},{{/mustache:first}}"{{{http://localhost/value}}}"{{/http://purl.org/dc/terms/license}} ], "temporal-start" : "{{https://data.gov.cz/slovník/nkod/temporalStart}}", "temporal-end" : "{{https://data.gov.cz/slovník/nkod/temporalEnd}}", "spatial" : "{{{http://purl.org/dc/terms/spatial}}}" } {{/https://data.gov.cz/slovník/nkod/dataset}} ]
PREFIX srtfl: <http://plugins.linkedpipes.com/ontology/t-sparqlConstructToFileList#> PREFIX dcat: <http://www.w3.org/ns/dcat#> CONSTRUCT { ?dataset a srtfl:Task ; srtfl:fileName ?filename ; srtfl:fileFormat "text/turtle" ; srtfl:hasTaskQuery ?tqIRI . ?tqIRI a srtfl:TaskQuery ; srtfl:query ?query . } WHERE { ?dataset a dcat:Dataset . BIND(UUID() as ?tqIRI) BIND(CONCAT(STR(?tqIRI), ".ttl") as ?filename) BIND(CONCAT(""" PREFIX dcat: <http://www.w3.org/ns/dcat#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX schema: <http://schema.org/> PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> PREFIX void: <http://rdfs.org/ns/void#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX adms: <http://www.w3.org/ns/adms#> PREFIX spdx: <http://spdx.org/rdf/terms#> PREFIX org: <http://www.w3.org/ns/org#> PREFIX tú: <https://data.gov.cz/slovník/nkod/typ-úložiště-datové-sady/> PREFIX tz: <https://data.gov.cz/slovník/nkod/typ-datové-sady-dle-zdroje/> PREFIX nkod: <https://data.gov.cz/slovník/nkod/> CONSTRUCT { ?catalog dcat:dataset <""",STR(?dataset),"""> ; dcat:record ?record. <""",STR(?dataset),"""> a dcat:Dataset, ?typZáznamu ; dcterms:title ?title ; dcterms:description ?description ; dcterms:issued ?issued ; dcat:distribution ?distribution ; dcterms:modified ?modified ; dcterms:spatial ?spatial ; dcterms:temporal ?temporal ; dcterms:language ?language ; dcterms:publisher ?publisher ; dcat:keyword ?keyword ; dcat:landingPage ?landingPage ; dcterms:accrualPeriodicity ?accrualPeriodicity ; nkod:accrualPeriodicity ?LaccrualPeriodicity ; nkod:ruian_code ?Lruian_code ; nkod:ruian_type ?Lruian_type ; nkod:lkod ?lkod ; dcterms:identifier ?identifier ; dcat:theme ?theme ; foaf:page ?page ; dcterms:type ?type ; dcat:contactPoint ?cp . ?theme skos:inScheme ?scheme . ?temporal a dcterms:PeriodOfTime; schema:startDate ?startDate ; schema:endDate ?endDate . ?cp a ?cptype; vcard:fn ?cpfn ; vcard:hasEmail ?cpemail . ?publisher a foaf:Agent; foaf:name ?name . ?distribution a dcat:Distribution ; tú:typÚložiště ?typÚložiště ; dcterms:title ?dtitle ; dcterms:description ?ddescription ; dcterms:format ?dformat ; dcterms:issued ?dissued ; dcterms:modified ?dmodified ; dcat:accessURL ?daURL ; dcat:downloadURL ?ddURL ; dcterms:license ?dlicense ; dcat:mediaType ?dmimeType ; nkod:mediaType ?LmimeType ; dcterms:type ?dtype ; adms:status ?dstatus ; dcterms:language ?dlanguage ; dcterms:conformsTo ?dconformsTo ; spdx:checksum ?checksum . ?distribution <https://data.gov.cz/slovník/podmínky-užití/specifikace> ?tou . ?tou a <https://data.gov.cz/slovník/podmínky-užití/Specifikace> ; <https://data.gov.cz/slovník/podmínky-užití/autorské-dílo> ?touGeneral ; <https://data.gov.cz/slovník/podmínky-užití/databáze-jako-autorské-dílo> ?touDatabase ; <https://data.gov.cz/slovník/podmínky-užití/databáze-chráněná-zvláštními-právy> ?touDatabaseExtra ; <https://data.gov.cz/slovník/podmínky-užití/osobní-údaje> ?touPersonalData ; <https://data.gov.cz/slovník/podmínky-užití/autor> ?touGeneralAuthor ; <https://data.gov.cz/slovník/podmínky-užití/autor-databáze> ?touDatabaselAuthor . ?dlicense dcterms:type ?licensetype . ?checksum a spdx:Checksum ; spdx:algorithm spdx:checksumAlgorithm_sha1 ; spdx:checksumValue ?checksumValue . ?record a dcat:CatalogRecord; dcterms:modified ?rmodified ; foaf:primaryTopic <""",STR(?dataset),"""> ; dcterms:issued ?rissued ; dcterms:language ?rlanguage ; dcterms:conformsTo ?rconformsTo ; dcterms:source ?rsource ; adms:status ?rstatus ; dcterms:title ?rtitle ; dcterms:description ?rdescription . } WHERE { <""",STR(?dataset),"""> a dcat:Dataset, ?typZáznamu ; dcterms:title ?title ; dcterms:description ?description ; dcat:distribution ?distribution . FILTER(?typZáznamu != dcat:Dataset) OPTIONAL { <""",STR(?dataset),"""> dcterms:modified ?modified . } OPTIONAL { <""",STR(?dataset),"""> dcterms:accrualPeriodicity ?accrualPeriodicity . } OPTIONAL { <""",STR(?dataset),"""> dcterms:issued ?issued . } OPTIONAL { <""",STR(?dataset),"""> dcterms:language ?language . } OPTIONAL { <""",STR(?dataset),"""> dcterms:identifier ?identifier . } OPTIONAL { <""",STR(?dataset),"""> dcterms:type ?type . } OPTIONAL { <""",STR(?dataset),"""> dcterms:spatial ?spatial . } OPTIONAL { <""",STR(?dataset),"""> foaf:page ?page . } OPTIONAL { <""",STR(?dataset),"""> dcat:theme ?theme . OPTIONAL { ?theme skos:inScheme ?scheme . } } OPTIONAL { <""",STR(?dataset),"""> dcat:landingPage ?landingPage . } OPTIONAL { <""",STR(?dataset),"""> dcat:keyword ?keyword . } OPTIONAL { <""",STR(?dataset),"""> dcterms:temporal ?temporal . ?temporal schema:startDate ?startDate . OPTIONAL { ?temporal schema:endDate ?endDate . } } OPTIONAL { <""",STR(?dataset),"""> dcat:contactPoint ?cp . ?cp a ?cptype. OPTIONAL { ?cp vcard:fn ?cpfn . } OPTIONAL { ?cp vcard:hasEmail ?cpemail . } } OPTIONAL { <""",STR(?dataset),"""> dcterms:publisher ?publisher . ?publisher a foaf:Agent; foaf:name ?name . } OPTIONAL { <""",STR(?dataset),"""> nkod:accrualPeriodicity ?LaccrualPeriodicity . } OPTIONAL { <""",STR(?dataset),"""> nkod:ruian_code ?Lruian_code . } OPTIONAL { <""",STR(?dataset),"""> nkod:ruian_type ?Lruian_type . } OPTIONAL { <""",STR(?dataset),"""> nkod:lkod ?lkod . } ?distribution a dcat:Distribution ; dcat:accessURL ?daURL . OPTIONAL { ?distribution tú:typÚložiště ?typÚložiště . } OPTIONAL { ?distribution dcterms:description ?ddescription . } OPTIONAL { ?distribution dcterms:format ?dformat . } OPTIONAL { ?distribution dcterms:license ?dlicense . OPTIONAL { ?dlicense dcterms:type ?licensetype . } } OPTIONAL { ?distribution dcterms:title ?dtitle . } OPTIONAL { ?distribution dcterms:language ?dlanguage . } OPTIONAL { ?distribution adms:status ?dstatus . } OPTIONAL { ?distribution dcterms:type ?dtype . } OPTIONAL { ?distribution dcat:mediaType ?dmimeType . } OPTIONAL { ?distribution nkod:mediaType ?LmimeType . } OPTIONAL { ?distribution dcat:downloadURL ?ddURL . } OPTIONAL { ?distribution dcterms:issued ?dissued . } OPTIONAL { ?distribution dcterms:conformsTo ?dconformsTo . } OPTIONAL { ?distribution dcterms:modified ?dmodified . } OPTIONAL { ?distribution spdx:checksum ?checksum . ?checksum a spdx:Checksum ; spdx:algorithm spdx:checksumAlgorithm_sha1 ; spdx:checksumValue ?checksumValue . } OPTIONAL { ?distribution <https://data.gov.cz/slovník/podmínky-užití/specifikace> ?tou . ?tou a <https://data.gov.cz/slovník/podmínky-užití/Specifikace> ; <https://data.gov.cz/slovník/podmínky-užití/autorské-dílo> ?touGeneral ; <https://data.gov.cz/slovník/podmínky-užití/databáze-jako-autorské-dílo> ?touDatabase ; <https://data.gov.cz/slovník/podmínky-užití/databáze-chráněná-zvláštními-právy> ?touDatabaseExtra ; <https://data.gov.cz/slovník/podmínky-užití/osobní-údaje> ?touPersonalData . OPTIONAL { ?tou <https://data.gov.cz/slovník/podmínky-užití/autor> ?touGeneralAuthor . } OPTIONAL { ?tou <https://data.gov.cz/slovník/podmínky-užití/autor-databáze> ?touDatabaselAuthor . } } OPTIONAL { ?catalog dcat:dataset <""",STR(?dataset),"""> . } OPTIONAL { ?catalog dcat:dataset <""",STR(?dataset),"""> ; dcat:record ?record . ?record a dcat:CatalogRecord; foaf:primaryTopic <""",STR(?dataset),"""> . OPTIONAL { ?record dcterms:modified ?rmodified . } OPTIONAL { ?record dcterms:issued ?rissued . } OPTIONAL { ?record dcterms:language ?rlanguage . } OPTIONAL { ?record dcterms:conformsTo ?rconformsTo . } OPTIONAL { ?record dcterms:source ?rsource . } OPTIONAL { ?record adms:status ?rstatus . } OPTIONAL { ?record dcterms:title ?rtitle . } OPTIONAL { ?record dcterms:description ?rdescription . } } } """) as ?query) }
PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX dcat: <http://www.w3.org/ns/dcat#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX local: <http://localhost/temp/> CONSTRUCT { <http://localhost/resource/root> a local:Root; <http://plugins.linkedpipes.com/ontology/t-mustache#fileName> "publisher_keywords.json" ; local:entry ?entryID. ?entryID a local:Entry ; rdf:value ?počet_poskytovatelů ; dcat:keyword ?kwstring. } WHERE { { SELECT ?keyword (count (distinct ?poskytovatel ) as ?počet_poskytovatelů) WHERE { ?datova_sada a dcat:Dataset ; dcterms:publisher ?poskytovatel ; dcat:keyword ?keyword . } GROUP BY ?keyword HAVING (?počet_poskytovatelů > 1) } BIND(IRI(CONCAT("http://localhost/temp/", LANG(?keyword), "/", ENCODE_FOR_URI(STR(?keyword)))) as ?entryID) BIND(STR(?keyword) as ?kwstring) }