You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
(3) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
(9) |
Dec
(4) |
2011 |
Jan
(1) |
Feb
(6) |
Mar
(9) |
Apr
(9) |
May
(20) |
Jun
(1) |
Jul
(2) |
Aug
(1) |
Sep
(6) |
Oct
(3) |
Nov
(13) |
Dec
(1) |
2012 |
Jan
(1) |
Feb
(12) |
Mar
(5) |
Apr
(8) |
May
|
Jun
(25) |
Jul
(7) |
Aug
(4) |
Sep
(14) |
Oct
(5) |
Nov
(22) |
Dec
(6) |
2013 |
Jan
(18) |
Feb
(28) |
Mar
(11) |
Apr
(18) |
May
(4) |
Jun
|
Jul
(9) |
Aug
(6) |
Sep
(4) |
Oct
(4) |
Nov
(6) |
Dec
(7) |
2014 |
Jan
(9) |
Feb
(15) |
Mar
(14) |
Apr
(7) |
May
(5) |
Jun
(15) |
Jul
(2) |
Aug
(6) |
Sep
(5) |
Oct
(7) |
Nov
(9) |
Dec
(16) |
2015 |
Jan
(4) |
Feb
(5) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
(15) |
Jul
(8) |
Aug
|
Sep
(4) |
Oct
|
Nov
(4) |
Dec
(4) |
2016 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
(5) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Rob V. <rv...@vd...> - 2012-02-21 17:02:44
|
No that is not exposed in the public API anywhere but can be fixed internally and I have just done so, unfortunately I already made the 0.6.0 release this past weekend so the fix won't hit an official release until 0.6.1 now Rob On 2/21/12 6:44 AM, Hugh Williams wrote: > Hi Sherif / Rob, > > The Virtuoso ADO.Net <http://ADO.Net> Provider DBcommand class has a > detault CommandTImeout > <http://msdn.microsoft.com/en-us/library/system.data.common.dbcommand_properties.aspx> property > value of 30 seconds, as detailed at: > http://docs.openlinksw.com/virtuoso/virtclientref.html#vcrvirtuosocommandclass > > Which would be the timeout you are hitting, so does the dotNetRDF > library allow this property value to be set so it can be increased as > required ? > > Best Regards > Hugh Williams > Professional Services > OpenLink Software, Inc. // http://www.openlinksw.com/ > 10 Burlington Mall Road, Suite 265, Burlington MA 01803 > Weblog -- http://www.openlinksw.com/blogs/ > LinkedIn -- http://www.linkedin.com/company/openlink-software/ > Twitter -- http://twitter.com/OpenLink > Google+ -- http://plus.google.com/100570109519069333827/ > Facebook -- http://www.facebook.com/OpenLinkSoftware > Universal Data Access, Integration, and Management Technology Providers > > On 17 Feb 2012, at 22:10, sherif kandel wrote: > >> sorry for being late, >> The stack trace of the exception is: >> >> System.SystemException was caught >> Message=Timeout expired. >> Source=OpenLink.Data.Virtuoso >> StackTrace: >> at OpenLink.Data.Virtuoso.Future.GetResult(ISession session, >> FutureList futures, Boolean remove) >> at OpenLink.Data.Virtuoso.Future.GetNextResult(ISession >> session, FutureList futures) >> at OpenLink.Data.Virtuoso.ManagedCommand.ProcessResult(Boolean >> needEvl) >> at OpenLink.Data.Virtuoso.ManagedCommand.Execute(String query) >> at >> OpenLink.Data.Virtuoso.VirtuosoCommand.ExecuteReader(CommandBehavior >> behavior) >> at >> OpenLink.Data.Virtuoso.VirtuosoCommand.ExecuteDbDataReader(CommandBehavior >> behavior) >> at >> System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior >> behavior) >> at System.Data.Common.DbDataAdapter.FillInternal(DataSet >> dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, >> String srcTable, IDbCommand command, CommandBehavior behavior) >> at System.Data.Common.DbDataAdapter.Fill(DataTable[] >> dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, >> CommandBehavior behavior) >> at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) >> at VDS.RDF.Storage.VirtuosoManager.Query(IRdfHandler >> rdfHandler, ISparqlResultsHandler resultsHandler, String sparqlQuery) >> at VDS.RDF.Storage.VirtuosoManager.Query(String sparqlQuery) >> at relAlgorithm.QueryProcessor.doQuery(String queryText) in >> C:\Users\Sherif\Dropbox\Graduation project >> -Sherif\[Prototype]\relalgorithm-lt\relAlgorithm\relAlgorithm\QueryProcessor.cs:line >> 138 >> InnerException: >> >> I know for sure it times out after 30 seconds because I made a timer >> to count the time from sending the query to the catch{} , it >> displayed 30.xxxx seconds >> ------------------------------------------------------------------------------ >> Virtualization & Cloud Management Using Capacity Planning >> Cloud computing makes use of virtualization - but cloud computing >> also focuses on allowing computing to be delivered as a service. >> http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________ >> Virtuoso-users mailing list >> Vir...@li... >> https://lists.sourceforge.net/lists/listinfo/virtuoso-users > |
From: Hugh W. <hwi...@op...> - 2012-02-21 14:40:22
|
Hi Sherif / Rob, The Virtuoso ADO.Net Provider DBcommand class has a detault CommandTImeout property value of 30 seconds, as detailed at: http://docs.openlinksw.com/virtuoso/virtclientref.html#vcrvirtuosocommandclass Which would be the timeout you are hitting, so does the dotNetRDF library allow this property value to be set so it can be increased as required ? Best Regards Hugh Williams Professional Services OpenLink Software, Inc. // http://www.openlinksw.com/ 10 Burlington Mall Road, Suite 265, Burlington MA 01803 Weblog -- http://www.openlinksw.com/blogs/ LinkedIn -- http://www.linkedin.com/company/openlink-software/ Twitter -- http://twitter.com/OpenLink Google+ -- http://plus.google.com/100570109519069333827/ Facebook -- http://www.facebook.com/OpenLinkSoftware Universal Data Access, Integration, and Management Technology Providers On 17 Feb 2012, at 22:10, sherif kandel wrote: > sorry for being late, > The stack trace of the exception is: > > System.SystemException was caught > Message=Timeout expired. > Source=OpenLink.Data.Virtuoso > StackTrace: > at OpenLink.Data.Virtuoso.Future.GetResult(ISession session, FutureList futures, Boolean remove) > at OpenLink.Data.Virtuoso.Future.GetNextResult(ISession session, FutureList futures) > at OpenLink.Data.Virtuoso.ManagedCommand.ProcessResult(Boolean needEvl) > at OpenLink.Data.Virtuoso.ManagedCommand.Execute(String query) > at OpenLink.Data.Virtuoso.VirtuosoCommand.ExecuteReader(CommandBehavior behavior) > at OpenLink.Data.Virtuoso.VirtuosoCommand.ExecuteDbDataReader(CommandBehavior behavior) > at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) > at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) > at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) > at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) > at VDS.RDF.Storage.VirtuosoManager.Query(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, String sparqlQuery) > at VDS.RDF.Storage.VirtuosoManager.Query(String sparqlQuery) > at relAlgorithm.QueryProcessor.doQuery(String queryText) in C:\Users\Sherif\Dropbox\Graduation project -Sherif\[Prototype]\relalgorithm-lt\relAlgorithm\relAlgorithm\QueryProcessor.cs:line 138 > InnerException: > > I know for sure it times out after 30 seconds because I made a timer to count the time from sending the query to the catch{} , it displayed 30.xxxx seconds > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________ > Virtuoso-users mailing list > Vir...@li... > https://lists.sourceforge.net/lists/listinfo/virtuoso-users |
From: Rob V. <rv...@vd...> - 2012-02-20 18:10:44
|
Hi Aibek The MongoDB support was an experiment I conducted a couple of years ago and is no longer actively developed. The code can be found in the the obsolete branch of the SVN repository - http://dotnetrdf.svn.sourceforge.net/viewvc/dotnetrdf/Branches/obsolete/Libraries/ The code you will need is in the alexandria and alexandria.mongodb folders, the code will be out of data with respect to the current releases of the core API so you will have to do some work to realign the code with the core API if you want to test this code though this shouldn't be too difficult. Regards, Rob Vesse On 2/19/12 10:42 PM, Aibek Musaev wrote: > Hello, > > Thank you very much for the wonderful work you are doing on dotNetRDF! > I am interested in dotNetRDF's support for MongoDB as a storage. Could > you please provide an example of code that connects to MongoDB, > populates it with some data and runs a SPARQL query on it? > > Kind regards, > Aibek > > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > > > _______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Aibek M. <aib...@gm...> - 2012-02-20 06:42:48
|
Hello, Thank you very much for the wonderful work you are doing on dotNetRDF! I am interested in dotNetRDF's support for MongoDB as a storage. Could you please provide an example of code that connects to MongoDB, populates it with some data and runs a SPARQL query on it? Kind regards, Aibek |
From: Rob V. <rv...@do...> - 2012-02-20 00:56:13
|
We're pleased to announce the 0.6.0 release of the dotNetRDF API - you can get this by going to Download dotNetRDF or obtain full source code by going to Download dotNetRDF Source. This release is a major feature release of the library which includes a number of notable performance improvements particularly in reduced memory usage through URI interning and an order of magnitude improved SPARQL performance thanks to a new join algorithm. We have also added Turtle 1.1 support to the library for the first time and updated SPARQL 1.1 support to be fully compliant with the latest drafts. Fuller release note may be found in the download or on our blog As always thanks to everyone who contributed ideas, bug reports and patches to the release. Full acknowledgements may be found in the distributions. Regards, Rob Vesse |
From: sherif k. <she...@gm...> - 2012-02-17 22:10:10
|
sorry for being late, The stack trace of the exception is: System.SystemException was caught Message=Timeout expired. Source=OpenLink.Data.Virtuoso StackTrace: at OpenLink.Data.Virtuoso.Future.GetResult(ISession session, FutureList futures, Boolean remove) at OpenLink.Data.Virtuoso.Future.GetNextResult(ISession session, FutureList futures) at OpenLink.Data.Virtuoso.ManagedCommand.ProcessResult(Boolean needEvl) at OpenLink.Data.Virtuoso.ManagedCommand.Execute(String query) at OpenLink.Data.Virtuoso.VirtuosoCommand.ExecuteReader(CommandBehavior behavior) at OpenLink.Data.Virtuoso.VirtuosoCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at VDS.RDF.Storage.VirtuosoManager.Query(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, String sparqlQuery) at VDS.RDF.Storage.VirtuosoManager.Query(String sparqlQuery) at relAlgorithm.QueryProcessor.doQuery(String queryText) in C:\Users\Sherif\Dropbox\Graduation project -Sherif\[Prototype]\relalgorithm-lt\relAlgorithm\relAlgorithm\QueryProcessor.cs:line 138 InnerException: I know for sure it times out after 30 seconds because I made a timer to count the time from sending the query to the catch{} , it displayed 30.xxxx seconds |
From: Rob V. <rv...@vd...> - 2012-02-17 17:39:40
|
Hugh - dotNetRDF does not explicitly set the timeout anywhere in our code so the timeout Sherif sees presumably is set automatically in the ADO.Net provider somewhere? If he uses the constructor he shows where he passes a custom connection string that gets used to create a VirtuosoConnection object directly and we don't build the connection string ourselves. This would suggest to me that either the ADO.Net provider is not respecting the Connection Timeout setting or it is getting overridden elsewhere in the Virtuoso layers. Sherif - Both me and Hugh have now asked for the error messages you see, please include these error messages in future messages as it is hard for either of us to pin down where the problem is if you haven't shown the actual error message you receive Also can you please show a code snippet of code that actually causes the error, all you have shown so far is the constructor which doesn't actually open the connection it just prepares it so we are still left guessing as to what your code is doing when it encounters the timeout error. I assume you are just calling the Query() method on the VirtuosoManager object but I don't know that for sure without seeing a code sample. Rob On 2/17/12 5:11 AM, Hugh Williams wrote: > Hi Sherif, > > You say "The library makes the timeout 30seconds" by which I presume > you mean the dotNetRDF library, in which case where is this setting > actually made and what is the actual timeout error message being > received as it sounds as if its value is overriding the one you are > setting in the ConnectString ? > > Best Regards > Hugh Williams > Professional Services > OpenLink Software, Inc. // http://www.openlinksw.com/ > 10 Burlington Mall Road, Suite 265, Burlington MA 01803 > Weblog -- http://www.openlinksw.com/blogs/ > LinkedIn -- http://www.linkedin.com/company/openlink-software/ > Twitter -- http://twitter.com/OpenLink > Google+ -- http://plus.google.com/100570109519069333827/ > Facebook -- http://www.facebook.com/OpenLinkSoftware > Universal Data Access, Integration, and Management Technology Providers > > On 17 Feb 2012, at 01:37, sherif kandel wrote: > >> Hi, >> I started the virtuoso service on windows with the following >> configurations (configuration files attached) >> >> I'm using the dotNetRDF >> <http://www.dotnetrdf.org/content.asp?pageID=Using%20Virtuoso%20Universal%20Server>library >> to make local queries to the local server (The library makes the >> timeout 30seconds) , but I can override the default timeout by >> sending a connection string when starting the object: >> >> VirtuosoManager manager = new >> VirtuosoManager("Server=localhost;Uid=dba;pwd=dba;Connection >> Timeout=500"); >> it still times out at 30seconds (if my query is complex enough to >> process in more than 30 seconds... >> >> My project uses some complex queries, so I need the timeout property >> as large as possible , how can I override that property ? >> >> >> >> >> >> <virtuoso2.ini>------------------------------------------------------------------------------ >> Virtualization & Cloud Management Using Capacity Planning >> Cloud computing makes use of virtualization - but cloud computing >> also focuses on allowing computing to be delivered as a service. >> http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________ >> Virtuoso-users mailing list >> Vir...@li... >> https://lists.sourceforge.net/lists/listinfo/virtuoso-users > > > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > _______________________________________________ > Virtuoso-users mailing list > Vir...@li... > https://lists.sourceforge.net/lists/listinfo/virtuoso-users |
From: sherif k. <she...@gm...> - 2012-02-16 00:47:55
|
I am querying from my local virtuoso server, I've updated the virtuoso.ini configuration file to maximize the timeout period, I'm now still limited by the default dotnet.data.virtuoso library timeout of 30 seconds, I want to make it more than that , How can I exactly do that ? |
From: Rob V. <rv...@do...> - 2012-02-03 17:32:55
|
Hi Volker Yes this does appear to be a bug in dotNetRDF - I have logged this as CORE-164 (http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=164) I have tracked the cause of this bug and fixed it already, essentially this was due to the parser always expecting the RDF namespace to be defined with a lower case 'rdf' prefix so with your data it dropped into the wrong part of the parser. SVN revision 2051 fixes the bug so this will be in the next release which is targeted for the end of the month (though currently at risk of slipping by a couple of weeks) or you can build from Trunk if you need the fix now. Regards, Rob Vesse ---------------------------------------- From: "Helms, Volker" <Vol...@ne...> Sent: Thursday, February 02, 2012 2:31 PM To: "Robert Vesse" <rv...@do...> Subject: AW: [dotNetRDF-Support] Errormessage Load rdf file Hi Robert, I want to analyze a rdf datafile from a Firefox extension (Scrapbook). With scrapbook you can save websites or a cut off of a website locally. Here are some additional example from the file. The complete file is long so I hope this example could help: <?xml version="1.0"?> <RDF:RDF xmlns:NS1="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#" xmlns:NC="http://home.netscape.com/NC-rdf#" xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <RDF:Description RDF:about="urn:scrapbook:item20090525115724" NS1:id="20090525115724" NS1:type="" NS1:title="Accessing Infopath fields, a simpler way." NS1:chars="UTF-8" NS1:comment="" NS1:source="http://blah.winsmarts.com/2007-12-Accessing_Infopath_fields,_a_simpler_way.aspx" NS1:icon="resource://scrapbook/data/20090525115724/favicon.ico" /> . <RDF:Description RDF:about="urn:scrapbook:item20080908150937" NS1:id="20080908150937" NS1:type="" NS1:title="Display Graphics Dynamically Based on Data Content in SQL Server Reporting Services" NS1:chars="UTF-8" NS1:comment="" NS1:source="http://www.mssqltips.com/tip.asp?tip=1355" NS1:icon="resource://scrapbook/data/20080908150937/favicon.ico" /> <RDF:Seq RDF:about="urn:scrapbook:item20100928160520"> <RDF:li RDF:resource="urn:scrapbook:item20100928161103"/> <RDF:li RDF:resource="urn:scrapbook:item20100929133635"/> <RDF:li RDF:resource="urn:scrapbook:item20100929144608"/> <RDF:li RDF:resource="urn:scrapbook:item20100928161238"/> <RDF:li RDF:resource="urn:scrapbook:item20100929133948"/> <RDF:li RDF:resource="urn:scrapbook:item20100929134140"/> <RDF:li RDF:resource="urn:scrapbook:item20100930105107"/> <RDF:li RDF:resource="urn:scrapbook:item20100929131137"/> <RDF:li RDF:resource="urn:scrapbook:item20100929143635"/> <RDF:li RDF:resource="urn:scrapbook:item20100929103620"/> <RDF:li RDF:resource="urn:scrapbook:item20100928161129"/> <RDF:li RDF:resource="urn:scrapbook:item20100928161332"/> <RDF:li RDF:resource="urn:scrapbook:item20100928161307"/> <RDF:li RDF:resource="urn:scrapbook:item20100929130432"/> <RDF:li RDF:resource="urn:scrapbook:item20100928160715"/> <RDF:li RDF:resource="urn:scrapbook:item20100929150132"/> <RDF:li RDF:resource="urn:scrapbook:item20100928160547"/> <RDF:li RDF:resource="urn:scrapbook:item20100928160643"/> <RDF:li RDF:resource="urn:scrapbook:item20101201084009"/> </RDF:Seq> . Hope you can help me to find the error. The validation site says "All Ok" with the file. Best regards, Volker Von: Robert Vesse [mailto:rv...@do...] Gesendet: Donnerstag, 2. Februar 2012 19:51 An: dotNetRDF User Help and Support Cc: Helms, Volker Betreff: Re: [dotNetRDF-Support] Errormessage Load rdf file Hi Volker The error message means that your RDF/XML is malformed according to the parsing rules for RDF/XML. The message implies that the snippet you have shown is nested in some other part of the document and is not valid at that level of nesting. Without knowing where the data comes from or what it looks like it is hard to say how to fix it. Have you tried running it through a validator like http://www.w3.org/RDF/Validator/ ? Doing this might give you a more informative error message than the one dotNetRDF gives you If you have further questions or find that other tools do accept your RDF/XML please let me know as that would indicate a possible bug in dotNetRDF Regards, Rob Vesse On Feb 2, 2012, at 4:26 AM, Helms, Volker wrote: Hi, i get this errormessage if i want to load an rdf file: A Resource Property Element was encountered with a single attribute which was not rdf:ID, only rdf:ID is permitted The file has the following content at this point: <RDF:Seq RDF:about="urn:scrapbook:item20100928160520"> <RDF:li RDF:resource="urn:scrapbook:item20100928161103"/> </RDF:Seq> Why does this happens and what can I do to resolve the error? Regards, Volker Helms ---------------------------------------- Anwender-IT-Konferenz, Paderborn, 29. März 2012 Erfahren Sie mehr über Potenziale, die moderne IT-Lösungen Ihrem Unternehmen bieten. Mit Vorträgen zu Microsoft SharePoint und Lync - ganz ohne Bits & Bytes, sondern aus Anwendersicht! Lernen Sie auch unsere neuen Managed Services kennen. Jetzt hier anmelden! Net at Work Netzwerksysteme GmbH , Am Hoppenhof 32, D-33104 Paderborn, Tel: 05251 304 600, Fax: 05251 304 650 Handelsregister Paderborn: HRB 2663, Geschäftsführer: Uwe Ulbrich http://www.netatwork.de ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d_______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Robert V. <rv...@do...> - 2012-02-02 18:52:06
|
Hi Volker The error message means that your RDF/XML is malformed according to the parsing rules for RDF/XML. The message implies that the snippet you have shown is nested in some other part of the document and is not valid at that level of nesting. Without knowing where the data comes from or what it looks like it is hard to say how to fix it. Have you tried running it through a validator like http://www.w3.org/RDF/Validator/ ? Doing this might give you a more informative error message than the one dotNetRDF gives you If you have further questions or find that other tools do accept your RDF/XML please let me know as that would indicate a possible bug in dotNetRDF Regards, Rob Vesse On Feb 2, 2012, at 4:26 AM, Helms, Volker wrote: > Hi, > > i get this errormessage if i want to load an rdf file: > A Resource Property Element was encountered with a single attribute which was not rdf:ID, only rdf:ID is permitted > > The file has the following content at this point: > > <RDF:Seq RDF:about="urn:scrapbook:item20100928160520"> > <RDF:li RDF:resource="urn:scrapbook:item20100928161103"/> > </RDF:Seq> > > Why does this happens and what can I do to resolve the error? > > Regards, > Volker Helms > Anwender-IT-Konferenz, Paderborn, 29. März 2012 > > Erfahren Sie mehr über Potenziale, die moderne IT-Lösungen Ihrem Unternehmen bieten. Mit Vorträgen zu Microsoft SharePoint > und Lync – ganz ohne Bits & Bytes, sondern aus Anwendersicht! Lernen Sie auch unsere neuen Managed Services kennen. > > Jetzt hier anmelden! > Net at Work Netzwerksysteme GmbH , Am Hoppenhof 32, D-33104 Paderborn, Tel: 05251 304 600, Fax: 05251 304 650 > Handelsregister Paderborn: HRB 2663, Geschäftsführer: Uwe Ulbrich > http://www.netatwork.de > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d_______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Helms, V. <Vol...@ne...> - 2012-02-02 12:42:30
|
Hi, i get this errormessage if i want to load an rdf file: A Resource Property Element was encountered with a single attribute which was not rdf:ID, only rdf:ID is permitted The file has the following content at this point: <RDF:Seq RDF:about="urn:scrapbook:item20100928160520"> <RDF:li RDF:resource="urn:scrapbook:item20100928161103"/> </RDF:Seq> Why does this happens and what can I do to resolve the error? Regards, Volker Helms ________________________________ Anwender-IT-Konferenz, Paderborn, 29. M?rz 2012 Erfahren Sie mehr ?ber Potenziale, die moderne IT-L?sungen Ihrem Unternehmen bieten. Mit Vortr?gen zu Microsoft SharePoint und Lync - ganz ohne Bits & Bytes, sondern aus Anwendersicht! Lernen Sie auch unsere neuen Managed Services kennen. Jetzt hier anmelden!<http://www.netatwork.de/forms/anmeldung.htm> Net at Work Netzwerksysteme GmbH , Am Hoppenhof 32, D-33104 Paderborn, Tel: 05251 304 600, Fax: 05251 304 650 Handelsregister Paderborn: HRB 2663, Gesch?ftsf?hrer: Uwe Ulbrich http://www.netatwork.de |
From: Andrea F. <afe...@ho...> - 2012-01-13 15:43:30
|
Hi, I'm working on a C# demo application with dotNetRDF and AllegroGraph 4.4. After a lot of tries, I have understood that when I create a new AllegroGraphConnector() instance to connect to the AllegroGraph repository ... it connect fine but CLEAR all existing Repository triples. Is it a bug ? The main question is ... does dotnetrdf 0.51 beta support AllegroGraph 4.4 (I’m using the Ubuntu VM) ? Ty. Andrea. |
From: Rob V. <rv...@do...> - 2011-12-04 23:33:38
|
Hi All For those who haven't already spotted the release announcement through other channels - blog, twitter, sourceforge, codeplex and nuget - this email is to announce that the latest versions of dotNetRDF are now available. As always you can get the latest release of the library by going to [1] and the latest toolkit by going to [2] The library release is primarily a bug fix release, thanks to everyone in the community who contributed bug reports and patches for this release. There are some minor new features including Dydra support, new Stardog reasoning modes and updated SPARQL 1.1 support including new functions like STRAFTER, STRBEFORE and REPLACE The toolkit release is a major feature release primarily with big upgrades to rdfEditor and Store Manager. rdfEditor now supports multi-document editing allowing you to be even more productive than before. Store Manager boasts a streamlined New Connection UI, support for copying/moving/renaming graphs both within and between stores (including ultra simple dragging and dropping of graphs between suitable stores). Thanks to everyone in the community for their continued support and feedback, special thanks to everyone who helped us find and fix bugs. We have big plans with regards to improving memory usage and SPARQL performance for our next releases and your continued feedback is what helps drive our task list. As ever if there are any features you want to see or aren't satisfied with please let us know so we can work with you to build a better product for everyone Thanks, Rob Vesse [1] http://www.dotnetrdf.org/content.asp?pageID=Download%20dotNetRDF [2] http://www.dotnetrdf.org/content.asp?pageID=Download%20dotNetRDF%20Toolkit%2 0for%20Windows |
From: Rob V. <rv...@do...> - 2011-11-29 20:58:23
|
Hi Roberta dotNetRDF has some inference capabilities, see [1] for the online documentation. Essentially we support three types of inference currently, your question is quite vague so hard to tell which of these if any might suit your needs. 1 - RDFS reasoning - given RDFS subclass, subproperty, range and domain information infer new triples based on these relations 2 - SKOS hierarchy reasoning - given SKOS broader and narrower information infer new triples based on the hierarchy 3 - N3 Rules reasoning - this is the most flexible reasoner and uses simple rules expresses in N3 style to reason new facts. This may be most appropriate for you, rules look like the following: { ?x a :Child } => { ?x a :Person } You can write more complex rules with a whole bunch of triples on either side with however many variables you want. If you want more information or help can you explain what type of inference you are looking to achieve Best Regards, Rob Vesse [1] http://dotnetrdf.org/content.asp?pageID=Inference%20and%20Reasoning ---------------------------------------- From: "Roberta Rascazzo" <ra...@ho...> Sent: Tuesday, November 29, 2011 7:31 AM To: rv...@do... Subject: dotnetRDF - inference hi Robert, I'm particularly interested in inference. I ' d like to know how can I use this "functionality" in dotnetRDF. what I would like to achieve is an inference on categories of persons. I think that I 'll write an RDF describing the categories and then I want to use inference. Can you give me some advice? Do you think that dotNetRDF can help me obtaining my goal? I congratulate you a lot for what you have made. Sincerely, Roberta |
From: Rob V. <rv...@do...> - 2011-11-29 00:52:48
|
Hi Mohammed I am unclear what you are asking here? Are you intending to build a system yourself using dotNetRDF in which case this should be your own academic effort though feel free to ask specific technical questions if you get stuck on something. Or do you just need to present an appropriate system? If this is the case then no I am not aware of any based upon dotNetRDF but a useful example would be Semantic MediaWiki [1] Hope this helps, if you have further questions please ask Rob Vesse [1] http://http://semantic-mediawiki.org/ ---------------------------------------- From: "Mohammed Eyad Fakhanee" <mh...@gm...> Sent: Monday, November 28, 2011 4:49 PM To: dot...@li... Subject: [dotNetRDF-Support] can you help me please hello every body i am a student in Master Web Science and now i prepare for my thesis which is in Subject of semantic web content managment and i should to present a sample project on any semantic web content managment system to show its features. can you help me please? is there any useful projects uses most rdffotnet librarry feather thanks any way -- Mohammed Eyad Fakhanee : Master Web Science Regards |
From: Rob V. <rv...@do...> - 2011-11-28 17:27:07
|
Ok, I see the problem right away. It's the fact that it says rdf:resource="rdf:nil" RDF/XML does not support the use of QNames inside attributes, what this attribute effectively does is set the object to <rdf:nil> rather than <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> which is what you were expecting. Where is this data coming from? It is the data that is bad, it should say rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" not what it says currently. If I run the following query I do get a result and this quite clearly highlights the fact that the data is not generating the URI you actually expected: SELECT * WHERE { ?s ?p <rdf:nil> } Hope this helps, Rob ---------------------------------------- From: "Glen Worrall" <gle...@bc...> Sent: Sunday, November 27, 2011 11:35 PM To: rv...@do..., "dotNetRDF User Help and Support" <dot...@li...> Subject: RE: [dotNetRDF-Support] rdf:nil in a triplestore oops ... certainly I am only talking about rdf:nil This file has rdf:nil where there is empty strings ... (I am not the owner of the format so I have to live with what it is) Glen From: Rob Vesse [mailto:rv...@do...] Sent: 28 November 2011 04:36 To: dotNetRDF User Help and Support Cc: Glen Worrall Subject: re: [dotNetRDF-Support] rdf:nil in a triplestore Hi Glen I am unable to reproduce this locally, I notice you mention rdf:nill and rdf:nil in your email interchangeably. Only the latter (rdf:nil - single L) is valid and will be matched. Are you sure your query is correct? If it is and you still aren't getting results can you send some sample data that you would expect to be matched by your query? Best Regards, Rob Vesse ---------------------------------------- From: "Glen Worrall" <gle...@bc...> Sent: 27 November 2011 19:44 To: dot...@li... Subject: [dotNetRDF-Support] rdf:nil in a triplestore I tested this with the SPARQL GUI also and get the same results querying for rdf:nill returns no results when a triplestore contains triples with rdf:nil prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT * WHERE { ?s ?p rdf:nil } will return nothing prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT * WHERE { ?s ?p ?o FILTER (?o = rdf:nil) } will also return nothing according to http://seaborne.blogspot.com/2011/03/updating-rdf-lists-with-sparql.html rdf:nill can be used as a normal term Is there a special way of handling rdf:nil ? Thanks Glen |
From: Mohammed E. F. <mh...@gm...> - 2011-11-28 15:17:51
|
hello every body i am a student in Master Web Science and now i prepare for my thesis which is in Subject of *semantic web content managment* and i should to present a sample project on any semantic web content managment system to show its features. can you help me please? is there any useful projects uses most rdffotnet librarry feather thanks any way -- Mohammed Eyad Fakhanee : *Master Web Science *Regards |
From: Rob V. <rv...@do...> - 2011-11-28 04:36:27
|
Hi Glen I am unable to reproduce this locally, I notice you mention rdf:nill and rdf:nil in your email interchangeably. Only the latter (rdf:nil - single L) is valid and will be matched. Are you sure your query is correct? If it is and you still aren't getting results can you send some sample data that you would expect to be matched by your query? Best Regards, Rob Vesse ---------------------------------------- From: "Glen Worrall" <gle...@bc...> Sent: 27 November 2011 19:44 To: dot...@li... Subject: [dotNetRDF-Support] rdf:nil in a triplestore I tested this with the SPARQL GUI also and get the same results querying for rdf:nill returns no results when a triplestore contains triples with rdf:nil prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT * WHERE { ?s ?p rdf:nil } will return nothing prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT * WHERE { ?s ?p ?o FILTER (?o = rdf:nil) } will also return nothing according to http://seaborne.blogspot.com/2011/03/updating-rdf-lists-with-sparql.html rdf:nill can be used as a normal term Is there a special way of handling rdf:nil ? Thanks Glen |
From: Glen W. <gle...@bc...> - 2011-11-28 03:43:40
|
I tested this with the SPARQL GUI also and get the same results querying for rdf:nill returns no results when a triplestore contains triples with rdf:nil prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT * WHERE { ?s ?p rdf:nil } will return nothing prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT * WHERE { ?s ?p ?o FILTER (?o = rdf:nil) } will also return nothing according to http://seaborne.blogspot.com/2011/03/updating-rdf-lists-with-sparql.html rdf:nill can be used as a normal term Is there a special way of handling rdf:nil ? Thanks Glen |
From: Rob V. <rv...@do...> - 2011-11-26 00:05:14
|
Hi Glen If the writer is outputting <type> instead of <rdf:type> this is almost certainly because you have the default namespace defined as the same as the rdf namespace and it finds the first appropriate namespace so in this case I'd assume the default namespace is defined before the rdf namespace. Without seeing the <rdf:RDF> element with all the xmlns definitions it is hard to say definitively. If what I've outlined is the case then the actual RDF outputs are equivalent, if you really want to force rdf:type you can ensure that you remove the default namespace from your graph prior to serializing it. Use g.NamespaceMap.RemoveNamespace(String.Empty) to achieve this. There's no option currently to not use the default namespace though this could probably be added in the future if it was deemed desireable. Hope this helps, Rob Vesse ---------------------------------------- From: "Glen Worrall" <gle...@bc...> Sent: 25 November 2011 08:03 To: dot...@li... Subject: [dotNetRDF-Support] <rdf:type> in RdfXmlWriter Dear Support, When using the RdfXMLWriter this seems to be ALMOST exactly what I need. However, it is noted that the writer outputs <owl:Thing rdf:about="http://example.org/#AIR_COOLED_HEAT_EXCHANGER.DGNEC::1566080000:: ECXA::2.ELEVATION"> <tpl:R10528152386 rdf:resource="http://rdl.rdlfacade.org/data#R36970488283" /> <tpl:R11450580697 rdf:resource="http://example.org/#AIR_COOLED_HEAT_EXCHANGER.DGNEC::156608000 0::ECXA::2" /> <tpl:R56806886394 rdf:resource="http://rdl.rdlfacade.org/data#R60277357355" /> <tpl:R65789235245>1001</tpl:R65789235245> <type rdf:resource="http://tpl.rdlfacade.org/data#R33612674560" /> </owl:Thing> when in reality I was expecting <owl:Thing rdf:about="http://example.org/#AIR_COOLED_HEAT_EXCHANGER.DGNEC::1566080000:: ECXA::2.ELEVATION"> <tpl:R10528152386 rdf:resource="http://rdl.rdlfacade.org/data#R36970488283" /> <tpl:R11450580697 rdf:resource="http://example.org/#AIR_COOLED_HEAT_EXCHANGER.DGNEC::156608000 0::ECXA::2" /> <tpl:R56806886394 rdf:resource="http://rdl.rdlfacade.org/data#R60277357355" /> <tpl:R65789235245>1001</tpl:R65789235245> <rdf:type rdf:resource="http://tpl.rdlfacade.org/data#R33612674560" /> </owl:Thing> Is there a special reason the Writer outputs <type> rather than <rdf:type> If I wanted to output <rdf:type> what do I need to do ? Do I have to create a new RdfXmlFormatter ? and if so ... can I start with the current one ? I am hoping this is an option and I just need to set a switch somewhere. I have tested every CompressionLevel, but this makes no difference, however, there are quite a few settings on the TripleFormatterType, but I am not sure that is where to look. TIA Glen |
From: Glen W. <gle...@bc...> - 2011-11-25 16:03:04
|
Dear Support, When using the RdfXMLWriter this seems to be ALMOST exactly what I need. However, it is noted that the writer outputs <owl:Thing rdf:about="http://example.org/#AIR_COOLED_HEAT_EXCHANGER.DGNEC::1566080000:: ECXA::2.ELEVATION"> <tpl:R10528152386 rdf:resource="http://rdl.rdlfacade.org/data#R36970488283" /> <tpl:R11450580697 rdf:resource="http://example.org/#AIR_COOLED_HEAT_EXCHANGER.DGNEC::156608000 0::ECXA::2" /> <tpl:R56806886394 rdf:resource="http://rdl.rdlfacade.org/data#R60277357355" /> <tpl:R65789235245>1001</tpl:R65789235245> <type rdf:resource="http://tpl.rdlfacade.org/data#R33612674560" /> </owl:Thing> when in reality I was expecting <owl:Thing rdf:about="http://example.org/#AIR_COOLED_HEAT_EXCHANGER.DGNEC::1566080000:: ECXA::2.ELEVATION"> <tpl:R10528152386 rdf:resource="http://rdl.rdlfacade.org/data#R36970488283" /> <tpl:R11450580697 rdf:resource="http://example.org/#AIR_COOLED_HEAT_EXCHANGER.DGNEC::156608000 0::ECXA::2" /> <tpl:R56806886394 rdf:resource="http://rdl.rdlfacade.org/data#R60277357355" /> <tpl:R65789235245>1001</tpl:R65789235245> <rdf:type rdf:resource="http://tpl.rdlfacade.org/data#R33612674560" /> </owl:Thing> Is there a special reason the Writer outputs <type> rather than <rdf:type> If I wanted to output <rdf:type> what do I need to do ? Do I have to create a new RdfXmlFormatter ? and if so ... can I start with the current one ? I am hoping this is an option and I just need to set a switch somewhere. I have tested every CompressionLevel, but this makes no difference, however, there are quite a few settings on the TripleFormatterType, but I am not sure that is where to look. TIA Glen |
From: Rob V. <rv...@do...> - 2011-11-22 17:19:01
|
Hi Glen Re: Triple Store writers, yes some of them are designed to use multiple threads by default, some (but not all currently) allow you to switch them into single threaded mode via the IMultiThreadedWriter interface. I've raised an issue in our tracker (CORE-147) to have all triple store writers support single threaded writing for the next release [1] Wrt to your code example I would make the following comments: Iterating over the entire graph is not the best option especially as the graph gets larger. You should really generate nodes for the parts of the triples you are trying to match and then use one of the GetTriplesWithXY() methods. For most graph implementations these lookups are indexed and so will be significantly faster. If you know you are going to retract the selected triples you can even do something like g.Retract(g.GetTriplesWithXY().ToList()); Note the use of ToList() to avoid getting error messages about modifying a collection. You should compare nodes by value using the Equals() method not by comparing strings, the string forms of nodes are subject to collisions and won't properly account for the RDF rules on term equality e.g. INode uri = g.CreateUriNode(new Uri("http://example.org")); INode lit = g.CreateLiteralNode("http://example.org")); Console.WriteLine(uri.ToString().Equals(lit.ToString())); //Prints true which is incorrect Console.WriteLine(uri.Equals(lit)); //Prints false which is correct Also particularly when you get into URIs there are normalization and other concerns, e.g. http://example.org:80 would be considered equal to http://example.org via Equals() but not if you do string equality they will not be considered equal. As far as the RDF/XML output goes the nsXXX is the writer doing its job, if there is no suitable namespace defined in the graphs namespace map the writer must invent prefixes in order to serialize things, this has to follow XML namespace scoping rules so it may end up generating a ton of prefixes for the same namespace. This is in part due to the fact that the writer is designed to be a single pass writer (as far as possible), in order to determine that there is a frequently used undeclared namespace we'd have to do an extra pass over the graph which would be very costly for large graphs. You can avoid this behavior by declaring any required namespaces explicitly, if the graph is loaded from a file then any namespaces found there should be present in the resulting graph. Regards, Rob [1]: http://www.dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=147 ---------------------------------------- From: "Glen Worrall" <gle...@bc...> Sent: Tuesday, November 22, 2011 5:49 AM To: "dotNetRDF User Help and Support" <dot...@li...> Subject: Re: [dotNetRDF-Support] DELETE QUERY Hi Rob, FYI .... the following code is updating the graph as I expect and storing only a single value in the resultant RDF/XML file, i.e. working as I need ...(although I need to now test downstream use of the file ... ) However .... is it efficient ? Is it the best way ? Note I also have to revisit this as it is NOT working for strings, but that may be something special for the strings that are being displayed as other strings have not been classified correctly. I read that the nodes are immutable so I need to retract and assert rather than If aTriple.Object.NodeType = NodeType.Literal Then aTriple.Object.Value = szLiteral Public Sub UpdateRDF(ByVal szKey As String, ByVal szProperty As String, ByVal szLiteral As String) ' v2 : update the graph ' OIMGraph has the graph ' lets try getting the triples with the szKey and szProperty Dim tmpGraph As New Graph Dim tsResults As Triple() Dim aTriple As Triple, tplKey As Triple, tplProperty As Triple Dim szSubject As String, szPredicate As String Dim ndSubject As VDS.RDF.UriNode Dim ndPredicate As VDS.RDF.UriNode Dim szNS As String Dim iPos As Integer szSubject = "" szPredicate = "" For Each aTriple In OIMGraph.Triples If aTriple.Object.ToString = szKey Then tplKey = aTriple szSubject = tplKey.Subject.ToString szPredicate = "" End If If aTriple.Object.ToString = szProperty Then If szSubject = aTriple.Subject.ToString Then tplProperty = aTriple szPredicate = tplProperty.Subject.ToString Else szSubject = "" szPredicate = "" End If End If If szSubject <> "" And szPredicate <> "" Then If aTriple.Object.NodeType = NodeType.Literal Then OIMGraph.Retract(aTriple) Dim nodNew As LiteralNode nodNew = OIMGraph.CreateLiteralNode(szLiteral) Dim tplNew As New Triple(aTriple.Subject, aTriple.Predicate, nodNew) OIMGraph.Assert(tplNew) ' note we have altered the collection so we have to exit !! Exit For End If Debug.Print("<SUBJ:" & aTriple.Subject.ToString & "><PRED:" & aTriple.Predicate.ToString & "><OBJC:" & aTriple.Object.ToString & ">") End If Next End Sub Feedback welcome ... Glen From: Glen Worrall [mailto:gle...@bc...] Sent: 22 November 2011 06:56 To: dot...@li... Subject: Re: [dotNetRDF-Support] DELETE QUERY Thanks Rob, FYI the TripleStore Writers do not work with VB.NET WinForm applications http://www.vbforums.com/showthread.php?t=552398 Therefore ... apologies ... for what is about to follow ... This is meant to delete the original triple ... szSPARQLDelete = szPrefix & "DELETE DATA {" & _ szSubject & " " & szPredicate & " " & szObject & "}" aTripleStore.ExecuteUpdate(szSPARQLDelete) i = InStr(szObject, "^^") szObject = szLiteral '& Mid$(szObject, i) ' .substring seems to return 1 char short 'nObject = OIMGraph.CreateLiteralNode(szObject) 'and replace it with the new value szSPARQLInsert = szPrefix & "INSERT DATA {" & _ szSubject & " " & szPredicate & " " & szObject & "}" 'OIMGraph.Assert(New Triple(nSubject, nPredicate, nObject)) aTripleStore.ExecuteUpdate(szSPARQLInsert) ' TripleStoreWriters all cause an issue with WinForms ' Dim rdfWriter As New TriGWriter ' aTripleStore.SaveToFile("d:\data\testing.trig", rdfWriter) ' Dim rdfWriterX As New TriXWriter ' aTripleStore.SaveToFile("d:\data\testing.trix", rdfWriter) ' Dim rdfWriterN As New NQuadsWriter ' aTripleStore.SaveToFile("d:\data\testing.trin", rdfWriterN) ' so we need to create a graph from the triplestore !! SaveRDF("d:\data\testing.owl", aTripleStore) End If End Sub Public Sub SaveRDF(ByVal szFilename As String, ByVal aTripleStore As TripleStore) ' aTripleStore.SaveToFile(szFilename) ha if only Dim rdfWriter As New RdfXmlWriter Dim sparqlparser As New SparqlQueryParser Dim query As SparqlQuery Dim results As Object query = sparqlparser.ParseFromString("CONSTRUCT { ?s ?p ?o } WHERE {?s ?p ?o}") results = aTripleStore.ExecuteQuery(query) If (results.GetType.ToString = "VDS.RDF.Graph") Then rdfWriter.Save(results, szFilename) End If End Sub All runs .... but ... note the edited triple <ns0:Thing rdf:about="http://example.org/data#GATE_VALVE.DGNEC__1543070000__ECXA__2.DRY _WEIGHT"> <ns63:R10528152386 xmlns:ns63="http://tpl.rdlfacade.org/data#" rdf:resource="http://rdl.rdlfacade.org/data#R39123699723" /> <ns64:R11450580697 xmlns:ns64="http://tpl.rdlfacade.org/data#" rdf:resource="http://example.org/data#GATE_VALVE.DGNEC__1543070000__ECXA__2" /> <ns65:R56806886394 xmlns:ns65="http://tpl.rdlfacade.org/data#" rdf:resource="http://rdl.rdlfacade.org/data#R66709707623" /> <ns66:R65789235245 xmlns:ns66="http://tpl.rdlfacade.org/data#" rdf:datatype="&xsd;float">0</ns66:R65789235245> <rdf:type rdf:resource="http://tpl.rdlfacade.org/data#R33612674560" /> <xsd:R65789235245 rdf:datatype="&xsd;integer">70</xsd:R65789235245> </ns0:Thing> compared to an unedited triple <ns0:Thing rdf:about="http://example.org/data#HORIZONTAL_CENTRIFUGAL_PUMP.DGNEC__151607 0000__ECXA__2.DRY_WEIGHT"> <ns136:R10528152386 xmlns:ns136="http://tpl.rdlfacade.org/data#" rdf:resource="http://rdl.rdlfacade.org/data#R39123699723" /> <ns137:R11450580697 xmlns:ns137="http://tpl.rdlfacade.org/data#" rdf:resource="http://example.org/data#HORIZONTAL_CENTRIFUGAL_PUMP.DGNEC__151 6070000__ECXA__2" /> <ns138:R56806886394 xmlns:ns138="http://tpl.rdlfacade.org/data#" rdf:resource="http://rdl.rdlfacade.org/data#R66709707623" /> <ns139:R65789235245 xmlns:ns139="http://tpl.rdlfacade.org/data#" rdf:datatype="&xsd;float">0</ns139:R65789235245> <rdf:type rdf:resource="http://tpl.rdlfacade.org/data#R33612674560" /> </ns0:Thing> the original value and new value are stored ... Note also the nsxxx peculiarity ... Glen From: Rob Vesse [mailto:rv...@do...] Sent: 21 November 2011 17:40 To: Glen Worrall Subject: RE: DELETE QUERY Hi Glen SPARQL Query and Update are two separate standards and so the library handles them separately. If you want to run updates then you need to use the ExecuteUpdate() method instead. See [1] for alternative ways to apply updates. If you want to create typed literals then you need to use the two argument version of CreateLiteralNode() which takes a URI as the second argument for the datatype. Or if you have .Net primitive types you can use the ToLiteral() extension methods to turn these directly into literals with appropriate types. SparqlGUI was designed as a query only tool, I may add update to it in the future but currently it does not support this. If you have further questions please let me know, Rob Vesse [1]: http://www.dotnetrdf.org/content.asp?pageID=Updating%20with%20SPARQL ---------------------------------------- From: "Glen Worrall" <gle...@bc...> Sent: Monday, November 21, 2011 9:13 AM To: rv...@do... Subject: RE: DELETE QUERY Hi Rob, Just to let you know I have been trying this with other options ... If szSubject <> "" Then szPrefix = "" ' seems that the subject. predicate, object MUST have a qualifier ... !!! iPos = InStr(szSubject, "#") szQualifier = Mid$(szSubject, 1, iPos) szURI = New Uri(szQualifier) szNS = OIMGraph.NamespaceMap.GetPrefix(szURI) If szNS = "" Then szNS = "ns" & gNSCounter.ToString OIMGraph.NamespaceMap.AddNamespace(szNS, szURI) gNSCounter = gNSCounter + 1 End If 'szPrefix = "PREFIX q1: <" & szQualifier & "> " szSubject = szNS & ":" & Mid$(szSubject, iPos + 1) iPos = InStr(szPredicate, "#") szQualifier = Mid$(szPredicate, 1, iPos) szURI = New Uri(szQualifier) szNS = OIMGraph.NamespaceMap.GetPrefix(szURI) If szNS = "" Then szNS = "ns" & gNSCounter.ToString OIMGraph.NamespaceMap.AddNamespace(szNS, szURI) gNSCounter = gNSCounter + 1 End If 'szPrefix = szPrefix & "PREFIX q2: <" & szQualifier & "> " szPredicate = szNS & ":" & Mid$(szPredicate, iPos + 1) i = InStr(szObject, "^^") iPos = InStr(szObject, "#") ' note we cannot get here unless Object is a Literal ... !!! szQualifier = Mid$(szObject, i + 2, iPos - i - 1) ' szPrefix = szPrefix & "PREFIX q3: <" & szQualifier & "> " szURI = New Uri(szQualifier) szNS = OIMGraph.NamespaceMap.GetPrefix(szURI) If szNS = "" Then szNS = "ns" & gNSCounter.ToString OIMGraph.NamespaceMap.AddNamespace(szNS, szURI) gNSCounter = gNSCounter + 1 End If szObject = Mid$(szObject, 1, i - 1) & "^^" & szNS & ":" & Mid$(szObject, (iPos + 1)) nSubject = OIMGraph.CreateUriNode(szSubject) nPredicate = OIMGraph.CreateUriNode(szPredicate) nObject = OIMGraph.CreateLiteralNode(szObject) OIMGraph.Retract(New Triple(nSubject, nPredicate, nObject)) ' the following fails ... seems execute query cannot work with DELETE & INSERT ' szSPARQLDelete = szPrefix & "DELETE DATA WHERE {" & _ ' szSubject & " " & szPredicate & " " & szObject & "}" ' aTripleStore.ExecuteQuery(szSPARQLDelete) i = InStr(szObject, "^^") szObject = szLiteral & Mid$(szObject, i) ' .substring seems to return 1 char short nObject = OIMGraph.CreateLiteralNode(szObject) 'szSPARQLInsert = szPrefix & "INSERT DATA {" & _ ' szSubject & " " & szPredicate & " " & szObject & "}" OIMGraph.Assert(New Triple(nSubject, nPredicate, nObject)) Gets me much closer .... but the RDF file now has double values .... Note an edited value ... <owl:Thing rdf:about="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2.INSIDE_DIAMETER"> <tpl:R10528152386 rdf:resource="&part4;R34755432270" /> <tpl:R11450580697 rdf:resource="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2" /> <tpl:R56806886394 rdf:resource="&part4;R37466989245" /> <tpl:R65789235245>100^^xsd:float</tpl:R65789235245> <tpl:R65789235245 rdf:datatype="&xsd;float">0</tpl:R65789235245> <type rdf:resource="&tpl;R33612674560" /> </owl:Thing> Unedited <owl:Thing rdf:about="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2.INSULATION_THICKNESS"> <tpl:R10528152386 rdf:resource="&part4;R34755432270" /> <tpl:R11450580697 rdf:resource="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2" /> <tpl:R56806886394 rdf:resource="&part4;R93517282348" /> <tpl:R65789235245 rdf:datatype="&xsd;float">0</tpl:R65789235245> <type rdf:resource="&tpl;R33612674560" /> </owl:Thing> If I remove the "additional" incorrect triple from the property graph ... then <owl:Thing rdf:about="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2.ELEVATION"> <tpl:R10528152386 rdf:resource="&part4;R82749412674" /> <tpl:R11450580697 rdf:resource="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2" /> <tpl:R56806886394 rdf:resource="&part4;R60277357355" /> <tpl:R65789235245>1000^^xsd:float</tpl:R65789235245> <type rdf:resource="&tpl;R33612674560" /> </owl:Thing> This prevents my app from working (ie it no longer recognises literal values) Again I am just looking for a "best" practice rather than debugging my examples Thanks Glen _____________________________________________ From: Glen Worrall [mailto:gle...@bc...] Sent: 21 November 2011 09:50 To: 'rv...@do...' Subject: DELETE QUERY Hi Rob, sorry to bother you but wanted to check if the DELETE option in a SPARQL query is working in dotNETRDF ... I have tried various modifications etc to my file and seem to now get the same error in my code as in the SPARQL GUI PREFIX ex: <http://example.org/data#> PREFIX tpl: <http://tpl.rdlfacade.org/data#> PREFIX xmlschema: <http://www.w3.org/2001/XMLSchema#> DELETE {ex:GATE_VALVE.DGNEC__1543070000__ECXA__2.DRY_WEIGHT tpl:R65789235245 0^^xmlschema:float} Note the prefixes have been created otherwise I received example.org is not a valid QName exception. Really all I want to do is update the literal in the triple store and then write out the file ... ie open OWL file display literals to user edit literals as required save OWL file to .OWL file Is DELETE supported in TripleStore.ExecuteSQL(query as String) ? I can of course send you the .OWL file I am using for testing Thanks Glen |
From: Glen W. <gle...@bc...> - 2011-11-22 13:48:56
|
Hi Rob, FYI .... the following code is updating the graph as I expect and storing only a single value in the resultant RDF/XML file, i.e. working as I need ...(although I need to now test downstream use of the file ... ) However .... is it efficient ? Is it the best way ? Note I also have to revisit this as it is NOT working for strings, but that may be something special for the strings that are being displayed as other strings have not been classified correctly. I read that the nodes are immutable so I need to retract and assert rather than If aTriple.Object.NodeType = NodeType.Literal Then aTriple.Object.Value = szLiteral Public Sub UpdateRDF(ByVal szKey As String, ByVal szProperty As String, ByVal szLiteral As String) ' v2 : update the graph ' OIMGraph has the graph ' lets try getting the triples with the szKey and szProperty Dim tmpGraph As New Graph Dim tsResults As Triple() Dim aTriple As Triple, tplKey As Triple, tplProperty As Triple Dim szSubject As String, szPredicate As String Dim ndSubject As VDS.RDF.UriNode Dim ndPredicate As VDS.RDF.UriNode Dim szNS As String Dim iPos As Integer szSubject = "" szPredicate = "" For Each aTriple In OIMGraph.Triples If aTriple.Object.ToString = szKey Then tplKey = aTriple szSubject = tplKey.Subject.ToString szPredicate = "" End If If aTriple.Object.ToString = szProperty Then If szSubject = aTriple.Subject.ToString Then tplProperty = aTriple szPredicate = tplProperty.Subject.ToString Else szSubject = "" szPredicate = "" End If End If If szSubject <> "" And szPredicate <> "" Then If aTriple.Object.NodeType = NodeType.Literal Then OIMGraph.Retract(aTriple) Dim nodNew As LiteralNode nodNew = OIMGraph.CreateLiteralNode(szLiteral) Dim tplNew As New Triple(aTriple.Subject, aTriple.Predicate, nodNew) OIMGraph.Assert(tplNew) ' note we have altered the collection so we have to exit !! Exit For End If Debug.Print("<SUBJ:" & aTriple.Subject.ToString & "><PRED:" & aTriple.Predicate.ToString & "><OBJC:" & aTriple.Object.ToString & ">") End If Next End Sub Feedback welcome ... Glen From: Glen Worrall [mailto:gle...@bc...] Sent: 22 November 2011 06:56 To: dot...@li... Subject: Re: [dotNetRDF-Support] DELETE QUERY Thanks Rob, FYI the TripleStore Writers do not work with VB.NET WinForm applications http://www.vbforums.com/showthread.php?t=552398 Therefore ... apologies ... for what is about to follow ... This is meant to delete the original triple ... szSPARQLDelete = szPrefix & "DELETE DATA {" & _ szSubject & " " & szPredicate & " " & szObject & "}" aTripleStore.ExecuteUpdate(szSPARQLDelete) i = InStr(szObject, "^^") szObject = szLiteral '& Mid$(szObject, i) ' .substring seems to return 1 char short 'nObject = OIMGraph.CreateLiteralNode(szObject) 'and replace it with the new value szSPARQLInsert = szPrefix & "INSERT DATA {" & _ szSubject & " " & szPredicate & " " & szObject & "}" 'OIMGraph.Assert(New Triple(nSubject, nPredicate, nObject)) aTripleStore.ExecuteUpdate(szSPARQLInsert) ' TripleStoreWriters all cause an issue with WinForms ' Dim rdfWriter As New TriGWriter ' aTripleStore.SaveToFile("d:\data\testing.trig", rdfWriter) ' Dim rdfWriterX As New TriXWriter ' aTripleStore.SaveToFile("d:\data\testing.trix", rdfWriter) ' Dim rdfWriterN As New NQuadsWriter ' aTripleStore.SaveToFile("d:\data\testing.trin", rdfWriterN) ' so we need to create a graph from the triplestore !! SaveRDF("d:\data\testing.owl", aTripleStore) End If End Sub Public Sub SaveRDF(ByVal szFilename As String, ByVal aTripleStore As TripleStore) ' aTripleStore.SaveToFile(szFilename) ha if only Dim rdfWriter As New RdfXmlWriter Dim sparqlparser As New SparqlQueryParser Dim query As SparqlQuery Dim results As Object query = sparqlparser.ParseFromString("CONSTRUCT { ?s ?p ?o } WHERE {?s ?p ?o}") results = aTripleStore.ExecuteQuery(query) If (results.GetType.ToString = "VDS.RDF.Graph") Then rdfWriter.Save(results, szFilename) End If End Sub All runs .... but ... note the edited triple <ns0:Thing rdf:about="http://example.org/data#GATE_VALVE.DGNEC__1543070000__ECXA__2.DRY _WEIGHT"> <ns63:R10528152386 xmlns:ns63="http://tpl.rdlfacade.org/data#" rdf:resource="http://rdl.rdlfacade.org/data#R39123699723" /> <ns64:R11450580697 xmlns:ns64="http://tpl.rdlfacade.org/data#" rdf:resource="http://example.org/data#GATE_VALVE.DGNEC__1543070000__ECXA__2" /> <ns65:R56806886394 xmlns:ns65="http://tpl.rdlfacade.org/data#" rdf:resource="http://rdl.rdlfacade.org/data#R66709707623" /> <ns66:R65789235245 xmlns:ns66="http://tpl.rdlfacade.org/data#" rdf:datatype="&xsd;float">0</ns66:R65789235245> <rdf:type rdf:resource="http://tpl.rdlfacade.org/data#R33612674560" /> <xsd:R65789235245 rdf:datatype="&xsd;integer">70</xsd:R65789235245> </ns0:Thing> compared to an unedited triple <ns0:Thing rdf:about="http://example.org/data#HORIZONTAL_CENTRIFUGAL_PUMP.DGNEC__151607 0000__ECXA__2.DRY_WEIGHT"> <ns136:R10528152386 xmlns:ns136="http://tpl.rdlfacade.org/data#" rdf:resource="http://rdl.rdlfacade.org/data#R39123699723" /> <ns137:R11450580697 xmlns:ns137="http://tpl.rdlfacade.org/data#" rdf:resource="http://example.org/data#HORIZONTAL_CENTRIFUGAL_PUMP.DGNEC__151 6070000__ECXA__2" /> <ns138:R56806886394 xmlns:ns138="http://tpl.rdlfacade.org/data#" rdf:resource="http://rdl.rdlfacade.org/data#R66709707623" /> <ns139:R65789235245 xmlns:ns139="http://tpl.rdlfacade.org/data#" rdf:datatype="&xsd;float">0</ns139:R65789235245> <rdf:type rdf:resource="http://tpl.rdlfacade.org/data#R33612674560" /> </ns0:Thing> the original value and new value are stored ... Note also the nsxxx peculiarity ... Glen From: Rob Vesse [mailto:rv...@do...] Sent: 21 November 2011 17:40 To: Glen Worrall Subject: RE: DELETE QUERY Hi Glen SPARQL Query and Update are two separate standards and so the library handles them separately. If you want to run updates then you need to use the ExecuteUpdate() method instead. See [1] for alternative ways to apply updates. If you want to create typed literals then you need to use the two argument version of CreateLiteralNode() which takes a URI as the second argument for the datatype. Or if you have .Net primitive types you can use the ToLiteral() extension methods to turn these directly into literals with appropriate types. SparqlGUI was designed as a query only tool, I may add update to it in the future but currently it does not support this. If you have further questions please let me know, Rob Vesse [1]: http://www.dotnetrdf.org/content.asp?pageID=Updating%20with%20SPARQL _____ From: "Glen Worrall" <gle...@bc...> Sent: Monday, November 21, 2011 9:13 AM To: rv...@do... Subject: RE: DELETE QUERY Hi Rob, Just to let you know I have been trying this with other options ... If szSubject <> "" Then szPrefix = "" ' seems that the subject. predicate, object MUST have a qualifier ... !!! iPos = InStr(szSubject, "#") szQualifier = Mid$(szSubject, 1, iPos) szURI = New Uri(szQualifier) szNS = OIMGraph.NamespaceMap.GetPrefix(szURI) If szNS = "" Then szNS = "ns" & gNSCounter.ToString OIMGraph.NamespaceMap.AddNamespace(szNS, szURI) gNSCounter = gNSCounter + 1 End If 'szPrefix = "PREFIX q1: <" & szQualifier & "> " szSubject = szNS & ":" & Mid$(szSubject, iPos + 1) iPos = InStr(szPredicate, "#") szQualifier = Mid$(szPredicate, 1, iPos) szURI = New Uri(szQualifier) szNS = OIMGraph.NamespaceMap.GetPrefix(szURI) If szNS = "" Then szNS = "ns" & gNSCounter.ToString OIMGraph.NamespaceMap.AddNamespace(szNS, szURI) gNSCounter = gNSCounter + 1 End If 'szPrefix = szPrefix & "PREFIX q2: <" & szQualifier & "> " szPredicate = szNS & ":" & Mid$(szPredicate, iPos + 1) i = InStr(szObject, "^^") iPos = InStr(szObject, "#") ' note we cannot get here unless Object is a Literal ... !!! szQualifier = Mid$(szObject, i + 2, iPos - i - 1) ' szPrefix = szPrefix & "PREFIX q3: <" & szQualifier & "> " szURI = New Uri(szQualifier) szNS = OIMGraph.NamespaceMap.GetPrefix(szURI) If szNS = "" Then szNS = "ns" & gNSCounter.ToString OIMGraph.NamespaceMap.AddNamespace(szNS, szURI) gNSCounter = gNSCounter + 1 End If szObject = Mid$(szObject, 1, i - 1) & "^^" & szNS & ":" & Mid$(szObject, (iPos + 1)) nSubject = OIMGraph.CreateUriNode(szSubject) nPredicate = OIMGraph.CreateUriNode(szPredicate) nObject = OIMGraph.CreateLiteralNode(szObject) OIMGraph.Retract(New Triple(nSubject, nPredicate, nObject)) ' the following fails ... seems execute query cannot work with DELETE & INSERT ' szSPARQLDelete = szPrefix & "DELETE DATA WHERE {" & _ ' szSubject & " " & szPredicate & " " & szObject & "}" ' aTripleStore.ExecuteQuery(szSPARQLDelete) i = InStr(szObject, "^^") szObject = szLiteral & Mid$(szObject, i) ' .substring seems to return 1 char short nObject = OIMGraph.CreateLiteralNode(szObject) 'szSPARQLInsert = szPrefix & "INSERT DATA {" & _ ' szSubject & " " & szPredicate & " " & szObject & "}" OIMGraph.Assert(New Triple(nSubject, nPredicate, nObject)) Gets me much closer .... but the RDF file now has double values .... Note an edited value ... <owl:Thing rdf:about="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2.INSIDE_DIAMETER"> <tpl:R10528152386 rdf:resource="&part4;R34755432270" /> <tpl:R11450580697 rdf:resource="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2" /> <tpl:R56806886394 rdf:resource="&part4;R37466989245" /> <tpl:R65789235245>100^^xsd:float</tpl:R65789235245> <tpl:R65789235245 rdf:datatype="&xsd;float">0</tpl:R65789235245> <type rdf:resource="&tpl;R33612674560" /> </owl:Thing> Unedited <owl:Thing rdf:about="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2.INSULATION_THICKNESS"> <tpl:R10528152386 rdf:resource="&part4;R34755432270" /> <tpl:R11450580697 rdf:resource="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2" /> <tpl:R56806886394 rdf:resource="&part4;R93517282348" /> <tpl:R65789235245 rdf:datatype="&xsd;float">0</tpl:R65789235245> <type rdf:resource="&tpl;R33612674560" /> </owl:Thing> If I remove the "additional" incorrect triple from the property graph ... then <owl:Thing rdf:about="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2.ELEVATION"> <tpl:R10528152386 rdf:resource="&part4;R82749412674" /> <tpl:R11450580697 rdf:resource="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2" /> <tpl:R56806886394 rdf:resource="&part4;R60277357355" /> <tpl:R65789235245>1000^^xsd:float</tpl:R65789235245> <type rdf:resource="&tpl;R33612674560" /> </owl:Thing> This prevents my app from working (ie it no longer recognises literal values) Again I am just looking for a "best" practice rather than debugging my examples Thanks Glen _____________________________________________ From: Glen Worrall [mailto:gle...@bc...] Sent: 21 November 2011 09:50 To: 'rv...@do...' Subject: DELETE QUERY Hi Rob, sorry to bother you but wanted to check if the DELETE option in a SPARQL query is working in dotNETRDF ... I have tried various modifications etc to my file and seem to now get the same error in my code as in the SPARQL GUI PREFIX ex: < <http://example.org/data> http://example.org/data#> PREFIX tpl: < <http://tpl.rdlfacade.org/data> http://tpl.rdlfacade.org/data#> PREFIX xmlschema: < <http://www.w3.org/2001/XMLSchema> http://www.w3.org/2001/XMLSchema#> DELETE {ex:GATE_VALVE.DGNEC__1543070000__ECXA__2.DRY_WEIGHT tpl:R65789235245 0^^xmlschema:float} Note the prefixes have been created otherwise I received example.org is not a valid QName exception. Really all I want to do is update the literal in the triple store and then write out the file ... ie open OWL file display literals to user edit literals as required save OWL file to .OWL file Is DELETE supported in TripleStore.ExecuteSQL(query as String) ? I can of course send you the .OWL file I am using for testing Thanks Glen |
From: Glen W. <gle...@bc...> - 2011-11-22 06:56:12
|
Thanks Rob, FYI the TripleStore Writers do not work with VB.NET WinForm applications http://www.vbforums.com/showthread.php?t=552398 Therefore ... apologies ... for what is about to follow ... This is meant to delete the original triple ... szSPARQLDelete = szPrefix & "DELETE DATA {" & _ szSubject & " " & szPredicate & " " & szObject & "}" aTripleStore.ExecuteUpdate(szSPARQLDelete) i = InStr(szObject, "^^") szObject = szLiteral '& Mid$(szObject, i) ' .substring seems to return 1 char short 'nObject = OIMGraph.CreateLiteralNode(szObject) 'and replace it with the new value szSPARQLInsert = szPrefix & "INSERT DATA {" & _ szSubject & " " & szPredicate & " " & szObject & "}" 'OIMGraph.Assert(New Triple(nSubject, nPredicate, nObject)) aTripleStore.ExecuteUpdate(szSPARQLInsert) ' TripleStoreWriters all cause an issue with WinForms ' Dim rdfWriter As New TriGWriter ' aTripleStore.SaveToFile("d:\data\testing.trig", rdfWriter) ' Dim rdfWriterX As New TriXWriter ' aTripleStore.SaveToFile("d:\data\testing.trix", rdfWriter) ' Dim rdfWriterN As New NQuadsWriter ' aTripleStore.SaveToFile("d:\data\testing.trin", rdfWriterN) ' so we need to create a graph from the triplestore !! SaveRDF("d:\data\testing.owl", aTripleStore) End If End Sub Public Sub SaveRDF(ByVal szFilename As String, ByVal aTripleStore As TripleStore) ' aTripleStore.SaveToFile(szFilename) ha if only Dim rdfWriter As New RdfXmlWriter Dim sparqlparser As New SparqlQueryParser Dim query As SparqlQuery Dim results As Object query = sparqlparser.ParseFromString("CONSTRUCT { ?s ?p ?o } WHERE {?s ?p ?o}") results = aTripleStore.ExecuteQuery(query) If (results.GetType.ToString = "VDS.RDF.Graph") Then rdfWriter.Save(results, szFilename) End If End Sub All runs .... but ... note the edited triple <ns0:Thing rdf:about="http://example.org/data#GATE_VALVE.DGNEC__1543070000__ECXA__2.DRY _WEIGHT"> <ns63:R10528152386 xmlns:ns63="http://tpl.rdlfacade.org/data#" rdf:resource="http://rdl.rdlfacade.org/data#R39123699723" /> <ns64:R11450580697 xmlns:ns64="http://tpl.rdlfacade.org/data#" rdf:resource="http://example.org/data#GATE_VALVE.DGNEC__1543070000__ECXA__2" /> <ns65:R56806886394 xmlns:ns65="http://tpl.rdlfacade.org/data#" rdf:resource="http://rdl.rdlfacade.org/data#R66709707623" /> <ns66:R65789235245 xmlns:ns66="http://tpl.rdlfacade.org/data#" rdf:datatype="&xsd;float">0</ns66:R65789235245> <rdf:type rdf:resource="http://tpl.rdlfacade.org/data#R33612674560" /> <xsd:R65789235245 rdf:datatype="&xsd;integer">70</xsd:R65789235245> </ns0:Thing> compared to an unedited triple <ns0:Thing rdf:about="http://example.org/data#HORIZONTAL_CENTRIFUGAL_PUMP.DGNEC__151607 0000__ECXA__2.DRY_WEIGHT"> <ns136:R10528152386 xmlns:ns136="http://tpl.rdlfacade.org/data#" rdf:resource="http://rdl.rdlfacade.org/data#R39123699723" /> <ns137:R11450580697 xmlns:ns137="http://tpl.rdlfacade.org/data#" rdf:resource="http://example.org/data#HORIZONTAL_CENTRIFUGAL_PUMP.DGNEC__151 6070000__ECXA__2" /> <ns138:R56806886394 xmlns:ns138="http://tpl.rdlfacade.org/data#" rdf:resource="http://rdl.rdlfacade.org/data#R66709707623" /> <ns139:R65789235245 xmlns:ns139="http://tpl.rdlfacade.org/data#" rdf:datatype="&xsd;float">0</ns139:R65789235245> <rdf:type rdf:resource="http://tpl.rdlfacade.org/data#R33612674560" /> </ns0:Thing> the original value and new value are stored ... Note also the nsxxx peculiarity ... Glen From: Rob Vesse [mailto:rv...@do...] Sent: 21 November 2011 17:40 To: Glen Worrall Subject: RE: DELETE QUERY Hi Glen SPARQL Query and Update are two separate standards and so the library handles them separately. If you want to run updates then you need to use the ExecuteUpdate() method instead. See [1] for alternative ways to apply updates. If you want to create typed literals then you need to use the two argument version of CreateLiteralNode() which takes a URI as the second argument for the datatype. Or if you have .Net primitive types you can use the ToLiteral() extension methods to turn these directly into literals with appropriate types. SparqlGUI was designed as a query only tool, I may add update to it in the future but currently it does not support this. If you have further questions please let me know, Rob Vesse [1]: http://www.dotnetrdf.org/content.asp?pageID=Updating%20with%20SPARQL _____ From: "Glen Worrall" <gle...@bc...> Sent: Monday, November 21, 2011 9:13 AM To: rv...@do... Subject: RE: DELETE QUERY Hi Rob, Just to let you know I have been trying this with other options ... If szSubject <> "" Then szPrefix = "" ' seems that the subject. predicate, object MUST have a qualifier ... !!! iPos = InStr(szSubject, "#") szQualifier = Mid$(szSubject, 1, iPos) szURI = New Uri(szQualifier) szNS = OIMGraph.NamespaceMap.GetPrefix(szURI) If szNS = "" Then szNS = "ns" & gNSCounter.ToString OIMGraph.NamespaceMap.AddNamespace(szNS, szURI) gNSCounter = gNSCounter + 1 End If 'szPrefix = "PREFIX q1: <" & szQualifier & "> " szSubject = szNS & ":" & Mid$(szSubject, iPos + 1) iPos = InStr(szPredicate, "#") szQualifier = Mid$(szPredicate, 1, iPos) szURI = New Uri(szQualifier) szNS = OIMGraph.NamespaceMap.GetPrefix(szURI) If szNS = "" Then szNS = "ns" & gNSCounter.ToString OIMGraph.NamespaceMap.AddNamespace(szNS, szURI) gNSCounter = gNSCounter + 1 End If 'szPrefix = szPrefix & "PREFIX q2: <" & szQualifier & "> " szPredicate = szNS & ":" & Mid$(szPredicate, iPos + 1) i = InStr(szObject, "^^") iPos = InStr(szObject, "#") ' note we cannot get here unless Object is a Literal ... !!! szQualifier = Mid$(szObject, i + 2, iPos - i - 1) ' szPrefix = szPrefix & "PREFIX q3: <" & szQualifier & "> " szURI = New Uri(szQualifier) szNS = OIMGraph.NamespaceMap.GetPrefix(szURI) If szNS = "" Then szNS = "ns" & gNSCounter.ToString OIMGraph.NamespaceMap.AddNamespace(szNS, szURI) gNSCounter = gNSCounter + 1 End If szObject = Mid$(szObject, 1, i - 1) & "^^" & szNS & ":" & Mid$(szObject, (iPos + 1)) nSubject = OIMGraph.CreateUriNode(szSubject) nPredicate = OIMGraph.CreateUriNode(szPredicate) nObject = OIMGraph.CreateLiteralNode(szObject) OIMGraph.Retract(New Triple(nSubject, nPredicate, nObject)) ' the following fails ... seems execute query cannot work with DELETE & INSERT ' szSPARQLDelete = szPrefix & "DELETE DATA WHERE {" & _ ' szSubject & " " & szPredicate & " " & szObject & "}" ' aTripleStore.ExecuteQuery(szSPARQLDelete) i = InStr(szObject, "^^") szObject = szLiteral & Mid$(szObject, i) ' .substring seems to return 1 char short nObject = OIMGraph.CreateLiteralNode(szObject) 'szSPARQLInsert = szPrefix & "INSERT DATA {" & _ ' szSubject & " " & szPredicate & " " & szObject & "}" OIMGraph.Assert(New Triple(nSubject, nPredicate, nObject)) Gets me much closer .... but the RDF file now has double values .... Note an edited value ... <owl:Thing rdf:about="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2.INSIDE_DIAMETER"> <tpl:R10528152386 rdf:resource="&part4;R34755432270" /> <tpl:R11450580697 rdf:resource="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2" /> <tpl:R56806886394 rdf:resource="&part4;R37466989245" /> <tpl:R65789235245>100^^xsd:float</tpl:R65789235245> <tpl:R65789235245 rdf:datatype="&xsd;float">0</tpl:R65789235245> <type rdf:resource="&tpl;R33612674560" /> </owl:Thing> Unedited <owl:Thing rdf:about="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2.INSULATION_THICKNESS"> <tpl:R10528152386 rdf:resource="&part4;R34755432270" /> <tpl:R11450580697 rdf:resource="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2" /> <tpl:R56806886394 rdf:resource="&part4;R93517282348" /> <tpl:R65789235245 rdf:datatype="&xsd;float">0</tpl:R65789235245> <type rdf:resource="&tpl;R33612674560" /> </owl:Thing> If I remove the "additional" incorrect triple from the property graph ... then <owl:Thing rdf:about="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2.ELEVATION"> <tpl:R10528152386 rdf:resource="&part4;R82749412674" /> <tpl:R11450580697 rdf:resource="&ex;GATE_VALVE.DGNEC__1543070000__ECXA__2" /> <tpl:R56806886394 rdf:resource="&part4;R60277357355" /> <tpl:R65789235245>1000^^xsd:float</tpl:R65789235245> <type rdf:resource="&tpl;R33612674560" /> </owl:Thing> This prevents my app from working (ie it no longer recognises literal values) Again I am just looking for a "best" practice rather than debugging my examples Thanks Glen _____________________________________________ From: Glen Worrall [mailto:gle...@bc...] Sent: 21 November 2011 09:50 To: 'rv...@do...' Subject: DELETE QUERY Hi Rob, sorry to bother you but wanted to check if the DELETE option in a SPARQL query is working in dotNETRDF ... I have tried various modifications etc to my file and seem to now get the same error in my code as in the SPARQL GUI PREFIX ex: < <http://example.org/data> http://example.org/data#> PREFIX tpl: < <http://tpl.rdlfacade.org/data> http://tpl.rdlfacade.org/data#> PREFIX xmlschema: < <http://www.w3.org/2001/XMLSchema> http://www.w3.org/2001/XMLSchema#> DELETE {ex:GATE_VALVE.DGNEC__1543070000__ECXA__2.DRY_WEIGHT tpl:R65789235245 0^^xmlschema:float} Note the prefixes have been created otherwise I received example.org is not a valid QName exception. Really all I want to do is update the literal in the triple store and then write out the file ... ie open OWL file display literals to user edit literals as required save OWL file to .OWL file Is DELETE supported in TripleStore.ExecuteSQL(query as String) ? I can of course send you the .OWL file I am using for testing Thanks Glen |
From: Glen W. <gle...@bc...> - 2011-11-21 09:58:46
|