rdf

Working with SPARQL lists in dotNETRDF - intersection of lists

不羁的心 提交于 2021-02-08 05:41:47
问题 I'm using dotNetRDF and am having a hard time understanding how to use the provided list helpers. Currently I'm not using a list, just one item like so: paramString.SetParameter("nickname", g.CreateLiteralNode(nicknameString)); paramString.CommandText = @"INSERT DATA { data:person_1 app:nickname @nickname. }"; But now I need to account for multiple nicknames: //doesn't work with array, and there's no "CreateListNode()" //paramString.SetParameter("nicknames", g.CreateLiteralNode(nicknamesArray

Working with SPARQL lists in dotNETRDF - intersection of lists

房东的猫 提交于 2021-02-08 05:41:27
问题 I'm using dotNetRDF and am having a hard time understanding how to use the provided list helpers. Currently I'm not using a list, just one item like so: paramString.SetParameter("nickname", g.CreateLiteralNode(nicknameString)); paramString.CommandText = @"INSERT DATA { data:person_1 app:nickname @nickname. }"; But now I need to account for multiple nicknames: //doesn't work with array, and there's no "CreateListNode()" //paramString.SetParameter("nicknames", g.CreateLiteralNode(nicknamesArray

XSLT, transformation between RDF and XML

烂漫一生 提交于 2021-02-08 05:08:12
问题 I have this file in .rdf <rdf:RDF xmlns:vitro-public="http://vitro.mannlib.cornell.edu/ns/vitro/public#" xmlns:c4o="http://purl.org/spar/c4o/" xmlns:ero="http://purl.obolibrary.org/obo/" xmlns:pvs="http://vivoweb.org/ontology/provenance-support#" xmlns:owl2="http://www.w3.org/2006/12/owl2-xml#" xmlns:scirr="http://vivoweb.org/ontology/scientific-research-resource#" xmlns:vivo="http://vivoweb.org/ontology/core#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bibo="http://purl

listOfDict to RDF conversion in python targeting Apache Jena Fuseki

…衆ロ難τιáo~ 提交于 2021-01-29 17:53:19
问题 To store some data in Apache Jena from python I'd like to have a generic conversion from a list of Dicts to RDF and possibly back on query. For the list of Dict to RDF part I tried implementing "insertListofDicts" (see below) and tested it with "testListOfDictInsert" (see below). The result is below which leads to a 400: Bad Request when tried with an Apache Jena Fuseki server. What needs to be fixed for simple string types - and may be for other primitive Python types to get this working?

Class not displayed in GraphDB

好久不见. 提交于 2021-01-29 07:44:36
问题 I have the following class: :Foo rdf:type owl:Class ; rdfs:subClassOf [ rdf:type owl:Restriction ; owl:onProperty :hasId ; owl:someValuesFrom rdfs:Literal ] . Strangely, that does not appear in the Class hierarchy tab of Ontotext's GraphDB. Is there any specific reason? 回答1: Is there any specific reason? From graphdb-framework-graph-explore-8.7.0.jar/dataviz-queries/getRdfClassHierarchy.sparql : PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX sesame: <http://www.openrdf.org/schema/sesame#

Json to RDF/XML file in Python

十年热恋 提交于 2021-01-28 12:31:34
问题 I am trying to save this json object: [ { "patient_id": "59b70b0e-51cb-4215-b65a-db470067c8de" }, [ { "tel_1_preferred_p": true, "adr_region": "OK", "tel_2_number": "800-979-6786", "__modelname__": "Demographics", "adr_city": "Bixby", "ethnicity": null, "adr_postalcode": "74008", "name_family": "John", "name_middle": null, "tel_1_type": "h", "tel_2_type": "c", "name_prefix": null, "email": "william.robinson@example.com", "name_given": "Smith", "adr_street": "23 Church Rd", "bday": "1965-08-09

Why does this SPARQL query return certain items as subjects?

好久不见. 提交于 2021-01-28 00:35:55
问题 I have the following data graph: @prefix hr: <http://learningsparql.com/ns/humanResources#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix sch: <http://schema.org/> . @prefix xml: <http://www.w3.org/XML/1998/namespace> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . hr:Another a rdfs:Class . hr:Employee a rdfs:Class ; rdfs:label "model" ; rdfs:comment "a good employee" . hr:Longer a hr:Employee ; rdfs:label

moving a rdf ordered list from a graph to another with sparql

只愿长相守 提交于 2021-01-27 19:01:38
问题 I have a list in a rdf knowledge graph in a Fuseki dataset. I can get the elements of the list with something like select ?webpage where { graph <http://datamusee.givingsense.eu/graph/webtracks> { ?track <http://erlangen-crm.org/current/P16_used_specific_object> ?content. ?content rdf:rest*/rdf:first ?webpage . } } but I would like to copy the list from the webtracks graph to another graph I doen't find how to do it either with an insert or by exporting the data with a construct and then

SPARQL Construct Clause to include predicate literals

╄→гoц情女王★ 提交于 2021-01-27 18:11:21
问题 I'm trying to use SPARQL CONSTRUCT to strip a set of data from dbpedia - I'm only interested in a set of Artists, and I want Sesame as small as possible for speed. What I thought I could do is use CONSTRUCT to get every predicate for a given artist. I can get the first CONSTRUCT clause working to make sure I get type "Person", but that only gives me triples satisfying that clause - I want their names, labels, birthPlaces etc to. My query below is trying to capture Monet's name in the second

RDFlib 'on disk' store

南笙酒味 提交于 2021-01-27 07:45:26
问题 After 2 days of research I (a newby) still can't figure out what 'on disk' stores are available in RDFFlib 3.1.0. If you have a working example, that would be nice to see... For my app I prefer SQLite. I need no access to online RDF stores, I want to store info about relations inside the organisation in RDF. Thanks 回答1: Here you have an example to make it work with MySQL. I don't think rdflib 3 works with SQLite. import rdflib from rdflib.Graph import ConjunctiveGraph as Graph from rdflib