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...@do...> - 2012-11-13 17:34:57
|
Having re-read your question again if you are going to create a custom IGraph implementation anyway because you are generating the graph on the fly from your domain model then just making the write methods throw NotSupportedException is likely sufficient Rob From: Rob Vesse <rv...@do...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Tuesday, November 13, 2012 9:27 AM To: dotNetRDF User Help and Support <dot...@li...> Subject: Re: [dotNetRDF-Support] Building a readonly graph > Hey Martin > > There's a couple of ways you could go about this depending on what exactly you > want to expose. If you are talking about a HTTP based SPARQL endpoint then if > you create a Query endpoint that is by definition read only, while the classes > underpinning it may allow read/write functions if you only provide a Query > endpoint users can only query the data. > > If you are interested in creating an in-memory read-only graph then your best > bet would be to write a IGraph decorator by extending from WrapperGraph and > overriding the methods that can modify the graph (Assert, Retract, Clear and > Merge) to throw NotSupportedException. You would need to keep your actual > data in the normal IGraph instance being wrapped as otherwise you have no way > to fill the graph with data and then you can apply your decorator over it when > you need to expose a read-only view of the data elsewhere. > > Hope this helps, > > Rob > > From: Martin Evans <mar...@gm...> > Reply-To: dotNetRDF User Help and Support > <dot...@li...> > Date: Tuesday, November 13, 2012 8:16 AM > To: <dot...@li...> > Subject: [dotNetRDF-Support] Building a readonly graph > >> Hi, >> >> Is there a way to build a readonly SPARQL queryable endpoint using dotNetRDF? >> >> I have a set of data in memory which changes of its own accord (it's actually >> the scene graph for a game, built out of entities with properties - easy to >> translate into RDF on the fly). I'd like to be able to query the scene graph >> using SPARQL, but I can't quite work out how to do this (or if it's >> possible). >> >> IGraph seems like the closest match, but it has a load of methods for >> updating the graph which I don't want. Will everything work as expected if I >> simply throw NotSupportedException in all of the methods which modify the >> graph? >> >> Thanks, >> Martin >> >> -- >> http://martindevans.appspot.com/blog >> ----------------------------------------------------------------------------- >> - Monitor your physical, virtual and cloud infrastructure from a single web >> console. Get in-depth insight into apps, servers, databases, vmware, SAP, >> cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from >> $795 for 25 servers or applications! >> http://p.sf.net/sfu/zoho_dev2dev_nov_________________________________________ >> ______ dotNetRDF-Support mailing list >> dot...@li...https://lists.sourceforge.net/lists/li >> stinfo/dotnetrdf-support > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single web > console. Get in-depth insight into apps, servers, databases, vmware, SAP, > cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from > $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov__________________________________________ > _____ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Rob V. <rv...@do...> - 2012-11-13 17:28:56
|
Hey Martin There's a couple of ways you could go about this depending on what exactly you want to expose. If you are talking about a HTTP based SPARQL endpoint then if you create a Query endpoint that is by definition read only, while the classes underpinning it may allow read/write functions if you only provide a Query endpoint users can only query the data. If you are interested in creating an in-memory read-only graph then your best bet would be to write a IGraph decorator by extending from WrapperGraph and overriding the methods that can modify the graph (Assert, Retract, Clear and Merge) to throw NotSupportedException. You would need to keep your actual data in the normal IGraph instance being wrapped as otherwise you have no way to fill the graph with data and then you can apply your decorator over it when you need to expose a read-only view of the data elsewhere. Hope this helps, Rob From: Martin Evans <mar...@gm...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Tuesday, November 13, 2012 8:16 AM To: <dot...@li...> Subject: [dotNetRDF-Support] Building a readonly graph > Hi, > > Is there a way to build a readonly SPARQL queryable endpoint using dotNetRDF? > > I have a set of data in memory which changes of its own accord (it's actually > the scene graph for a game, built out of entities with properties - easy to > translate into RDF on the fly). I'd like to be able to query the scene graph > using SPARQL, but I can't quite work out how to do this (or if it's possible). > > IGraph seems like the closest match, but it has a load of methods for updating > the graph which I don't want. Will everything work as expected if I simply > throw NotSupportedException in all of the methods which modify the graph? > > Thanks, > Martin > > -- > http://martindevans.appspot.com/blog > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single web > console. Get in-depth insight into apps, servers, databases, vmware, SAP, > cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from > $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov__________________________________________ > _____ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Rob V. <rv...@do...> - 2012-11-13 17:23:18
|
Hi Andre Without seeing the code I can only guess mscorlib is the .Net framework core so most likely nothing to do with dotNetRDF (but without code I can't tell) An ArgumentException would imply you (or dotNetRDF) invoked some .Net framework method with incorrect/malformed arguments, you'll have to send a minimal code example if you want more help with this Rob From: André Kahlert <ak...@ho...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Tuesday, November 13, 2012 9:02 AM To: <dot...@li...> Subject: Re: [dotNetRDF-Support] Creating a multidictionary > Rob, > > thanks for your quick support - that works now ;) > I just found out that I also get the following exception: > > A first chance exception of type 'system.argumentexception' occurred in > mscorlib.dll > > What might be causing this? > > > > Date: Mon, 12 Nov 2012 09:22:09 -0800 > From: rv...@do... > To: dot...@li... > Subject: Re: [dotNetRDF-Support] Creating a multidictionary > > Hey Andre > > This is a common error and is caused by using the wrong build of the dotNetRDF > library in your project. In the download package you would have seen a number > of directories and you need to ensure you use the DLLs from the directory that > matches the target .Net version and profile of your project. > > From your error I can see that you are trying to use the .Net 4.0 Full build > in a .Net 4.0 Client Profile project. Either use the DLLs from the > net40-client folder or switch your project to use .Net 4.0 Full > > Warning 2 and Error 3 are a result of the mismatched .Net profiles which > Warning 1 is informing you of. > > For future reference if you are able to use NuGet that may be the preferable > option for installing dotNetRDF since NuGet will automatically select the > correct build of the library based on your projects target .Net version and > profile. > > Hope this helps, > > Rob Vesse > > From: André Kahlert <ak...@ho...> > Reply-To: dotNetRDF User Help and Support > <dot...@li...> > Date: Monday, November 12, 2012 4:04 AM > To: <dot...@li...> > Subject: [dotNetRDF-Support] Creating a multidictionary > >> Hello, >> >> I'm trying to create a simple multidictionary in VB.Net: >> >> >> Imports VDS.Common >> >> >> >> Public Class Form1 >> >> Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As >> System.EventArgs) HandlesMyBase.Load >> >> Dim dict As New MultiDictionary(OfDouble, Integer)() >> >> End Sub >> >> End Class >> >> Unfortunately it gives me the following warnings and errors: >> >> Warning 1: >> The referenced assebmly "dotNETRDF" could not be resolved, because it has a >> dependency on "System.Web, Version=4.0.0.0, Culture=neutral, >> PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted >> framework ".NETFramework,Version=v4.0,Profile=Client". Please remove >> references to assemblies not in the targeted framework or consider >> retargeting your project. >> >> Warning 2: >> Namespace or type specified in the Imports "VDS.Common" doesn't contain any >> public member or cannot be found. Make sure the namespace or the type is >> defined and contains at least one public member. Make sure the imported >> element name doesn't use any aliases. >> >> Error 3: >> Type "MultiDictionary" is not defined. >> >> Any idea what I'm doing wrong here? >> >> >> >> >> ----------------------------------------------------------------------------- >> - Everyone hates slow websites. So do we. Make your web apps faster with >> AppDynamics Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_d2d_nov___________________________________________ >> ____ dotNetRDF-Support mailing list >> dot...@li...https://lists.sourceforge.net/lists/li >> stinfo/dotnetrdf-support > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. Make your web apps faster with > AppDynamics Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov > _______________________________________________ dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single web > console. Get in-depth insight into apps, servers, databases, vmware, SAP, > cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from > $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov__________________________________________ > _____ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: André K. <ak...@ho...> - 2012-11-13 17:02:26
|
Rob, thanks for your quick support - that works now ;) I just found out that I also get the following exception: A first chance exception of type 'system.argumentexception' occurred in mscorlib.dll What might be causing this? Date: Mon, 12 Nov 2012 09:22:09 -0800 From: rv...@do... To: dot...@li... Subject: Re: [dotNetRDF-Support] Creating a multidictionary Hey Andre This is a common error and is caused by using the wrong build of the dotNetRDF library in your project. In the download package you would have seen a number of directories and you need to ensure you use the DLLs from the directory that matches the target .Net version and profile of your project. >From your error I can see that you are trying to use the .Net 4.0 Full build in a .Net 4.0 Client Profile project. Either use the DLLs from the net40-client folder or switch your project to use .Net 4.0 Full Warning 2 and Error 3 are a result of the mismatched .Net profiles which Warning 1 is informing you of. For future reference if you are able to use NuGet that may be the preferable option for installing dotNetRDF since NuGet will automatically select the correct build of the library based on your projects target .Net version and profile. Hope this helps, Rob Vesse From: André Kahlert <ak...@ho...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Monday, November 12, 2012 4:04 AM To: <dot...@li...> Subject: [dotNetRDF-Support] Creating a multidictionary Hello, I'm trying to create a simple multidictionary in VB.Net: Imports VDS.Common Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load Dim dict As New MultiDictionary(OfDouble, Integer)() End SubEnd Class Unfortunately it gives me the following warnings and errors: Warning 1:The referenced assebmly "dotNETRDF" could not be resolved, because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. Warning 2:Namespace or type specified in the Imports "VDS.Common" doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. Error 3:Type "MultiDictionary" is not defined. Any idea what I'm doing wrong here? ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov_______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_nov _______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Martin E. <mar...@gm...> - 2012-11-13 16:16:53
|
Hi, Is there a way to build a readonly SPARQL queryable endpoint using dotNetRDF? I have a set of data in memory which changes of its own accord (it's actually the scene graph for a game, built out of entities with properties - easy to translate into RDF on the fly). I'd like to be able to query the scene graph using SPARQL, but I can't quite work out how to do this (or if it's possible). IGraph seems like the closest match, but it has a load of methods for updating the graph which I don't want. Will everything work as expected if I simply throw NotSupportedException in all of the methods which modify the graph? Thanks, Martin -- http://martindevans.appspot.com/blog |
From: Rob V. <rv...@do...> - 2012-11-12 17:23:02
|
Hey Andre This is a common error and is caused by using the wrong build of the dotNetRDF library in your project. In the download package you would have seen a number of directories and you need to ensure you use the DLLs from the directory that matches the target .Net version and profile of your project. >From your error I can see that you are trying to use the .Net 4.0 Full build in a .Net 4.0 Client Profile project. Either use the DLLs from the net40-client folder or switch your project to use .Net 4.0 Full Warning 2 and Error 3 are a result of the mismatched .Net profiles which Warning 1 is informing you of. For future reference if you are able to use NuGet that may be the preferable option for installing dotNetRDF since NuGet will automatically select the correct build of the library based on your projects target .Net version and profile. Hope this helps, Rob Vesse From: André Kahlert <ak...@ho...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Monday, November 12, 2012 4:04 AM To: <dot...@li...> Subject: [dotNetRDF-Support] Creating a multidictionary > Hello, > > I'm trying to create a simple multidictionary in VB.Net: > > > Imports VDS.Common > > > > Public Class Form1 > > Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As > System.EventArgs) HandlesMyBase.Load > > Dim dict As New MultiDictionary(OfDouble, Integer)() > > End Sub > > End Class > > Unfortunately it gives me the following warnings and errors: > > Warning 1: > The referenced assebmly "dotNETRDF" could not be resolved, because it has a > dependency on "System.Web, Version=4.0.0.0, Culture=neutral, > PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted > framework ".NETFramework,Version=v4.0,Profile=Client". Please remove > references to assemblies not in the targeted framework or consider retargeting > your project. > > Warning 2: > Namespace or type specified in the Imports "VDS.Common" doesn't contain any > public member or cannot be found. Make sure the namespace or the type is > defined and contains at least one public member. Make sure the imported > element name doesn't use any aliases. > > Error 3: > Type "MultiDictionary" is not defined. > > Any idea what I'm doing wrong here? > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. Make your web apps faster with > AppDynamics Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov____________________________________________ > ___ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: André K. <ak...@ho...> - 2012-11-12 12:04:35
|
Hello, I'm trying to create a simple multidictionary in VB.Net: Imports VDS.Common Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim dict As New MultiDictionary(Of Double, Integer)() End SubEnd Class Unfortunately it gives me the following warnings and errors: Warning 1:The referenced assebmly "dotNETRDF" could not be resolved, because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. Warning 2:Namespace or type specified in the Imports "VDS.Common" doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. Error 3:Type "MultiDictionary" is not defined. Any idea what I'm doing wrong here? |
From: Ali, S. M R <sye...@im...> - 2012-11-08 01:37:44
|
Hey Rob, Thanks so much for your mail. That clarifies things a bit. Just a quick follow up, is the 'inmemorydataset' compatible with the interfaces for reading rdf files locally for example RdfXmlParser? regards, Raza ________________________________________ From: dot...@li... [dot...@li...] on behalf of Rob Vesse [rv...@do...] Sent: Thursday, November 08, 2012 1:01 AM To: dotNetRDF User Help and Support Cc: raz...@gm... Subject: Re: [dotNetRDF-Support] unable to get sparql working on a local owl file Hi Raza This is a limitation of the ExecuteQuery() method on a TripleStore instance. Queries operate over a default graph and if none is explicitly specified by your query then the unnamed graph from your TripleStore is used (this is the graph received if you specify a graph uri of null). This means your query is likely operating over an empty graph hence the empty results. There are several workarounds for this: 1. Set the BaseUri property of your graph to null before you add it to your triple store which means it gets treated as the default graph, this is only useful if you have a single graph 2. Explicitly specify the graphs to use in your query, either add FROM <uri> clause(s) after the SELECT clause or use GRAPH <uri> clauses inside the WHERE clause 3. Use the ISparqlDataset and ISparqlQueryProcessor which give you better control over the default graph and query execution (this is what ExecuteQuery() actually does internally) The last option is the most flexible and would look like the following: InMemoryDataset ds = new InMemoryDataset(store, new Uri("http://example.org/myDefaultGraph")); LeviathanQueryProcessor proc = new LeviathanQueryProcessor(ds); Object results = proc.ProcessQuery(yourQuery); Hope this helps, Rob From: Raza Ali <raz...@gm...<mailto:raz...@gm...>> Reply-To: dotNetRDF User Help and Support <dot...@li...<mailto:dot...@li...>> Date: Wednesday, November 7, 2012 9:47 AM To: <dot...@li...<mailto:dot...@li...>> Subject: [dotNetRDF-Support] unable to get sparql working on a local owl file Hello! I have a rather simple query. Im trying to run a basic sparql query on a triple store, but keep getting and empty object. Heres my code: RdfXmlParser rparser = new RdfXmlParser(); rparser.Load(g, "icf.owl"); store.Add(g); This loads up the graph fine in the variables g/store (declared previously). If I browse for a list of triples, that operates as expected. Now I do as follows, as described in the sparql intro document. Although the document is quite full (accessible at http://www.doc.ic.ac.uk/~smrali/icf.owl), I keep getting an empty document. I'd appreciate any help please. String query = "SELECT DISTINCT ?s WHERE { ?s ?p ?o. } ORDER BY ?s"; SparqlParameterizedString queryString = new SparqlParameterizedString(); queryString.Namespaces = g.NamespaceMap; queryString.CommandText = query; query = queryString.ToString(); Console.WriteLine(query); Object results = store.ExecuteQuery(new SparqlQueryParser().ParseFromString(query)); if (results is SparqlResultSet) { //Print out the Results SparqlResultSet rset = (SparqlResultSet)results; foreach (SparqlResult result in rset) { Console.WriteLine(result.ToString()); } } ------------------------------------------------------------------------------ LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d_______________________________________________ dotNetRDF-Support mailing list dot...@li...<mailto:dot...@li...> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Rob V. <rv...@do...> - 2012-11-08 01:02:10
|
Hi Raza This is a limitation of the ExecuteQuery() method on a TripleStore instance. Queries operate over a default graph and if none is explicitly specified by your query then the unnamed graph from your TripleStore is used (this is the graph received if you specify a graph uri of null). This means your query is likely operating over an empty graph hence the empty results. There are several workarounds for this: 1. Set the BaseUri property of your graph to null before you add it to your triple store which means it gets treated as the default graph, this is only useful if you have a single graph 2. Explicitly specify the graphs to use in your query, either add FROM <uri> clause(s) after the SELECT clause or use GRAPH <uri> clauses inside the WHERE clause 3. Use the ISparqlDataset and ISparqlQueryProcessor which give you better control over the default graph and query execution (this is what ExecuteQuery() actually does internally) The last option is the most flexible and would look like the following: InMemoryDataset ds = new InMemoryDataset(store, new Uri("http://example.org/myDefaultGraph")); LeviathanQueryProcessor proc = new LeviathanQueryProcessor(ds); Object results = proc.ProcessQuery(yourQuery); Hope this helps, Rob From: Raza Ali <raz...@gm...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Wednesday, November 7, 2012 9:47 AM To: <dot...@li...> Subject: [dotNetRDF-Support] unable to get sparql working on a local owl file > Hello! > > I have a rather simple query. Im trying to run a basic sparql query on a > triple store, but keep getting and empty object. Heres my code: > > RdfXmlParser rparser = new RdfXmlParser(); > rparser.Load(g, "icf.owl"); > store.Add(g); > > This loads up the graph fine in the variables g/store (declared previously). > If I browse for a list of triples, that operates as expected. Now I do as > follows, as described in the sparql intro document. Although the document is > quite full (accessible at http://www.doc.ic.ac.uk/~smrali/icf.owl), I keep > getting an empty document. I'd appreciate any help please. > > String query = "SELECT DISTINCT ?s WHERE { ?s ?p ?o. } ORDER BY ?s"; > SparqlParameterizedString queryString = new SparqlParameterizedString(); > queryString.Namespaces = g.NamespaceMap; > queryString.CommandText = query; > query = queryString.ToString(); > Console.WriteLine(query); > Object results = store.ExecuteQuery(new > SparqlQueryParser().ParseFromString(query)); > if (results is SparqlResultSet) > { > //Print out the Results > SparqlResultSet rset = (SparqlResultSet)results; > foreach (SparqlResult result in rset) > { > Console.WriteLine(result.ToString()); > } > } > ------------------------------------------------------------------------------ > LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in > control, update software, and manage PCs from one command center Diagnose > problems and improve visibility into emerging IT issues Automate, monitor and > manage. Do more in less time with Central > http://p.sf.net/sfu/logmein12331_d2d__________________________________________ > _____ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Raza A. <raz...@gm...> - 2012-11-07 17:47:57
|
Hello! I have a rather simple query. Im trying to run a basic sparql query on a triple store, but keep getting and empty object. Heres my code: RdfXmlParser rparser = new RdfXmlParser(); rparser.Load(g, "icf.owl"); store.Add(g); This loads up the graph fine in the variables g/store (declared previously). If I browse for a list of triples, that operates as expected. Now I do as follows, as described in the sparql intro document. Although the document is quite full (accessible at http://www.doc.ic.ac.uk/~smrali/icf.owl), I keep getting an empty document. I'd appreciate any help please. String query = "SELECT DISTINCT ?s WHERE { ?s ?p ?o. } ORDER BY ?s"; SparqlParameterizedString queryString = new SparqlParameterizedString(); queryString.Namespaces = g.NamespaceMap; queryString.CommandText = query; query = queryString.ToString(); Console.WriteLine(query); Object results = store.ExecuteQuery(new SparqlQueryParser().ParseFromString(query)); if (results is SparqlResultSet) { //Print out the Results SparqlResultSet rset = (SparqlResultSet)results; foreach (SparqlResult result in rset) { Console.WriteLine(result.ToString()); } } |
From: Ron M. Z. <ro...@ze...> - 2012-10-27 00:12:48
|
Sorry for taking so long to respond, Rob, it's been a hectic couple of weeks. I haven't had a chance to look more at this but I'll try to reproduce it again and see if I can make any headway soon. On Thu, Sep 27, 2012 at 4:10 PM, Rob Vesse <rv...@do...> wrote: > Hey Ron > > Did you ever get a chance to look into this more or do you want me to take > this? > > Rob > > From: Ron Michael Zettlemoyer <ro...@ze...> > Reply-To: dotNetRDF User Help and Support < > dot...@li...> > Date: Thursday, August 30, 2012 8:23 AM > To: dotNetRDF User Help and Support < > dot...@li...> > Subject: [dotNetRDF-Support] Problem deleting data in a graph in Stardog > > I've dug around a little in the code but not been able to figure this out > myself. This delete statement does not seem to work when talking to Stardog: > > DELETE { graph ?g { ?s ?p ?o } } > WHERE > { > graph ?g { > ?s ?p ?o. > } > filter (datatype(?o)=xsd:datetime) > } > > I debugged using Fiddler and I can see dotNetRDF does a query to get the > data that matches the where clause, and it initiates a transaction but then > it simply ends the transaction without performing any changes. Which is odd > since I thought I updated the Stardog portion of the code to not initiate a > transaction if no change was going to be made but it may be getting called > in some places that isn't checking for this yet. > > I'm not sure if my statement is just not correct or if it's a bug > somewhere. Any thoughts? > > ------------------------------------------------------------------------------ > Live Security Virtual Conference Exclusive live event will cover all the > ways today's security and threat landscape has changed and how IT managers > can respond. Discussions will include endpoint security, mobile security > and the latest in malware threats. > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://ad.doubleclick.net/clk;258768047;13503038;j? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > dotNetRDF-develop mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop > > |
From: Rob V. <rv...@do...> - 2012-10-23 16:56:36
|
Hi Uldis dotNetRDF can run with .Net 3.5 or higher, the download package contains builds for a variety of different versions and profiles of .Net (3.5 Full, 3.5 Client, 4.0 Full, 4.0 Client, Silverlight 4, Silverlight 4 for Windows Phone) Due to differing capabilities of different framework versions exact features available may differ between builds. For example Silverlight and Windows Phone builds only provide async APIs for some HTTP based operations (e.g. storage, remote query) and the 4.0 builds provide parallel query evaluation using PLinq. Whether things would go wrong with the dependencies missing would depend on the features used, if Json.Net was missing anything JSON related and some remote SPARQL operations may fail due to missing JSON parser. If HtmlAgilityPack is missing the things affected will vary depending on your version of .Net 3.5, in some builds we use HAP to replace .Net features not present in some versions of the framework. So basically use without dependencies at your own risk. dotNetRDF.xml is not required, it just provides the Intellisense documentation that Visual Studio will display when you are writing code using dotNetRDF. It is not needed when deploying dotNetRDF Hope this helps, Rob On 10/23/12 8:52 AM, "Uldis Bojars" <cap...@gm...> wrote: >Hi Rob, > >What is the minimum set of files that dotNetRDF needs in order to run >(with .Net 4.0)? > >The only thing I am using it for is parsing and writing RDF. Would >anything go wrong if the Json and HtmlAgilityPack libraries were not >present? > >P.S. I guess dotNetRDF.xml is not necessary in order to call the library. > >Thanks, >Uldis |
From: Rob V. <rv...@do...> - 2012-10-23 16:51:07
|
Hey Uldis If you are loading into a Graph and set the BaseUri property of that graph prior to invoking Load() on the parser then the Graph's Base URI should get used as the default Base URI Rob On 10/22/12 4:09 PM, "Uldis Bojars" <cap...@gm...> wrote: >Hi, > >How to specify Base URI when parsing RDF/XML? > >If the RDF/XML file does not have information about the base URI then >parsing using RdfXmlParser.load() returns the following error (which I >am looking to avoid): > >"Cannot use an Empty URI to refer to the document Base URI since there >is no in-scope Base URI!" > >Thanks, >Uldis > >-------------------------------------------------------------------------- >---- >Everyone hates slow websites. So do we. >Make your web apps faster with AppDynamics >Download AppDynamics Lite for free today: >http://p.sf.net/sfu/appdyn_sfd2d_oct >_______________________________________________ >dotNetRDF-Support mailing list >dot...@li... >https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Uldis B. <cap...@gm...> - 2012-10-22 23:09:59
|
Hi, How to specify Base URI when parsing RDF/XML? If the RDF/XML file does not have information about the base URI then parsing using RdfXmlParser.load() returns the following error (which I am looking to avoid): "Cannot use an Empty URI to refer to the document Base URI since there is no in-scope Base URI!" Thanks, Uldis |
From: Rob V. <rv...@do...> - 2012-10-18 16:53:51
|
Hey Constantinos Sorry for the delay in replying For question 1 take a look at SparqlParameterizedString [1] which is designed for programmatically building queries, see [2] for an example of usage. I've updated the documentation on Querying SPARQL to include this [3] For presentation logic take a look at the INodeFormatter [4] interface, see the section titled Formatting API in the Writing RDF [5] documentation for some information on this. Rob [1]: http://www.dotnetrdf.org/api/index.asp?Topic=VDS.RDF.Query.SparqlParameteriz edString [2]: http://answers.semanticweb.com/questions/12147/whats-the-best-way-to-paramet erize-sparql-queries/12168 [3]: http://www.dotnetrdf.org/content.asp?pageId=Querying%20with%20SPARQL [4]: http://www.dotnetrdf.org/api/index.asp?Topic=VDS.RDF.Writing.Formatting.INod eFormatter [5]: http://www.dotnetrdf.org/content.asp?pageID=Writing%20RDF From: Constantinos Orphanides <tra...@ho...> Date: Sunday, October 7, 2012 6:11 PM To: Rob Vesse <rv...@do...> Subject: dotNetRDF questions > Hi Rob, > > Hope everything is well. > My apologies for bothering you once again, but sometimes google searches are > fruitless :) > > 1) When receiving SPARQL queries etc in JSON everything runs ok, but let's say > I have this query in a textbox in a windows forms c# app: > > PREFIX :<http://www.w3.org/2002/07/owl#> > PREFIX joci:<http://www.innovantage.co.uk/cubist/d921/joci#> > PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> > PREFIX owl:<http://www.w3.org/2002/07/owl#> > PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> > PREFIX xsd:<http://www.w3.org/2001/XMLSchema#> > > select ?adv (?jb as ?o) (count(?vac) as ?vaccount) > where > { > ?vac joci:advertisedBy ?adv . > ?vac joci:advertisedOn ?jb . > } > group by ?adv ?jb > order by desc(?vaccount) > LIMIT 100 > > I've tried several methods to construct the sparqlQuery, such as using > StringBuilder or even appending to a normal string as such: > > sparqlQuery += richTextBox1.Lines[0]; > for (int i = 1; i < richTextBox1.Lines.Count(); i++) > { > sparqlQuery += ' ' + richTextBox1.Lines[i]; > } > > However, I sometimes get this error on the .Query(sparqlQuery) line: > > {"A HTTP error occured while querying the Store. Store returned the following > error message: MALFORMED QUERY: Encountered \" \"prefix\" \"PREFIX \"\" at > line 1, column 486.\r\nWas expecting one of:\r\n <EOF> \r\n \"offset\" > ...\r\n \"bindings\" ...\r\n \nSee inner exception for further details"} > > 2) Does your library support some presentation logic for returning results in > any way? e.g. > - joci:Advertiser_0 instead of > http://www.innovantage.co.uk/cubist/d921/joci#Advertiser_0 > - 107247 instead of 107247^^http://www.w3.org/2001/XMLSchema#integer > > Best regards, > > Constantinos > > |
From: Rob V. <rv...@do...> - 2012-09-27 20:10:58
|
Hey Ron Did you ever get a chance to look into this more or do you want me to take this? Rob From: Ron Michael Zettlemoyer <ro...@ze...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Thursday, August 30, 2012 8:23 AM To: dotNetRDF User Help and Support <dot...@li...> Subject: [dotNetRDF-Support] Problem deleting data in a graph in Stardog > I've dug around a little in the code but not been able to figure this out > myself. This delete statement does not seem to work when talking to Stardog: > > DELETE { graph ?g { ?s ?p ?o } } > WHERE > { > graph ?g { > ?s ?p ?o. > } > filter (datatype(?o)=xsd:datetime) > } > > I debugged using Fiddler and I can see dotNetRDF does a query to get the data > that matches the where clause, and it initiates a transaction but then it > simply ends the transaction without performing any changes. Which is odd since > I thought I updated the Stardog portion of the code to not initiate a > transaction if no change was going to be made but it may be getting called in > some places that isn't checking for this yet. > > I'm not sure if my statement is just not correct or if it's a bug somewhere. > Any thoughts? > > ------------------------------------------------------------------------------ > Live Security Virtual Conference Exclusive live event will cover all the ways > today's security and threat landscape has changed and how IT managers can > respond. Discussions will include endpoint security, mobile security and the > latest in malware threats. > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_____________________ > __________________________ dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Rob V. <rv...@do...> - 2012-09-27 20:09:45
|
Yes everything in the dotNetRDF exception hierarchy descends from Exception because in .Net everything must descend from Exception in order to be throwable (unlike Java) You should really catch the specific exception type rather than catching Exception and inspecting the type I.e. catch (RdfQueryException queryEx) { //Handle exception } Rob From: Constantinos Orphanides <tra...@ho...> Date: Tuesday, September 25, 2012 8:31 PM To: Rob Vesse <rv...@do...> Subject: RE: dotNetRDF; exception handling > Hi Rob, > > Thanks for the useful info. Do the dotNetRDF exceptions abstract from the > generic Exception? I was thinking of something like: > > catch(Exception ex) > { > if (ex is RdfQueryExeption) > { > //... > } > } > > > Best regards, > > Constantinos Orphanides > Computer Scientist > web: www.constantinosorphanides.com <http://www.constantinosorphanides.com> | > twitter: http://twitter.com/trashr0x > > > > Date: Mon, 24 Sep 2012 15:40:36 -0700 > Subject: Re: dotNetRDF; exception handling > From: rv...@do... > To: tra...@ho... > CC: dot...@li... > > Hi Constantinos > > They should in most cases throw dotNetRDF exceptions, the exceptions you can > get for the Query() method are as follows: > * RdfQueryException / RdfStorageException Something goes wrong making the > query > * RdfParseException Either the query fails validation within dotNetRDF or > the store returns malformed results > * RdfParserSelectionException The query succeeds but returns results in a > format not understood by dotNetRDF > The code does not necessarily catch and wrap standard .Net exceptions so it > may be possible for other errors to be thrown in certain circumstances but all > the expected errors should be in the dotNetRDF exception hierarchy. > > I'll make sure to add thrown exceptions to the XML comments for relevant > methods at some point > > Rob > > From: Constantinos Orphanides <tra...@ho...> > Date: Monday, September 24, 2012 3:15 PM > To: Rob Vesse <rv...@do...> > Subject: dotNetRDF; exception handling > >> Hi Rob, >> >> do: >> >> 1) SesameHttpProtocolConnector owlim = new >> SesameHttpProtocolConnector(repositoryConnection, repositoryId); >> 2) Object results = owlim.Query(sparqlQuery); >> >> Throw exceptions specific to dotNetRDF or the generic Exception class? If >> yes, where can I find some documentation? Couldn't find any in the website's >> API. >> >> Best regards, >> >> Constantinos >> > |
From: Rob V. <rv...@do...> - 2012-09-27 17:00:56
|
Hi All We're pleased to announce the availability of dotNetRDF 0.7.2 Beta [1] and the dotNetRDF Toolkit 0.6.2 Beta [2] Highlights of this release: * Bug Fixes > * As ever there are a variety of bug fixes for both minor and serious bugs in > this release, thanks to everyone in the community who reported or helped to > fix bugs. * Core API > * We've changed the internal storage of triples to a new data structure which > should boost performance a little and slightly reduce memory usage though > effects may differ depending on your data. We've also continued the > deprecation and removal of defunct code. * Dependencies > * We've updated our 3rd party dependencies to their latest versions where > possible, our NuGet packages are now using NuGet dependencies rather than > shipping DLLs where possible. * Configuration API > * The Configuration API has received a number of fixes and improvements, > including more auto-configuration capabilities and helper methods for loading > in Configuration Graphs. * Parsing > * Improves support for Turtle 1.1 to be near 100% compliant * SPARQL > * SPARQL 1.1 support has been updated to be near 100% compliant with the > latest specification (98-99% compliant). > * We've also introduced some new abstractions into the SPARQL engine to allow > for future extensions, this release is the first to support using the + and - > operators for date time arithmetic. * Storage > * IStorageServer IStorageServer implementations are now separate classes, the > parent server of a IStorageProvider may be obtained (where available) from the > new ParentServer property. * Source Code > * In case you haven't noticed we've moved to Mercurial for source control, you > can now find our latest sources in our Mercurial Repository > http://bitbucket.org/dotnetrdf/dotnetrdf As always thanks to everyone who helped with this release, particularly to those in the community who took the time to help report and fix bugs 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...> - 2012-09-24 22:41:33
|
Hi Constantinos They should in most cases throw dotNetRDF exceptions, the exceptions you can get for the Query() method are as follows: * RdfQueryException / RdfStorageException Something goes wrong making the query * RdfParseException Either the query fails validation within dotNetRDF or the store returns malformed results * RdfParserSelectionException The query succeeds but returns results in a format not understood by dotNetRDF The code does not necessarily catch and wrap standard .Net exceptions so it may be possible for other errors to be thrown in certain circumstances but all the expected errors should be in the dotNetRDF exception hierarchy. I'll make sure to add thrown exceptions to the XML comments for relevant methods at some point Rob From: Constantinos Orphanides <tra...@ho...> Date: Monday, September 24, 2012 3:15 PM To: Rob Vesse <rv...@do...> Subject: dotNetRDF; exception handling > Hi Rob, > > do: > > 1) SesameHttpProtocolConnector owlim = new > SesameHttpProtocolConnector(repositoryConnection, repositoryId); > 2) Object results = owlim.Query(sparqlQuery); > > Throw exceptions specific to dotNetRDF or the generic Exception class? If yes, > where can I find some documentation? Couldn't find any in the website's API. > > Best regards, > > Constantinos > |
From: Rob V. <rv...@do...> - 2012-09-24 21:40:07
|
Hi Uldis Yes that was indeed still a bug, the parser was incorrectly parsing the Base URI into a library wide utility function which resolves QNames. That function falls back to using the Base URI if present when the QName references the default namespace and no default namespace is defined. That behavior is correct and used by some parsers but shouldn't have been used for RDF/XML The code is now fixed so documents like the one you provided will result in an error. Thanks for the report, Rob On 9/24/12 12:44 PM, "Uldis Bojars" <cap...@gm...> wrote: >Hi Rob, > >Thanks for looking into this. > >> The RDF/XML specification has the following to say on relative URI >> resolution: > >It might be more of a problem with what is allowed in the RDF Property >element name than with relative URIs (which, indeed, are fine as the >program is allowed to determine the base URI itself). > >At least a modified example with xml:base added still produces same >W3C RDF validator warnings: > ><rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1" >xml:base="http://captsolo.net/" > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> > <rdf:Description rdf:about="http://localhost:8081/data/obj/1000"> > <error>no info how to convert this element: creator</error> > </rdf:Description> > </rdf:RDF> > >Error: {W104} Unqualified property elements are not allowed. Treated >as a relative URI.[Line = 4, Column = 13] >Error: {W136} Relative URIs are not permitted in RDF <error>[Line = 4, >Column = 13] > >> When invoking the parser directly it does not assign a Base URI to the >> Graph hence URI resolution fails and you get a parsing error. > >As noted above it might be something else (at least for W3C validator) >but as long as DotNetRDF is able to notify about issues like this (it >is, provided the parser method is used) I have nothing to complain >about. :) > >> So this behavior is a little inconsistent and confusing but it is >>somewhat >> by design, the LoadFromFile() and FileLoader.Load() methods are designed >> to be user friendly abstractions which remove some of the complexity of >> selecting a parser and invoking it while also protecting users from some >> common errors e.g. missing Base URI by setting up the parser invocation >> appropriately. > >Would it make sense to document this difference in behavior? (E.g., >add a notice / warning to user-friendly methods saying the warnings >will be hidden) > >It would help in cases like mine when looking for a parser that would >warn of malformed RDF and other errors (to use as an RDF validator). >In this case a user-friendly parser is not helpful at all and it is >good to know one has to look at the parser method instead. > >> We could change the behavior to make it consistent (invoking a parser >> directly on a file would set the Base URI for the Graph) but then we are >> hiding errors from advanced users. > >Hiding errors from advanced users does not sound good :) > >Also, setting the Base URI might not get rid of the warning (maybe it >does, I did not try the modified version on DotNetRDF yet). > >> With regards to warnings I don't have an example but it uses the >>standard >> .Net event pattern, Warning is an event defined by all IRdfReader >> implementations and you add an event handler to it like any other .Net >> event >> >> parser.Warning += new RdfReaderWarning(handlerMethod); > >I'll have to explore it. I have a reasonably good knowledge of RDF but >a very limited knowledge of .Net or C#. > >Thanks, >Uldis |
From: Uldis B. <cap...@gm...> - 2012-09-24 20:31:07
|
This section looks related: http://www.w3.org/TR/rdf-syntax-grammar/#section-Identifiers Uldis On Mon, Sep 24, 2012 at 10:55 PM, Rob Vesse <rv...@do...> wrote: > Good point > > There may be a real bug which is that element names are resolved as > relative URIs rather than being resolved as QNames, I will look into this > further and report back > > Your comments about remarks on the methods and warnings are good ones, I > will make a note to do as you suggest > > Rob > > On 9/24/12 12:44 PM, "Uldis Bojars" <cap...@gm...> wrote: > >>Hi Rob, >> >>Thanks for looking into this. >> >>> The RDF/XML specification has the following to say on relative URI >>> resolution: >> >>It might be more of a problem with what is allowed in the RDF Property >>element name than with relative URIs (which, indeed, are fine as the >>program is allowed to determine the base URI itself). >> >>At least a modified example with xml:base added still produces same >>W3C RDF validator warnings: >> >><rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1" >>xml:base="http://captsolo.net/" >> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> >> <rdf:Description rdf:about="http://localhost:8081/data/obj/1000"> >> <error>no info how to convert this element: creator</error> >> </rdf:Description> >> </rdf:RDF> >> >>Error: {W104} Unqualified property elements are not allowed. Treated >>as a relative URI.[Line = 4, Column = 13] >>Error: {W136} Relative URIs are not permitted in RDF <error>[Line = 4, >>Column = 13] >> >>> When invoking the parser directly it does not assign a Base URI to the >>> Graph hence URI resolution fails and you get a parsing error. >> >>As noted above it might be something else (at least for W3C validator) >>but as long as DotNetRDF is able to notify about issues like this (it >>is, provided the parser method is used) I have nothing to complain >>about. :) >> >>> So this behavior is a little inconsistent and confusing but it is >>>somewhat >>> by design, the LoadFromFile() and FileLoader.Load() methods are designed >>> to be user friendly abstractions which remove some of the complexity of >>> selecting a parser and invoking it while also protecting users from some >>> common errors e.g. missing Base URI by setting up the parser invocation >>> appropriately. >> >>Would it make sense to document this difference in behavior? (E.g., >>add a notice / warning to user-friendly methods saying the warnings >>will be hidden) >> >>It would help in cases like mine when looking for a parser that would >>warn of malformed RDF and other errors (to use as an RDF validator). >>In this case a user-friendly parser is not helpful at all and it is >>good to know one has to look at the parser method instead. >> >>> We could change the behavior to make it consistent (invoking a parser >>> directly on a file would set the Base URI for the Graph) but then we are >>> hiding errors from advanced users. >> >>Hiding errors from advanced users does not sound good :) >> >>Also, setting the Base URI might not get rid of the warning (maybe it >>does, I did not try the modified version on DotNetRDF yet). >> >>> With regards to warnings I don't have an example but it uses the >>>standard >>> .Net event pattern, Warning is an event defined by all IRdfReader >>> implementations and you add an event handler to it like any other .Net >>> event >>> >>> parser.Warning += new RdfReaderWarning(handlerMethod); >> >>I'll have to explore it. I have a reasonably good knowledge of RDF but >>a very limited knowledge of .Net or C#. >> >>Thanks, >>Uldis > > > > |
From: Rob V. <rv...@do...> - 2012-09-24 19:55:59
|
Good point There may be a real bug which is that element names are resolved as relative URIs rather than being resolved as QNames, I will look into this further and report back Your comments about remarks on the methods and warnings are good ones, I will make a note to do as you suggest Rob On 9/24/12 12:44 PM, "Uldis Bojars" <cap...@gm...> wrote: >Hi Rob, > >Thanks for looking into this. > >> The RDF/XML specification has the following to say on relative URI >> resolution: > >It might be more of a problem with what is allowed in the RDF Property >element name than with relative URIs (which, indeed, are fine as the >program is allowed to determine the base URI itself). > >At least a modified example with xml:base added still produces same >W3C RDF validator warnings: > ><rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1" >xml:base="http://captsolo.net/" > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> > <rdf:Description rdf:about="http://localhost:8081/data/obj/1000"> > <error>no info how to convert this element: creator</error> > </rdf:Description> > </rdf:RDF> > >Error: {W104} Unqualified property elements are not allowed. Treated >as a relative URI.[Line = 4, Column = 13] >Error: {W136} Relative URIs are not permitted in RDF <error>[Line = 4, >Column = 13] > >> When invoking the parser directly it does not assign a Base URI to the >> Graph hence URI resolution fails and you get a parsing error. > >As noted above it might be something else (at least for W3C validator) >but as long as DotNetRDF is able to notify about issues like this (it >is, provided the parser method is used) I have nothing to complain >about. :) > >> So this behavior is a little inconsistent and confusing but it is >>somewhat >> by design, the LoadFromFile() and FileLoader.Load() methods are designed >> to be user friendly abstractions which remove some of the complexity of >> selecting a parser and invoking it while also protecting users from some >> common errors e.g. missing Base URI by setting up the parser invocation >> appropriately. > >Would it make sense to document this difference in behavior? (E.g., >add a notice / warning to user-friendly methods saying the warnings >will be hidden) > >It would help in cases like mine when looking for a parser that would >warn of malformed RDF and other errors (to use as an RDF validator). >In this case a user-friendly parser is not helpful at all and it is >good to know one has to look at the parser method instead. > >> We could change the behavior to make it consistent (invoking a parser >> directly on a file would set the Base URI for the Graph) but then we are >> hiding errors from advanced users. > >Hiding errors from advanced users does not sound good :) > >Also, setting the Base URI might not get rid of the warning (maybe it >does, I did not try the modified version on DotNetRDF yet). > >> With regards to warnings I don't have an example but it uses the >>standard >> .Net event pattern, Warning is an event defined by all IRdfReader >> implementations and you add an event handler to it like any other .Net >> event >> >> parser.Warning += new RdfReaderWarning(handlerMethod); > >I'll have to explore it. I have a reasonably good knowledge of RDF but >a very limited knowledge of .Net or C#. > >Thanks, >Uldis |
From: Uldis B. <cap...@gm...> - 2012-09-24 19:44:30
|
Hi Rob, Thanks for looking into this. > The RDF/XML specification has the following to say on relative URI > resolution: It might be more of a problem with what is allowed in the RDF Property element name than with relative URIs (which, indeed, are fine as the program is allowed to determine the base URI itself). At least a modified example with xml:base added still produces same W3C RDF validator warnings: <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1" xml:base="http://captsolo.net/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://localhost:8081/data/obj/1000"> <error>no info how to convert this element: creator</error> </rdf:Description> </rdf:RDF> Error: {W104} Unqualified property elements are not allowed. Treated as a relative URI.[Line = 4, Column = 13] Error: {W136} Relative URIs are not permitted in RDF <error>[Line = 4, Column = 13] > When invoking the parser directly it does not assign a Base URI to the > Graph hence URI resolution fails and you get a parsing error. As noted above it might be something else (at least for W3C validator) but as long as DotNetRDF is able to notify about issues like this (it is, provided the parser method is used) I have nothing to complain about. :) > So this behavior is a little inconsistent and confusing but it is somewhat > by design, the LoadFromFile() and FileLoader.Load() methods are designed > to be user friendly abstractions which remove some of the complexity of > selecting a parser and invoking it while also protecting users from some > common errors e.g. missing Base URI by setting up the parser invocation > appropriately. Would it make sense to document this difference in behavior? (E.g., add a notice / warning to user-friendly methods saying the warnings will be hidden) It would help in cases like mine when looking for a parser that would warn of malformed RDF and other errors (to use as an RDF validator). In this case a user-friendly parser is not helpful at all and it is good to know one has to look at the parser method instead. > We could change the behavior to make it consistent (invoking a parser > directly on a file would set the Base URI for the Graph) but then we are > hiding errors from advanced users. Hiding errors from advanced users does not sound good :) Also, setting the Base URI might not get rid of the warning (maybe it does, I did not try the modified version on DotNetRDF yet). > With regards to warnings I don't have an example but it uses the standard > .Net event pattern, Warning is an event defined by all IRdfReader > implementations and you add an event handler to it like any other .Net > event > > parser.Warning += new RdfReaderWarning(handlerMethod); I'll have to explore it. I have a reasonably good knowledge of RDF but a very limited knowledge of .Net or C#. Thanks, Uldis |
From: Rob V. <rv...@do...> - 2012-09-24 18:27:57
|
Hi Uldis After some investigation I have to conclude that this is not a bug in the RDF/XML parser, it may be something of an inconsistency in dotNetRDF behavior but it is allowable within the specification. The RDF/XML specification has the following to say on relative URI resolution: "Relative URI references are resolved into RDF URI references according to the algorithm specified in XML Base [XML-BASE] (and RFC 2396)" RFC 2396 (http://www.ietf.org/rfc/rfc2396.txt) is a document which defines URIs, the section of interest is 5.1 which specifies how the Base URI is determined and allows the Base URI to be application determined. Note - RDF 3986 supersedes this document but was published after the RDF/XML spec hence the reference to the old document but the same provision for Base URIs remains in the later document. It's this last bit about application defined Base URI that is important, depending on how you invoke the parser the API is setting an application defined Base URI. When you invoke via the LoadFromFile() method (which internally calls the FileLoader.Load() method) the FileLoader code assigns a Base URI to the Graph instance which is the file URI for the file being loaded (unless your graph already has a Base URI defined). So when invoked this way parsing succeeds because an application defined Base URI is present When invoking the parser directly it does not assign a Base URI to the Graph hence URI resolution fails and you get a parsing error. So this behavior is a little inconsistent and confusing but it is somewhat by design, the LoadFromFile() and FileLoader.Load() methods are designed to be user friendly abstractions which remove some of the complexity of selecting a parser and invoking it while also protecting users from some common errors e.g. missing Base URI by setting up the parser invocation appropriately. Invoking the parsers directly is intended more for use by advanced users and is the preferred way to invoke a parser if you want to do true validation of the data as you are in full control of how you invoke it. We could change the behavior to make it consistent (invoking a parser directly on a file would set the Base URI for the Graph) but then we are hiding errors from advanced users. With regards to warnings I don't have an example but it uses the standard .Net event pattern, Warning is an event defined by all IRdfReader implementations and you add an event handler to it like any other .Net event parser.Warning += new RdfReaderWarning(handlerMethod); Hope this helps explain things, Rob On 9/23/12 2:51 AM, "Uldis Bojars" <cap...@gm...> wrote: >Hi Rob > >> Could you please supply an example of RDF/XML that reproduces this >>problem >> in order for us to investigate it >> >> TraceParsing would not show any warnings only parsing debug information, >> subscribe to the Warning event on the parser if you wish to do that >>though >> I'm not sure if the RdfXmlParser ever generates any warnings > >Could you point me to an example how to subscribe to Warning events? > >Found out more re this problem. The behavior is different depending on >how you call the parser. > >This code does not return an error message (and parsing the RDF below >returns a triple treating <error> property as a relative URI): > >var p = new RdfXmlParser(); >g.LoadFromFile(fname, p); > >While this code returns an error (try / catch omitted from the snippet >for brevity): > >var p = new RdfXmlParser(); >p.Load(g, fname) > >Parser Error >[Line 4 Column 6] Cannot resolve a QName in the Default Namespace when >there is >no in-scope Base URI and no Default Namespace defined > >RDF/XML example: > ><rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1" >xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> > <rdf:Description rdf:about="http://localhost:8081/data/obj/1000"> > <error>no info how to convert this element: creator</error> > </rdf:Description> ></rdf:RDF> > >Uldis > >> ________________________________ >> From: "Uldis Bojars" <cap...@gm...> >> Sent: Saturday, September 22, 2012 5:41 AM >> To: dot...@li... >> Subject: [dotNetRDF-Support] How to validate RDF/XML with DotNetRdf >> >> >> Hi, >> >> DotNetRdf seems to be tolerant to errors when parsing RDF/XML (with >> RdfXmlParser and Graph.LoadFromFile). >> >> E.g., in a file which has an element w/o namespace and no default >> namespace defined the W3C RDF validator would return errors but >> DotNetRdf parses the file without even a warning (unless .TraceParsing >> = true is not sufficient to show warnings). >> >> Is it possible to do strict RDF/XML validation with DotNetRdf, failing >> with an exception when validation errors appear? >> >> Thanks, >> Uldis >> >> >>------------------------------------------------------------------------- >>----- >> How fast is your code? >> 3 out of 4 devs don\\\'t know how their code performs in production. >> Find out how slow your code is with AppDynamics Lite. >> http://ad.doubleclick.net/clk;262219672;13503038;z? >> http://info.appdynamics.com/FreeJavaPerformanceDownload.html >> _______________________________________________ >> dotNetRDF-Support mailing list >> dot...@li... >> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >> >> >>------------------------------------------------------------------------- >>----- >> How fast is your code? >> 3 out of 4 devs don\\\'t know how their code performs in production. >> Find out how slow your code is with AppDynamics Lite. >> http://ad.doubleclick.net/clk;262219672;13503038;z? >> http://info.appdynamics.com/FreeJavaPerformanceDownload.html >> _______________________________________________ >> dotNetRDF-Support mailing list >> dot...@li... >> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >> |
From: Uldis B. <cap...@gm...> - 2012-09-23 09:52:01
|
Hi Rob > Could you please supply an example of RDF/XML that reproduces this problem > in order for us to investigate it > > TraceParsing would not show any warnings only parsing debug information, > subscribe to the Warning event on the parser if you wish to do that though > I'm not sure if the RdfXmlParser ever generates any warnings Could you point me to an example how to subscribe to Warning events? Found out more re this problem. The behavior is different depending on how you call the parser. This code does not return an error message (and parsing the RDF below returns a triple treating <error> property as a relative URI): var p = new RdfXmlParser(); g.LoadFromFile(fname, p); While this code returns an error (try / catch omitted from the snippet for brevity): var p = new RdfXmlParser(); p.Load(g, fname) Parser Error [Line 4 Column 6] Cannot resolve a QName in the Default Namespace when there is no in-scope Base URI and no Default Namespace defined RDF/XML example: <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="http://localhost:8081/data/obj/1000"> <error>no info how to convert this element: creator</error> </rdf:Description> </rdf:RDF> Uldis > ________________________________ > From: "Uldis Bojars" <cap...@gm...> > Sent: Saturday, September 22, 2012 5:41 AM > To: dot...@li... > Subject: [dotNetRDF-Support] How to validate RDF/XML with DotNetRdf > > > Hi, > > DotNetRdf seems to be tolerant to errors when parsing RDF/XML (with > RdfXmlParser and Graph.LoadFromFile). > > E.g., in a file which has an element w/o namespace and no default > namespace defined the W3C RDF validator would return errors but > DotNetRdf parses the file without even a warning (unless .TraceParsing > = true is not sufficient to show warnings). > > Is it possible to do strict RDF/XML validation with DotNetRdf, failing > with an exception when validation errors appear? > > Thanks, > Uldis > > ------------------------------------------------------------------------------ > How fast is your code? > 3 out of 4 devs don\\\'t know how their code performs in production. > Find out how slow your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219672;13503038;z? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > > ------------------------------------------------------------------------------ > How fast is your code? > 3 out of 4 devs don\\\'t know how their code performs in production. > Find out how slow your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219672;13503038;z? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > |