dotnetrdf

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

Delete RDF tuple using dotNetRDF [duplicate]

点点圈 提交于 2020-01-16 09:08:10
问题 This question already has answers here : SPARQL delete query dotNetRDF does not modify RDF file (2 answers) Closed 5 years ago . I'd like to delete a RDF tuple using dotNetRDF. Here is my RDF file: <rdf:RDF xml:base="http://www.example.org/destDetails#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:ns0="http://www.example.org/destDetails#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="&ns0;0165a659

Retrieving Specific RDF Graph Triples Based on Predicate Nodes

六月ゝ 毕业季﹏ 提交于 2019-12-25 04:12:12
问题 I am using dotnetrdf to send a Sparql CONSTRUCT query and evaluate the resulting IGraph. For a start, I am trying to find all Uri nodes that represent individuals of a given type, say, http://www.example.com/InterestingThing So, I would like to use the GetTriplesWithPredicateObject method, passing http://www.w3.org/1999/02/22-rdf-syntax-ns#type as a predicate and http://www.example.com/InterestingThing as an object. That method expects two objects implementing the INode interface, so I am

Why does my SPARQL query return the URI of a resource instead of its name?

爱⌒轻易说出口 提交于 2019-12-17 04:09:47
问题 I want to get all classes of my ontology. This is a part of my ontology file in RDF/XML format created by Protege: <!-- http://www.w3.org/2002/07/owl#aqua --> <Class rdf:about="&owl;aqua"/> <!-- http://www.w3.org/2002/07/owl#varioPerfect --> <Class rdf:about="&owl;varioPerfect"/> I wrote this query, which works properly in Protege, but when I use it in dotNetRDF it returns the full URI of the class instead of just its name. public string[] ontologysearch() { List<string> list = new List

Why does my SPARQL query return the URI of a resource instead of its name?

£可爱£侵袭症+ 提交于 2019-12-17 04:09:17
问题 I want to get all classes of my ontology. This is a part of my ontology file in RDF/XML format created by Protege: <!-- http://www.w3.org/2002/07/owl#aqua --> <Class rdf:about="&owl;aqua"/> <!-- http://www.w3.org/2002/07/owl#varioPerfect --> <Class rdf:about="&owl;varioPerfect"/> I wrote this query, which works properly in Protege, but when I use it in dotNetRDF it returns the full URI of the class instead of just its name. public string[] ontologysearch() { List<string> list = new List

RdfParseException: Unexpected Character (Code 114) r was encountered

ぃ、小莉子 提交于 2019-12-13 02:23:56
问题 I am trying to send the following query to DBpedia using dotNetRDF: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX temp: <http://www.example.com/temp/> CONSTRUCT { ?v1 a temp:r. ?v1 temp:p0 ?v2. } WHERE { OPTIONAL { { { SELECT ?v1 WHERE { ?v1 rdfs:comment ?v2. } LIMIT 10 }. ?v1 rdfs:comment ?v2. }. }. } However, I am getting an RdfParseException saying that an unexpected r

How to compare simple and typed literals in dotnetrdf?

岁酱吖の 提交于 2019-12-12 11:25:01
问题 I'm comparing two graphs, one from a Turtle file with simple literal objects, the other from a file with explicit datatype IRIs. The graphs are otherwise equal. Graph A: <s> <p> "o" Graph B: <s> <p> "o"^^xsd:string According to RDF 1.1 (3.3 Literals), "[s]imple literals are syntactic sugar for abstract syntax literals with the datatype IRI http://www.w3.org/2001/XMLSchema#string". This is reflected in the concrete syntax specifications as well (N-Triples, Turtle, RDF XML). So I'd expect both

.net rdf dblp dataset querying

爱⌒轻易说出口 提交于 2019-12-12 06:30:34
问题 when i run the following code to query the dblp dataset using this code snippet i am using this endpoint http://dblp.l3s.de/d2r/snorql enter code here String st = ""; String qry = ""; String uri_V; uri_V = "http://dblp.l3s.de/d2r/sparql"; // Modify if need...... //String ns = "\""+TextBox1.Text.ToString()+"\""; // String qry = "SELECT DISTINCT ?name WHERE { ?person foaf:name ?name.FILTER regex(str(?name),"+ns+").}"; if (radiosrch.SelectedIndex == 0) { qry = "SELECT ?title WHERE {?game <http:/

Persist Data with DotNetRdf and Virtuoso Manager

▼魔方 西西 提交于 2019-12-12 05:15:00
问题 I tried following the dotnetrdf documentation to store data in a Virtuoso Server. Here is what I do: public void LoadGraph() { //Create our Storage Provider - this example uses Virtuoso Universal Server VirtuosoManager virtuoso = new VirtuosoManager("creativeartefact.org", 1111, "DB", "user", "password"); //Load the Graph into an ordinary graph instance first Graph g = new Graph(); virtuoso.LoadGraph(g, new Uri("http://creativeartefact.org/")); //Then place the Graph into a wrapper