Searching for business entities across STIRdata data sources, Wikidata and DBpedia
Execute query tasks to search for business entities by their identifier (DBpedia)
Prepare query tasks to search for business entities by their identifier (DBpedia)
Prepare query tasks to search for business entities by their identifier (Wikidata)
Execute query tasks to search for business entities by their identifier (Wikidata)
Construct output representation of business entities
Extract compliant endpoints from catalog
Execute query tasks to search for business entities by their identifier (STIRData)
Prepare query tasks to search for business entities by their identifier (STIRData)
PREFIX esl: <http://plugins.linkedpipes.com/ontology/e-sparqlEndpointList#> PREFIX : <urn:stirdata:> CONSTRUCT { ?task a esl:Task ; esl:query ?query ; esl:group "https://dbpedia.org/sparql" ; esl:endpoint "https://dbpedia.org/sparql" . } WHERE { ?companyWD :identifier ?identifier . BIND(UUID() AS ?task) BIND(CONCAT("""PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX stirdbp: <urn:stirdata:dbpedia:> CONSTRUCT { <""", STR(?companyWD), """> stirdbp:abstract ?abstract . } WHERE { ?company owl:sameAs <""", STR(?companyWD), """> ; dbo:abstract ?abstract . }""") as ?query) }
PREFIX esl: <http://plugins.linkedpipes.com/ontology/e-sparqlEndpointList#> PREFIX : <urn:stirdata:> CONSTRUCT { ?task a esl:Task ; esl:query ?query ; esl:group "https://query.wikidata.org/sparql" ; esl:endpoint "https://query.wikidata.org/sparql" . } WHERE { [] :identifier ?identifier . BIND(UUID() AS ?task) BIND(CONCAT("""PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX psv: <http://www.wikidata.org/prop/statement/value/> PREFIX ps: <http://www.wikidata.org/prop/statement/> PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX stirwd: <urn:stirdata:wikidata:> PREFIX : <urn:stirdata:> CONSTRUCT { ?company stirwd:numberOfEmployees ?numberOfEmployees ; stirwd:netProfit [ stirwd:amount ?netProfitAmount ; stirwd:unit ?netProfitUnit ] ; :identifier \"""", STR(?identifier), """\" . } WHERE { VALUES ?identifyingWDProperty {wd:Q21745557 wd:Q26235166 wd:Q106035765} ?company ?directIdentifier \"""", STR(?identifier), """\" ; wdt:P1128 ?numberOfEmployees ; wdt:P2295 ?netProfitAmount ; p:P2295 ?netProfitStatement . ?netProfitStatement ps:P2295 ?netProfitAmount ; psv:P2295/wikibase:quantityUnit/wdt:P498 ?netProfitUnit . ?identifier wikibase:directClaim ?directIdentifier ; wdt:P31 ?identifyingWDProperty . }""") as ?query) }
[ {{#urn:stirdata:item}} {{^http://plugins.linkedpipes.com/ontology/t-mustache#first}} , {{/http://plugins.linkedpipes.com/ontology/t-mustache#first}} { "identifier": "{{urn:stirdata:identifier}}", "legalName": [ {{^http://plugins.linkedpipes.com/ontology/t-mustache#first}} , {{/http://plugins.linkedpipes.com/ontology/t-mustache#first}} {{#urn:stirdata:legalName}} { "value": "{{urn:stirdata:value}}", "lang": "{{urn:stirdata:lang}}" } {{/urn:stirdata:legalName}} ], "dataSet": "{{urn:stirdata:dataset}}", "netProfit": { {{#urn:stirdata:netProfit}} "amount": "{{urn:stirdata:amount}}", "unit": "{{urn:stirdata:unit}}" {{/urn:stirdata:netProfit}} }, "abstract": [ {{#urn:stirdata:abstract}} {{^http://plugins.linkedpipes.com/ontology/t-mustache#first}} , {{/http://plugins.linkedpipes.com/ontology/t-mustache#first}} { "value": "{{urn:stirdata:value}}", "lang": "{{urn:stirdata:lang}}" } {{/urn:stirdata:abstract}} ] } {{/urn:stirdata:item}} ]
PREFIX : <urn:stirdata:> PREFIX stirwd: <urn:stirdata:wikidata:> PREFIX stirdbp: <urn:stirdata:dbpedia:> PREFIX legal: <http://www.w3.org/ns/legal#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> CONSTRUCT { :outputList0 a :OutputList ; <http://plugins.linkedpipes.com/ontology/t-mustache#fileName> ?fileName ; :item ?legalEntity . ?legalEntity a legal:LegalEntity ; :identifier ?identifier ; :legalName ?legalNameIRI ; :dataset ?datasetStr ; :netProfit ?netProfit ; :abstract ?abstractIRI . ?netProfit :amount ?netProfitAmount ; :unit ?netProfitUnit . ?legalNameIRI :value ?legalName ; :lang ?legalNameLang . ?abstractIRI :value ?abstract ; :lang ?abstractLang . } WHERE { ?legalEntity a legal:LegalEntity ; :identifier ?identifier ; :legalName ?legalName ; :dataset ?dataset . ?legalEntityWikidata stirwd:numberOfEmployees ?numberOfEmployees ; stirwd:netProfit ?netProfit ; :identifier ?identifier ; stirdbp:abstract ?abstract . ?netProfit stirwd:amount ?netProfitAmount ; stirwd:unit ?netProfitUnit . BIND(STR(?dataset) AS ?datasetStr) BIND(LANG(?abstract) AS ?abstractLang) BIND(LANG(?legalName) AS ?legalNameLang) BIND(IRI(CONCAT(STR(?legalEntity), "/legalname/", ?legalNameLang)) AS ?legalNameIRI) BIND(IRI(CONCAT(STR(?legalEntity), "/abstract/", ?abstractLang)) AS ?abstractIRI) BIND("companies.json" AS ?fileName) }
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#> CONSTRUCT { ?endpoint <urn:stirdata:endpoint> ?endpointString ; <urn:stirdata:dataset> ?dataset . } WHERE { ?dataset a dcat:Dataset ; dcterms:title ?title ; dcterms:conformsTo <https://stirdata.github.io/data-specification/> ; dcat:distribution/dcat:accessService ?service . ?service a dcat:DataService ; dcterms:conformsTo <https://www.w3.org/TR/sparql11-protocol/> ; dcat:endpointURL ?endpoint . FILTER(langMatches(LANG(?title), "en")) BIND(STR(?endpoint) AS ?endpointString) }
PREFIX esl: <http://plugins.linkedpipes.com/ontology/e-sparqlEndpointList#> PREFIX : <urn:stirdata:> CONSTRUCT { ?task a esl:Task ; esl:query ?query ; esl:group ?uritext ; esl:endpoint ?uritext . } WHERE { ?s :endpoint ?uritext ; :dataset ?dataset . [] :identifier ?identifier . BIND(UUID() AS ?task) BIND(IRI(?uritext) as ?uri) BIND(CONCAT("""PREFIX : <urn:stirdata:> PREFIX legal: <http://www.w3.org/ns/legal#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> CONSTRUCT { ?resource a legal:LegalEntity ; :identifier \"""", STR(?identifier), """\" ; :legalName ?legalName ; :dataset <""", STR(?dataset) ,"""> . } WHERE { ?resource a legal:LegalEntity ; legal:legalIdentifier/skos:notation \"""", STR(?identifier), """\" ; legal:legalName ?legalName . }""") as ?query) }
<https://obchodní-rejstřík.stirdata.opendata.cz/sparql> <urn:stirdata:endpoint> "https://obchodní-rejstřík.stirdata.opendata.cz/sparql" ; <urn:stirdata:dataset> <https://stirdata.opendata.cz/resource/dataset/czechia/obchodní-rejstřík/ebg> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . [] <urn:stirdata:identifier> "26185610", "10421629" .