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: Mark D W. <mar...@ko...> - 2015-04-09 13:19:15
|
I have the following SPARQL query which Apache Fuseki evaluates just fine, but which dotNetRDF throws an exception in method ParseInternal in SparqlQueryParser if I try to parse it locally. This query, borrowing from someone's kind example<http://stackoverflow.com/questions/11040274/custom-functions-in-sparql-with-the-jena-api> on Stack Overflow, computes an average and standard deviation value using a Jena-specific built-in function. PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX sem: <http://ns.kodak.com/sem/1.0/> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> SELECT ( afn:sqrt( sum( (?fVal - ?ave) * (?fVal - ?ave) ) / (COUNT(?fv) - 1) ) as ?stddev ) (avg(?fVal) as ?a) FROM <urn:guid:mdw> WHERE { ?pic sem:MyPredicate ?fv . BIND (xsd:float(?fv ) AS ?fVal) { SELECT (AVG(?fVal2) AS ?ave) (COUNT(?fVal2) as ?cnt) WHERE { ?pic sem:MyPredicate ?fvi . BIND (xsd:float(?fvi ) AS ?fVal2) } } } The SPARQL 1.1 specification does say in Section 1.1 In aggregate queries and sub-queries, variables that appear in the query pattern, but are not in the GROUP BY clause, can only be projected or used in select expressions if they are aggregated. The SAMPLE aggregate may be used for this purpose. For details see the section on Projection Restrictions<http://www.w3.org/TR/sparql11-query/#aggregateRestrictions>. so it would appear that Fuseki is supporting something here that goes beyond the standard? (If so, it is a nice extension as otherwise I don't know how I'd compute a standard deviation.) I believe the exception is generated in the following line of code: //Check that either there are no Aggregates used or only Aggregates used if (SparqlSpecsHelper.IsSelectQuery(context.Query.QueryType) && (context.Query.IsAggregate && context.Query.GroupBy == null && context.Query.Variables.Any(v => v.IsResultVariable && !v.IsAggregate))) { throw new RdfParseException("The Select Query is invalid since it contains both Aggregates and Variables in the SELECT Clause but it does not contain a GROUP BY clause"); } Is there a way to get dotNetRDF to pass this query along to Fuseki? I am using SparqlConnector.Query. Thanks, -Mark |
From: Rob V. <rv...@do...> - 2015-03-23 09:19:32
|
All We're pleased to announce the release of dotNetRDF 1.0.8, this is a stability and bug fix release addressing various issues identified by the community particularly around our SPARQL engine. It can be obtained via our website or via all the usual channels - BitBucket, SourceForge, CodePlex and NuGet Thanks to Peter Kahle and Kal Ahmed we've further upgraded our PCL support to Profile 328 which means we now support a wider range of .Net platforms than ever before Many thanks to everyone who contributed bug reports, test cases and fixes to this release. Best Regards, Rob Vesse |
From: Rob V. <rv...@do...> - 2015-02-25 11:15:39
|
Hi If the query has zero results then it does not match the data. Try breaking your query down into simpler queries to see which parts do and don't match data in order to figure out why your query doesn't work See the following documentation for some more tips on this: https://bitbucket.org/dotnetrdf/dotnetrdf/wiki/HowTo/Debug%20SPARQL%20Querie s.wiki#!debugging-sparql-queries Rob From: "Chernbumroong, Saisakul" <sai...@nt...> Date: Monday, 9 February 2015 12:41 To: Rob Vesse <rv...@do...> Subject: RE: [dotNetRDF-Support] Help with reasoner in dornetrdf > Dear Rob, > > Thank you for your help. > > I would like to ask another question. I am trying to retrieve all property > restriction of a particular class using SPARQL. However, I couldn’t get any > results (result=0). Could you please give suggestion? > > My query: > > SELECT ?p > WHERE { > p:DogPerson rdfs:subClassOf ?p. > ?p a owl:Restriction. > } > > I also tried: > > SELECT ?z > WHERE { > p:DogPerson (rdfs:subClassOf)/owl:onProperty ?z. > } > > > > > Regards, > > Saisakul Chernbumroong > > > Research fellow > > Nottingham Trent University > Clifton Campus > NG11 8NS > > > From: Rob Vesse [mailto:rv...@do...] > Sent: 30 January 2015 17:46 > To: dotNetRDF User Help and Support > Cc: Chernbumroong, Saisakul > Subject: Re: [dotNetRDF-Support] Help with reasoner in dornetrdf > > > Hi > > > > The reasoner you are using only does RDFS reasoning so it is no surprise that > it doesn't not infer something that requires OWL support > > > > dotNetRDF has no native OWL reasoning support, use a 3rd party store like > Stardog > (https://bitbucket.org/dotnetrdf/dotnetrdf/wiki/UserGuide/Storage/Stardog) > which does support OWL reasoning if you need OWL reasoning. There is a free > community edition that should be suitable for use if you are a student > > > > Rob > > > > p.s. this is a subscription based list, I have moderated your email through > this time and CC'd you on the reply but please subscribe > (https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support) if you wish > to continue participating in discussions > > > > From: "Chernbumroong, Saisakul" <sai...@nt...> > Reply-To: dotNetRDF User Help and Support > <dot...@li...> > Date: Friday, 30 January 2015 08:33 > To: "dot...@li..." > <dot...@li...> > Subject: [dotNetRDF-Support] Help with reasoner in dornetrdf > > >> >> Dear Sir, >> >> >> >> I am currently working on a project using ontology. My application is >> developed using .NET and I have downloaded your API for the reasoning >> purpose. However, when I did the inference, the results was not as I >> expected. It only infers the super class of the object. For example: >> >> >> >> The owl file: >> >> >> >> <!-- >> >> >> ///////////////////////////////////////////////////////////////////////////// >> ////////// >> >> // >> >> // Object Properties >> >> // >> >> >> ///////////////////////////////////////////////////////////////////////////// >> ////////// >> >> --> >> >> >> >> >> >> >> >> >> >> <!-- >> http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94# >> hasPet --> >> >> >> >> <owl:ObjectProperty rdf:about="&untitled-ontology-94;hasPet"> >> >> <rdfs:domain rdf:resource="&untitled-ontology-94;Human"/> >> >> <rdfs:range rdf:resource="&untitled-ontology-94;Pet"/> >> >> </owl:ObjectProperty> >> >> >> >> >> >> >> >> <!-- >> >> >> ///////////////////////////////////////////////////////////////////////////// >> ////////// >> >> // >> >> // Classes >> >> // >> >> >> ///////////////////////////////////////////////////////////////////////////// >> ////////// >> >> --> >> >> >> >> >> >> >> >> >> >> <!-- >> http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94# >> Cat --> >> >> >> >> <owl:Class rdf:about="&untitled-ontology-94;Cat"> >> >> <rdfs:subClassOf rdf:resource="&untitled-ontology-94;Pet"/> >> >> <owl:disjointWith rdf:resource="&untitled-ontology-94;Dog"/> >> >> </owl:Class> >> >> >> >> >> >> >> >> <!-- >> http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94# >> CatPerson --> >> >> >> >> <owl:Class rdf:about="&untitled-ontology-94;CatPerson"> >> >> <owl:equivalentClass> >> >> <owl:Class> >> >> <owl:intersectionOf rdf:parseType="Collection"> >> >> <rdf:Description >> rdf:about="&untitled-ontology-94;Human"/> >> >> <owl:Restriction> >> >> <owl:onProperty >> rdf:resource="&untitled-ontology-94;hasPet"/> >> >> <owl:someValuesFrom >> rdf:resource="&untitled-ontology-94;Cat"/> >> >> </owl:Restriction> >> >> </owl:intersectionOf> >> >> </owl:Class> >> >> </owl:equivalentClass> >> >> <owl:disjointWith rdf:resource="&untitled-ontology-94;DogPerson"/> >> >> </owl:Class> >> >> >> >> >> >> >> >> <!-- >> http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94# >> Dog --> >> >> >> >> <owl:Class rdf:about="&untitled-ontology-94;Dog"> >> >> <rdfs:subClassOf rdf:resource="&untitled-ontology-94;Pet"/> >> >> </owl:Class> >> >> >> >> >> >> >> >> <!-- >> http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94# >> DogPerson --> >> >> >> >> <owl:Class rdf:about="&untitled-ontology-94;DogPerson"> >> >> <owl:equivalentClass> >> >> <owl:Class> >> >> <owl:intersectionOf rdf:parseType="Collection"> >> >> <rdf:Description >> rdf:about="&untitled-ontology-94;Human"/> >> >> <owl:Restriction> >> >> <owl:onProperty >> rdf:resource="&untitled-ontology-94;hasPet"/> >> >> <owl:someValuesFrom >> rdf:resource="&untitled-ontology-94;Dog"/> >> >> </owl:Restriction> >> >> </owl:intersectionOf> >> >> </owl:Class> >> >> </owl:equivalentClass> >> >> <rdfs:subClassOf rdf:resource="&untitled-ontology-94;Human"/> >> >> </owl:Class> >> >> >> >> >> >> >> >> <!-- >> http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94# >> Human --> >> >> >> >> <owl:Class rdf:about="&untitled-ontology-94;Human"> >> >> <owl:disjointWith rdf:resource="&untitled-ontology-94;Pet"/> >> >> </owl:Class> >> >> >> >> >> >> >> >> <!-- >> http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94# >> Pet --> >> >> >> >> <owl:Class rdf:about="&untitled-ontology-94;Pet"> >> >> <rdfs:subClassOf rdf:resource="&owl;Thing"/> >> >> </owl:Class> >> >> >> >> >> >> >> >> <!-- >> >> >> ///////////////////////////////////////////////////////////////////////////// >> ////////// >> >> // >> >> // Individuals >> >> // >> >> >> ///////////////////////////////////////////////////////////////////////////// >> ////////// >> >> --> >> >> >> >> >> >> >> >> >> >> <!-- >> http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94# >> ADog --> >> >> >> >> <owl:NamedIndividual rdf:about="&untitled-ontology-94;ADog"> >> >> <rdf:type rdf:resource="&untitled-ontology-94;Dog"/> >> >> <rdf:type rdf:resource="&untitled-ontology-94;Pet"/> >> >> </owl:NamedIndividual> >> >> >> >> >> >> >> >> <!-- >> http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94# >> John --> >> >> >> >> <owl:NamedIndividual rdf:about="&untitled-ontology-94;John"> >> >> <hasPet rdf:resource="&untitled-ontology-94;ADog"/> >> >> </owl:NamedIndividual> >> >> </rdf:RDF> >> >> >> >> >> >> My code is as follow: >> >> >> >> //First we want to load our data and schema into Graphs >> >> Graph data = newGraph(); >> >> FileLoader.Load(data, "ontology.owl"); >> >> Graph schema = newGraph(); >> >> FileLoader.Load(schema, "ontology.owl"); >> >> >> >> //Now we ask for things which are cars from our data Graph >> >> IUriNode rdfType = >> data.CreateUriNode(newUri(RdfSpecsHelper.RdfType)); >> >> //This will result in the triples defining the type for >> :FordFiesta >> >> //and :AudiA8 being printed >> >> //BUT without inference we don't know that :FerrariEnzo is a car >> >> >> >> //So now we'll go ahead and apply inference >> >> RdfsReasoner reasoner2 = newRdfsReasoner(); >> >> reasoner2.Initialise(schema); >> >> reasoner2.Apply(data); >> >> >> >> foreach (Triple t in data.GetTriplesWithPredicate(rdfType)) >> >> { >> >> Console.WriteLine(t.ToString()); >> >> } >> >> >> >> However, the reasoner cannot discover that John is a dog person. It only >> found that John is a human. Can you suggest a way to run the reasoner so it >> knows that John is a dog person? Or is this not possible using dotnetrdf? >> Thank you for your help >> >> >> >> Regards, >> >> >> >> Saisakul Chernbumroong >> >> >> >> >> >> Research fellow >> >> >> >> Nottingham Trent University >> >> Clifton Campus >> >> NG11 8NS >> >> >> >> >> >> DISCLAIMER: This email is intended solely for the addressee. It may contain >> private and confidential information. If you are not the intended addressee, >> please take no action based on it nor show a copy to anyone. In this case, >> please reply to this email to highlight the error. Opinions and information >> in this email that do not relate to the official business of Nottingham Trent >> University shall be understood as neither given nor endorsed by the >> University. Nottingham Trent University has taken steps to ensure that this >> email and any attachments are virus-free, but we do advise that the recipient >> should check that the email and its attachments are actually virus free. This >> is in keeping with good computing practice. >> ----------------------------------------------------------------------------- >> - Dive into the World of Parallel Programming. The Go Parallel Website, >> sponsored by Intel and developed in partnership with Slashdot Media, is your >> hub for all things parallel software development, from weekly thought >> leadership blogs to news, videos, case studies, tutorials and more. Take a >> look and join the conversation now. >> http://goparallel.sourceforge.net/___________________________________________ >> ____ dotNetRDF-Support mailing list >> dot...@li...https://lists.sourceforge.net/lists/li >> stinfo/dotnetrdf-support > DISCLAIMER: This email is intended solely for the addressee. It may contain > private and confidential information. If you are not the intended addressee, > please take no action based on it nor show a copy to anyone. In this case, > please reply to this email to highlight the error. Opinions and information in > this email that do not relate to the official business of Nottingham Trent > University shall be understood as neither given nor endorsed by the > University. Nottingham Trent University has taken steps to ensure that this > email and any attachments are virus-free, but we do advise that the recipient > should check that the email and its attachments are actually virus free. This > is in keeping with good computing practice. |
From: Rob V. <rv...@do...> - 2015-02-19 10:28:43
|
Hi Please see the documentation on Typed Values and Lists which discusses how to do this: http://bitbucket.org/dotnetrdf/dotnetrdf/wiki/UserGuide/Typed%20Values%20and %20Lists Note that there isn't a specific method that converts to a byte but you can convert to an integer and down cast to a byte Rob PS This is a subscription based list, I have moderated your question through and CC'd you on the reply on this occasion but please subscribe at https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support if you wish to ask further questions From: Ladislav Běhal <lb...@gm...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Thursday, 19 February 2015 10:07 To: <dot...@li...> Subject: [dotNetRDF-Support] LiteralNode value to .Net object > Hi, > > is there any way how to convert LiteralNode Value to .Net type according to > LiteralNode DataType? > > Value is ("http://www.w3.org/2001/XMLSchema#byte") -> .NET byte > > Thanks for any suggestions > > Lada > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from > Actuate! Instantly Supercharge Your Business Reports and Dashboards with > Interactivity, Sharing, Native Excel Exports, App Integration & more Get > technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk__ > _____________________________________________ dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Ladislav B. <lb...@gm...> - 2015-02-19 10:07:38
|
Hi, is there any way how to convert LiteralNode Value to .Net type according to LiteralNode DataType? Value is ("http://www.w3.org/2001/XMLSchema#byte") -> .NET byte Thanks for any suggestions Lada |
From: Rob V. <rv...@do...> - 2015-02-12 10:09:19
|
No, those are property graph databases while dotNetRDF is concerned with RDF databases While both are graph data models there are some key differences that make mapping between the two models possible but somewhat awkward. Regards, Rob P.s. This is a subscription based list, your first post was moderated through but future posts will be rejected, please subscribe at https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support if you wish to ask further questions From: Duy Nguyen <dn...@rt...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Thursday, 12 February 2015 09:22 To: "dot...@li..." <dot...@li...> Subject: [dotNetRDF-Support] Compatibility > Hi, > > I would like to know if dotnetrdf is compatible with Neo4j and Ontotext > database ? > > > Thank you, > > Kind Regards. > Duy Nguyen > Deputy Broadcast IT Software Development Manager > RTL Belgium S.A. > Avenue Jacques Georginlaan 2 - Bruxelles 1030 Brussel > Tel: +32 2 337 6691 – GSM: +32 (0) 478 77 74 41 > dn...@rt... <mailto:dn...@rt...> – www.rtl.be > <http://www.rtl.be/rtlbelgium/> > <https://ontime.rtl.be/bdc/intranet/signatures/ban_rtlbelgium.php> > This communication, issued by RTL Belgium S.A., is confidential and we do not > waive confidentiality by mistransmission. If you have received it by mistake > please notify the sender immediately by reply and then delete it permanently > from your system without copying it, using it for any purposes or disclosing > its contents to any other person. Thank you for your cooperation. Any views > expressed in this message are those of the individual sender and may not > necessarily reflect the views of RTL Belgium S.A. Emails are not secure and > cannot be guaranteed to be error free as they can be intercepted, amended, > lost or destroyed, or contain viruses. Anyone who communicates with us by > email is taken to accept these risks. > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. > http://goparallel.sourceforge.net/____________________________________________ > ___ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Duy N. <dn...@rt...> - 2015-02-12 09:35:20
|
Hi, I would like to know if dotnetrdf is compatible with Neo4j and Ontotext database ? Thank you, Kind Regards. Duy Nguyen Deputy Broadcast IT Software Development Manager RTL Belgium S.A. Avenue Jacques Georginlaan 2 - Bruxelles 1030 Brussel Tel: +32 2 337 6691 - GSM: +32 (0) 478 77 74 41 dn...@rt...<mailto:dn...@rt...> - www.rtl.be<http://www.rtl.be/rtlbelgium/> [https://ontime.rtl.be/bdc/intranet/signatures/ban_rtlbelgium.jpg]<https://ontime.rtl.be/bdc/intranet/signatures/ban_rtlbelgium.php> This communication, issued by RTL Belgium S.A., is confidential and we do not waive confidentiality by mistransmission. If you have received it by mistake please notify the sender immediately by reply and then delete it permanently from your system without copying it, using it for any purposes or disclosing its contents to any other person. Thank you for your cooperation. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of RTL Belgium S.A. Emails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. Anyone who communicates with us by email is taken to accept these risks. |
From: Rob V. <rv...@do...> - 2015-01-30 17:47:17
|
Hi The reasoner you are using only does RDFS reasoning so it is no surprise that it doesn't not infer something that requires OWL support dotNetRDF has no native OWL reasoning support, use a 3rd party store like Stardog (https://bitbucket.org/dotnetrdf/dotnetrdf/wiki/UserGuide/Storage/Stardog) which does support OWL reasoning if you need OWL reasoning. There is a free community edition that should be suitable for use if you are a student Rob p.s. this is a subscription based list, I have moderated your email through this time and CC'd you on the reply but please subscribe (https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support) if you wish to continue participating in discussions From: "Chernbumroong, Saisakul" <sai...@nt...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Friday, 30 January 2015 08:33 To: "dot...@li..." <dot...@li...> Subject: [dotNetRDF-Support] Help with reasoner in dornetrdf > Dear Sir, > > I am currently working on a project using ontology. My application is > developed using .NET and I have downloaded your API for the reasoning purpose. > However, when I did the inference, the results was not as I expected. It only > infers the super class of the object. For example: > > The owl file: > > <!-- > > ////////////////////////////////////////////////////////////////////////////// > ///////// > // > // Object Properties > // > > ////////////////////////////////////////////////////////////////////////////// > ///////// > --> > > > > > <!-- > http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#h > asPet --> > > <owl:ObjectProperty rdf:about="&untitled-ontology-94;hasPet"> > <rdfs:domain rdf:resource="&untitled-ontology-94;Human"/> > <rdfs:range rdf:resource="&untitled-ontology-94;Pet"/> > </owl:ObjectProperty> > > > > <!-- > > ////////////////////////////////////////////////////////////////////////////// > ///////// > // > // Classes > // > > ////////////////////////////////////////////////////////////////////////////// > ///////// > --> > > > > > <!-- > http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#C > at --> > > <owl:Class rdf:about="&untitled-ontology-94;Cat"> > <rdfs:subClassOf rdf:resource="&untitled-ontology-94;Pet"/> > <owl:disjointWith rdf:resource="&untitled-ontology-94;Dog"/> > </owl:Class> > > > > <!-- > http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#C > atPerson --> > > <owl:Class rdf:about="&untitled-ontology-94;CatPerson"> > <owl:equivalentClass> > <owl:Class> > <owl:intersectionOf rdf:parseType="Collection"> > <rdf:Description rdf:about="&untitled-ontology-94;Human"/> > <owl:Restriction> > <owl:onProperty > rdf:resource="&untitled-ontology-94;hasPet"/> > <owl:someValuesFrom > rdf:resource="&untitled-ontology-94;Cat"/> > </owl:Restriction> > </owl:intersectionOf> > </owl:Class> > </owl:equivalentClass> > <owl:disjointWith rdf:resource="&untitled-ontology-94;DogPerson"/> > </owl:Class> > > > > <!-- > http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#D > og --> > > <owl:Class rdf:about="&untitled-ontology-94;Dog"> > <rdfs:subClassOf rdf:resource="&untitled-ontology-94;Pet"/> > </owl:Class> > > > > <!-- > http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#D > ogPerson --> > > <owl:Class rdf:about="&untitled-ontology-94;DogPerson"> > <owl:equivalentClass> > <owl:Class> > <owl:intersectionOf rdf:parseType="Collection"> > <rdf:Description rdf:about="&untitled-ontology-94;Human"/> > <owl:Restriction> > <owl:onProperty > rdf:resource="&untitled-ontology-94;hasPet"/> > <owl:someValuesFrom > rdf:resource="&untitled-ontology-94;Dog"/> > </owl:Restriction> > </owl:intersectionOf> > </owl:Class> > </owl:equivalentClass> > <rdfs:subClassOf rdf:resource="&untitled-ontology-94;Human"/> > </owl:Class> > > > > <!-- > http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#H > uman --> > > <owl:Class rdf:about="&untitled-ontology-94;Human"> > <owl:disjointWith rdf:resource="&untitled-ontology-94;Pet"/> > </owl:Class> > > > > <!-- > http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#P > et --> > > <owl:Class rdf:about="&untitled-ontology-94;Pet"> > <rdfs:subClassOf rdf:resource="&owl;Thing"/> > </owl:Class> > > > > <!-- > > ////////////////////////////////////////////////////////////////////////////// > ///////// > // > // Individuals > // > > ////////////////////////////////////////////////////////////////////////////// > ///////// > --> > > > > > <!-- > http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#A > Dog --> > > <owl:NamedIndividual rdf:about="&untitled-ontology-94;ADog"> > <rdf:type rdf:resource="&untitled-ontology-94;Dog"/> > <rdf:type rdf:resource="&untitled-ontology-94;Pet"/> > </owl:NamedIndividual> > > > > <!-- > http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#J > ohn --> > > <owl:NamedIndividual rdf:about="&untitled-ontology-94;John"> > <hasPet rdf:resource="&untitled-ontology-94;ADog"/> > </owl:NamedIndividual> > </rdf:RDF> > > > My code is as follow: > > //First we want to load our data and schema into Graphs > Graph data = new Graph(); > FileLoader.Load(data, "ontology.owl"); > Graph schema = new Graph(); > FileLoader.Load(schema, "ontology.owl"); > > //Now we ask for things which are cars from our data Graph > IUriNode rdfType = data.CreateUriNode(new > Uri(RdfSpecsHelper.RdfType)); > //This will result in the triples defining the type for > :FordFiesta > //and :AudiA8 being printed > //BUT without inference we don't know that :FerrariEnzo is a car > > //So now we'll go ahead and apply inference > RdfsReasoner reasoner2 = new RdfsReasoner(); > reasoner2.Initialise(schema); > reasoner2.Apply(data); > > foreach (Triple t in data.GetTriplesWithPredicate(rdfType)) > { > Console.WriteLine(t.ToString()); > } > > However, the reasoner cannot discover that John is a dog person. It only found > that John is a human. Can you suggest a way to run the reasoner so it knows > that John is a dog person? Or is this not possible using dotnetrdf? Thank you > for your help > > Regards, > > Saisakul Chernbumroong > > > Research fellow > > Nottingham Trent University > Clifton Campus > NG11 8NS > > > DISCLAIMER: This email is intended solely for the addressee. It may contain > private and confidential information. If you are not the intended addressee, > please take no action based on it nor show a copy to anyone. In this case, > please reply to this email to highlight the error. Opinions and information in > this email that do not relate to the official business of Nottingham Trent > University shall be understood as neither given nor endorsed by the > University. Nottingham Trent University has taken steps to ensure that this > email and any attachments are virus-free, but we do advise that the recipient > should check that the email and its attachments are actually virus free. This > is in keeping with good computing practice. > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming. The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. > http://goparallel.sourceforge.net/____________________________________________ > ___ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Chernbumroong, S. <sai...@nt...> - 2015-01-30 17:08:14
|
Dear Sir, I am currently working on a project using ontology. My application is developed using .NET and I have downloaded your API for the reasoning purpose. However, when I did the inference, the results was not as I expected. It only infers the super class of the object. For example: The owl file: <!-- /////////////////////////////////////////////////////////////////////////////////////// // // Object Properties // /////////////////////////////////////////////////////////////////////////////////////// --> <!-- http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#hasPet --> <owl:ObjectProperty rdf:about="&untitled-ontology-94;hasPet"> <rdfs:domain rdf:resource="&untitled-ontology-94;Human"/> <rdfs:range rdf:resource="&untitled-ontology-94;Pet"/> </owl:ObjectProperty> <!-- /////////////////////////////////////////////////////////////////////////////////////// // // Classes // /////////////////////////////////////////////////////////////////////////////////////// --> <!-- http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#Cat --> <owl:Class rdf:about="&untitled-ontology-94;Cat"> <rdfs:subClassOf rdf:resource="&untitled-ontology-94;Pet"/> <owl:disjointWith rdf:resource="&untitled-ontology-94;Dog"/> </owl:Class> <!-- http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#CatPerson --> <owl:Class rdf:about="&untitled-ontology-94;CatPerson"> <owl:equivalentClass> <owl:Class> <owl:intersectionOf rdf:parseType="Collection"> <rdf:Description rdf:about="&untitled-ontology-94;Human"/> <owl:Restriction> <owl:onProperty rdf:resource="&untitled-ontology-94;hasPet"/> <owl:someValuesFrom rdf:resource="&untitled-ontology-94;Cat"/> </owl:Restriction> </owl:intersectionOf> </owl:Class> </owl:equivalentClass> <owl:disjointWith rdf:resource="&untitled-ontology-94;DogPerson"/> </owl:Class> <!-- http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#Dog --> <owl:Class rdf:about="&untitled-ontology-94;Dog"> <rdfs:subClassOf rdf:resource="&untitled-ontology-94;Pet"/> </owl:Class> <!-- http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#DogPerson --> <owl:Class rdf:about="&untitled-ontology-94;DogPerson"> <owl:equivalentClass> <owl:Class> <owl:intersectionOf rdf:parseType="Collection"> <rdf:Description rdf:about="&untitled-ontology-94;Human"/> <owl:Restriction> <owl:onProperty rdf:resource="&untitled-ontology-94;hasPet"/> <owl:someValuesFrom rdf:resource="&untitled-ontology-94;Dog"/> </owl:Restriction> </owl:intersectionOf> </owl:Class> </owl:equivalentClass> <rdfs:subClassOf rdf:resource="&untitled-ontology-94;Human"/> </owl:Class> <!-- http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#Human --> <owl:Class rdf:about="&untitled-ontology-94;Human"> <owl:disjointWith rdf:resource="&untitled-ontology-94;Pet"/> </owl:Class> <!-- http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#Pet --> <owl:Class rdf:about="&untitled-ontology-94;Pet"> <rdfs:subClassOf rdf:resource="&owl;Thing"/> </owl:Class> <!-- /////////////////////////////////////////////////////////////////////////////////////// // // Individuals // /////////////////////////////////////////////////////////////////////////////////////// --> <!-- http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#ADog --> <owl:NamedIndividual rdf:about="&untitled-ontology-94;ADog"> <rdf:type rdf:resource="&untitled-ontology-94;Dog"/> <rdf:type rdf:resource="&untitled-ontology-94;Pet"/> </owl:NamedIndividual> <!-- http://www.semanticweb.org/cmp3cherns/ontologies/2014/9/untitled-ontology-94#John --> <owl:NamedIndividual rdf:about="&untitled-ontology-94;John"> <hasPet rdf:resource="&untitled-ontology-94;ADog"/> </owl:NamedIndividual> </rdf:RDF> My code is as follow: //First we want to load our data and schema into Graphs Graph data = new Graph(); FileLoader.Load(data, "ontology.owl"); Graph schema = new Graph(); FileLoader.Load(schema, "ontology.owl"); //Now we ask for things which are cars from our data Graph IUriNode rdfType = data.CreateUriNode(new Uri(RdfSpecsHelper.RdfType)); //This will result in the triples defining the type for :FordFiesta //and :AudiA8 being printed //BUT without inference we don't know that :FerrariEnzo is a car //So now we'll go ahead and apply inference RdfsReasoner reasoner2 = new RdfsReasoner(); reasoner2.Initialise(schema); reasoner2.Apply(data); foreach (Triple t in data.GetTriplesWithPredicate(rdfType)) { Console.WriteLine(t.ToString()); } However, the reasoner cannot discover that John is a dog person. It only found that John is a human. Can you suggest a way to run the reasoner so it knows that John is a dog person? Or is this not possible using dotnetrdf? Thank you for your help Regards, Saisakul Chernbumroong Research fellow Nottingham Trent University Clifton Campus NG11 8NS DISCLAIMER: This email is intended solely for the addressee. It may contain private and confidential information. If you are not the intended addressee, please take no action based on it nor show a copy to anyone. In this case, please reply to this email to highlight the error. Opinions and information in this email that do not relate to the official business of Nottingham Trent University shall be understood as neither given nor endorsed by the University. Nottingham Trent University has taken steps to ensure that this email and any attachments are virus-free, but we do advise that the recipient should check that the email and its attachments are actually virus free. This is in keeping with good computing practice. |
From: Rob V. <rv...@do...> - 2015-01-19 11:35:17
|
Tomasz This looks like a simple typo on our part since the MIME type should be "application/n-triples" - note the missing hyphen in your error message. This will be fixed in default shortly and will be incorporated in our next release Thanks for reporting this, Rob From: <Tom...@bt...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Thursday, 8 January 2015 16:02 To: <dot...@li...> Subject: [dotNetRDF-Support] dotNetRDF and Sesame REST service. Mime type exception > Hello, > > I have a question regarding the usage of dotNetRDF to communicate with Sesame > server. > I am receiving the following exception when trying to save a graph into a > Sesame server’s storage: > > “A HTTP error (HTTP 415 Unsupported Media Type) occured while save a Graph to > the Store. > Store returned the following error message: Unsupported MIME type: > application/ntriples > See aforementioned status line or inner exception for further details“ > > This is the code which I am using: > > SesameServer sesameServer = new > SesameServer("http://localhost:8080/openrdf-sesame"); > IStorageProvider storage_tsm1 = sesameServer.GetStore("tsm1"); > IStorageProvider storage_tsm2 = sesameServer.GetStore("tsm2"); > Graph loadedGraph = new Graph(); > storage_tsm1.LoadGraph(loadedGraph, "file://archive.ttl"); > storage_tsm2.SaveGraph(loadedGraph); > > The exception occurs at the last statement. > > I have also noticed, that by changing the line 542 in > SesameHttpProtocolConnector class in this way: > From: request.ContentType = MimeTypesHelper.NTriples[0]; > To: request.ContentType = MimeTypesHelper.NTriples[1]; > The exception does not occur and the graph is being saved correctly. > > Please tell me if there is a better solution for this exception? > > Sesame version: 2.7.14 > dotNetRDF version: 1.0.8.0 > > Best regards > > Tomasz Firlej > Junior programmer > BTC Business Technology Consulting Sp. z o.o. > ul. Małe Garbary 9 > 61-756 Poznań > Tel. +48 (0) 61 85 60 936 > Fax. +48 (0) 61 85 01 870 > E-mail: tom...@bt... <mailto:tom...@bt...> > www.btc-ag.com <www.btc-ag.com> > www.bonapart.pl <http://www.bonapart.pl/> > > Sąd Rejonowy Poznań - Nowe Miasto i Wilda w Poznaniu > VIII Wydział Gospodarczy Krajowego Rejestru Sądowego: KRS 0000081161 > NIP 778-13-34-313 Kapitał zakładowy: 200.000 PLN > > ------------------------------------------------------------------------------ > New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET > is offering a free month of service with a new server in Ashburn. Choose from > 2 high performing configs, both with 100TB of bandwidth. Higher > redundancy.Lower latency.Increased capacity.Completely compliant. vanity: > www.gigenet.com_______________________________________________ > dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: <Tom...@bt...> - 2015-01-08 16:23:01
|
Hello, I have a question regarding the usage of dotNetRDF to communicate with Sesame server. I am receiving the following exception when trying to save a graph into a Sesame server's storage: "A HTTP error (HTTP 415 Unsupported Media Type) occured while save a Graph to the Store. Store returned the following error message: Unsupported MIME type: application/ntriples See aforementioned status line or inner exception for further details" This is the code which I am using: SesameServer sesameServer = new SesameServer("http://localhost:8080/openrdf-sesame"); IStorageProvider storage_tsm1 = sesameServer.GetStore("tsm1"); IStorageProvider storage_tsm2 = sesameServer.GetStore("tsm2"); Graph loadedGraph = new Graph(); storage_tsm1.LoadGraph(loadedGraph, "file://archive.ttl"); storage_tsm2.SaveGraph(loadedGraph); The exception occurs at the last statement. I have also noticed, that by changing the line 542 in SesameHttpProtocolConnector class in this way: From: request.ContentType = MimeTypesHelper.NTriples[0]; To: request.ContentType = MimeTypesHelper.NTriples[1]; The exception does not occur and the graph is being saved correctly. Please tell me if there is a better solution for this exception? Sesame version: 2.7.14 dotNetRDF version: 1.0.8.0 Best regards Tomasz Firlej Junior programmer [cid:image001.gif@01D02B60.227EE260] BTC Business Technology Consulting Sp. z o.o. ul. Małe Garbary 9 61-756 Poznań Tel. +48 (0) 61 85 60 936 Fax. +48 (0) 61 85 01 870 E-mail: tom...@bt...<mailto:tom...@bt...> www.btc-ag.com www.bonapart.pl<http://www.bonapart.pl/> Sąd Rejonowy Poznań - Nowe Miasto i Wilda w Poznaniu VIII Wydział Gospodarczy Krajowego Rejestru Sądowego: KRS 0000081161 NIP 778-13-34-313 Kapitał zakładowy: 200.000 PLN |
From: Rob V. <rv...@do...> - 2014-12-17 10:27:34
|
Mark Please can you provide the exact code you use to reproduce this problem. I have tried in a couple of different ways and cannot reproduce the issue locally It would also be useful to know what version you are using (not that I am aware of any relevant bugs that might be affecting you) Rob From: Mark D Wood <mar...@ko...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Monday, 15 December 2014 14:25 To: dotNetRDF User Help and Support <dot...@li...> Subject: Re: [dotNetRDF-Support] typed literals > Hi Rob, > > Thanks for the reply. > > The tuples are getting loaded to the same graph against which the query is > being executed; I verified that by querying for all tuples. > > After reading the interesting article “RDF Literal Types in Practice” [1] I > thought to try the following: > > PREFIX me: <http://www.example.com/> > PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> > SELECT DISTINCT ?s ?p WHERE { > ?s ?p ?o . > FILTER (xsd:integer(?o) = 42) > } > > which in fact does work. > > Somehow the pattern matching doesn’t match, though. > > -Mark > > > > > [1] > http://iswc2011.semanticweb.org/fileadmin/iswc/Papers/Workshops/SSWS/Emmons-et > -all-SSWS2011.pdf > > > > From: Rob Vesse [mailto:rv...@do...] > Sent: Monday, December 15, 2014 7:05 AM > To: dotNetRDF User Help and Support > Subject: Re: [dotNetRDF-Support] typed literals > > > Mark > > > > You've likely run into the fact that when you've loaded your graph the library > automatically assigned it a name so then when you ran your query it only > considered the default graph which was empty rather than your named graph > which contained the actual data. > > > > https://bitbucket.org/dotnetrdf/dotnetrdf/wiki/UserGuide/Querying%20with%20SPA > RQL#!default-graph > > > > You likely just need to make sure that your loaded graph is actually the > default graph which you can do in several ways, the easiest of which (assuming > you have only a single graph) is simply to set the BaseUri property to null > after loading your data so that the graph is treated as the default graph when > you add it to a store ready for querying. > > > > Rob > > > > From: Mark D Wood <mar...@ko...> > Reply-To: dotNetRDF User Help and Support > <dot...@li...> > Date: Friday, 12 December 2014 20:50 > To: "dot...@li..." > <dot...@li...> > Subject: [dotNetRDF-Support] typed literals > > >> >> I’m noticing some anomalies in the handling of typed literals >> >> Here’s a very simple RDF/XML file, with just two statements. The first has a >> literal with an integer typed value of 42. >> >> <?xml version="1.0" encoding="utf-8"?> >> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns# >> <http://www.w3.org/1999/02/22-rdf-syntax-ns> " >> xmlns:dc="http://purl.org/dc/elements/1.1/" >> xml:base="http://www.w3.org/2001/XMLSchema# >> <http://www.w3.org/2001/XMLSchema> " xmlns:me="http://www.example.com/" >> <http://www.example.com/%22> > >> <rdf:Description rdf:about="urn:guid:00000000-0000-0000-0000-000000000003" > >> <me:A >> rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">42</me:A> >> <me:B rdf:datatype="integer">37</me:B> >> </rdf:Description> >> </rdf:RDF> >> >> If I execute the following query, >> >> PREFIX me: <http://www.example.com/> >> PREFIX xsd: <http://www.w3.org/2001/XMLSchema# >> <http://www.w3.org/2001/XMLSchema> > >> SELECT DISTINCT ?s ?p WHERE { >> ?s ?p 42 . >> } >> LIMIT 25 >> >> the two external triplestore implementations I tried correctly return one >> tuple; however, the dotNetRDF LeviathanQueryProcessor using the in-memory >> store does not return any tuples. Is this a bug, or operator error? >> >> Also, I was hoping to reduce the size of my RDF/XML by using the xml:base >> construct, but I don’t seem to be able to get the xml:base attribute to take >> effect. Is there a trick to getting that to work? >> >> Thanks, >> -Mark >> >> ----------------------------------------------------------------------------- >> - Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from >> Actuate! Instantly Supercharge Your Business Reports and Dashboards with >> Interactivity, Sharing, Native Excel Exports, App Integration & more Get >> technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk_ >> ______________________________________________ dotNetRDF-Support mailing list >> dot...@li...https://lists.sourceforge.net/lists/li >> stinfo/dotnetrdf-support > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from > Actuate! Instantly Supercharge Your Business Reports and Dashboards with > Interactivity, Sharing, Native Excel Exports, App Integration & more Get > technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk__ > _____________________________________________ dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Mark D W. <mar...@ko...> - 2014-12-15 16:00:44
|
Hi Rob, Thanks for the reply. The tuples are getting loaded to the same graph against which the query is being executed; I verified that by querying for all tuples. After reading the interesting article “RDF Literal Types in Practice” [1] I thought to try the following: PREFIX me: <http://www.example.com/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT DISTINCT ?s ?p WHERE { ?s ?p ?o . FILTER (xsd:integer(?o) = 42) } which in fact does work. Somehow the pattern matching doesn’t match, though. -Mark [1] http://iswc2011.semanticweb.org/fileadmin/iswc/Papers/Workshops/SSWS/Emmons-et-all-SSWS2011.pdf From: Rob Vesse [mailto:rv...@do...] Sent: Monday, December 15, 2014 7:05 AM To: dotNetRDF User Help and Support Subject: Re: [dotNetRDF-Support] typed literals Mark You've likely run into the fact that when you've loaded your graph the library automatically assigned it a name so then when you ran your query it only considered the default graph which was empty rather than your named graph which contained the actual data. https://bitbucket.org/dotnetrdf/dotnetrdf/wiki/UserGuide/Querying%20with%20SPARQL#!default-graph You likely just need to make sure that your loaded graph is actually the default graph which you can do in several ways, the easiest of which (assuming you have only a single graph) is simply to set the BaseUri property to null after loading your data so that the graph is treated as the default graph when you add it to a store ready for querying. Rob From: Mark D Wood <mar...@ko...<mailto:mar...@ko...>> Reply-To: dotNetRDF User Help and Support <dot...@li...<mailto:dot...@li...>> Date: Friday, 12 December 2014 20:50 To: "dot...@li...<mailto:dot...@li...>" <dot...@li...<mailto:dot...@li...>> Subject: [dotNetRDF-Support] typed literals I’m noticing some anomalies in the handling of typed literals Here’s a very simple RDF/XML file, with just two statements. The first has a literal with an integer typed value of 42. <?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns>" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:base="http://www.w3.org/2001/XMLSchema#<http://www.w3.org/2001/XMLSchema>" xmlns:me="http://www.example.com/"<http://www.example.com/%22>> <rdf:Description rdf:about="urn:guid:00000000-0000-0000-0000-000000000003" > <me:A rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">42</me:A> <me:B rdf:datatype="integer">37</me:B> </rdf:Description> </rdf:RDF> If I execute the following query, PREFIX me: <http://www.example.com/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#<http://www.w3.org/2001/XMLSchema>> SELECT DISTINCT ?s ?p WHERE { ?s ?p 42 . } LIMIT 25 the two external triplestore implementations I tried correctly return one tuple; however, the dotNetRDF LeviathanQueryProcessor using the in-memory store does not return any tuples. Is this a bug, or operator error? Also, I was hoping to reduce the size of my RDF/XML by using the xml:base construct, but I don’t seem to be able to get the xml:base attribute to take effect. Is there a trick to getting that to work? Thanks, -Mark ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk_______________________________________________ dotNetRDF-Support mailing list dot...@li...<mailto:dot...@li...> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Rob V. <rv...@do...> - 2014-12-15 12:05:40
|
Mark You've likely run into the fact that when you've loaded your graph the library automatically assigned it a name so then when you ran your query it only considered the default graph which was empty rather than your named graph which contained the actual data. https://bitbucket.org/dotnetrdf/dotnetrdf/wiki/UserGuide/Querying%20with%20S PARQL#!default-graph You likely just need to make sure that your loaded graph is actually the default graph which you can do in several ways, the easiest of which (assuming you have only a single graph) is simply to set the BaseUri property to null after loading your data so that the graph is treated as the default graph when you add it to a store ready for querying. Rob From: Mark D Wood <mar...@ko...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Friday, 12 December 2014 20:50 To: "dot...@li..." <dot...@li...> Subject: [dotNetRDF-Support] typed literals > I’m noticing some anomalies in the handling of typed literals > > Here’s a very simple RDF/XML file, with just two statements. The first has a > literal with an integer typed value of 42. > > <?xml version="1.0" encoding="utf-8"?> > <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:dc="http://purl.org/dc/elements/1.1/" > xml:base="http://www.w3.org/2001/XMLSchema#" > xmlns:me="http://www.example.com/"> > <rdf:Description rdf:about="urn:guid:00000000-0000-0000-0000-000000000003" > > <me:A > rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">42</me:A> > <me:B rdf:datatype="integer">37</me:B> > </rdf:Description> > </rdf:RDF> > > If I execute the following query, > > PREFIX me: <http://www.example.com/> > PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> > SELECT DISTINCT ?s ?p WHERE { > ?s ?p 42 . > } > LIMIT 25 > > the two external triplestore implementations I tried correctly return one > tuple; however, the dotNetRDF LeviathanQueryProcessor using the in-memory > store does not return any tuples. Is this a bug, or operator error? > > Also, I was hoping to reduce the size of my RDF/XML by using the xml:base > construct, but I don’t seem to be able to get the xml:base attribute to take > effect. Is there a trick to getting that to work? > > Thanks, > -Mark > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from > Actuate! Instantly Supercharge Your Business Reports and Dashboards with > Interactivity, Sharing, Native Excel Exports, App Integration & more Get > technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk__ > _____________________________________________ dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Mark D W. <mar...@ko...> - 2014-12-12 20:50:54
|
I'm noticing some anomalies in the handling of typed literals Here's a very simple RDF/XML file, with just two statements. The first has a literal with an integer typed value of 42. <?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:base="http://www.w3.org/2001/XMLSchema#" xmlns:me="http://www.example.com/"> <rdf:Description rdf:about="urn:guid:00000000-0000-0000-0000-000000000003" > <me:A rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">42</me:A> <me:B rdf:datatype="integer">37</me:B> </rdf:Description> </rdf:RDF> If I execute the following query, PREFIX me: <http://www.example.com/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT DISTINCT ?s ?p WHERE { ?s ?p 42 . } LIMIT 25 the two external triplestore implementations I tried correctly return one tuple; however, the dotNetRDF LeviathanQueryProcessor using the in-memory store does not return any tuples. Is this a bug, or operator error? Also, I was hoping to reduce the size of my RDF/XML by using the xml:base construct, but I don't seem to be able to get the xml:base attribute to take effect. Is there a trick to getting that to work? Thanks, -Mark |
From: Rob V. <rv...@do...> - 2014-12-11 10:04:30
|
Hi We never create rdf:type triples in the Ontology API unless you explicitly ask for them because the API doesn't know/care whether your ontology is written in RDFS/OWL/something else entirely and so has no idea what rdf:type would be appropriate. It is the rdf:type triple that is used to select the QNames for tags in XML output and rdf:Description is used only where there is no appropriate type to use. If you want something to be an OWL class then you need to explicitly call AddType() method as well with an appropriate type in order to create the necessary triple in your graph e.g. INode owlClass = graph.CreateUriNode("owl:Class"); class.AddType(owlClass); Hope this helps Rob From: <c.c...@gm...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Thursday, 11 December 2014 09:58 To: dotNetRdfSupport <dot...@li...> Subject: [dotNetRDF-Support] Creating a class bug > Hy, > i am building an ontolotgy. I would like create some classe inside. > this is my ontology > > <?xml version="1.0"?> > > > <!DOCTYPE rdf:RDF [ > <!ENTITY owl "http://www.w3.org/2002/07/owl#" > > <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > > <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > > <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > > <!ENTITY RiconoscimentoDocumenti > "http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#" > > ]> > > > <rdf:RDF xmlns="http://www.w3.org/2002/07/owl#" > xml:base="http://www.w3.org/2002/07/owl" > xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" > xmlns:owl="http://www.w3.org/2002/07/owl#" > xmlns:xsd="http://www.w3.org/2001/XMLSchema#" > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > > xmlns:RiconoscimentoDocumenti="http://www.semanticweb.org/Ac2/RiconoscimentoDo > cumenti#"> > <Ontology > rdf:about="http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti"/> > > > > > > > > <!-- http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#Categoria --> > > <Class rdf:about="&RiconoscimentoDocumenti;Categoria"> > <rdfs:subClassOf rdf:resource="&RiconoscimentoDocumenti;Documenti"/> > </Class> > > > > <!-- http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#Dictionary --> > > <Class rdf:about="&RiconoscimentoDocumenti;Dictionary"/> > > > > <!-- > http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#DocumentToReconize --> > > <Class rdf:about="&RiconoscimentoDocumenti;DocumentToReconize"> > <rdfs:subClassOf rdf:resource="&RiconoscimentoDocumenti;Documenti"/> > </Class> > > > > <!-- http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#Documenti --> > > <Class rdf:about="&RiconoscimentoDocumenti;Documenti"/> > </rdf:RDF> > > > > <!-- Generated by the OWL API (version 3.4.2) http://owlapi.sourceforge.net –> > > when i use the sintax to create a class > > OntologyGraph graph = new OntologyGraph(); > OntologyClass class = graph.CreateOntologyClass(new Uri(string uriClass)); > > Instead to obtain the tags of a class i get the tags of a rdf description . > is there someone to know how to resolve this bug? > > thanks to all. > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from > Actuate! Instantly Supercharge Your Business Reports and Dashboards with > Interactivity, Sharing, Native Excel Exports, App Integration & more Get > technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk__ > _____________________________________________ dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: <c.c...@gm...> - 2014-12-11 09:58:37
|
Hy, i am building an ontolotgy. I would like create some classe inside. this is my ontology <?xml version="1.0"?> <!DOCTYPE rdf:RDF [ <!ENTITY owl "http://www.w3.org/2002/07/owl#" > <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > <!ENTITY RiconoscimentoDocumenti "http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#" > ]> <rdf:RDF xmlns="http://www.w3.org/2002/07/owl#" xml:base="http://www.w3.org/2002/07/owl" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:RiconoscimentoDocumenti="http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#"> <Ontology rdf:about="http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti"/> <!-- http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#Categoria --> <Class rdf:about="&RiconoscimentoDocumenti;Categoria"> <rdfs:subClassOf rdf:resource="&RiconoscimentoDocumenti;Documenti"/> </Class> <!-- http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#Dictionary --> <Class rdf:about="&RiconoscimentoDocumenti;Dictionary"/> <!-- http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#DocumentToReconize --> <Class rdf:about="&RiconoscimentoDocumenti;DocumentToReconize"> <rdfs:subClassOf rdf:resource="&RiconoscimentoDocumenti;Documenti"/> </Class> <!-- http://www.semanticweb.org/Ac2/RiconoscimentoDocumenti#Documenti --> <Class rdf:about="&RiconoscimentoDocumenti;Documenti"/> </rdf:RDF> <!-- Generated by the OWL API (version 3.4.2) http://owlapi.sourceforge.net –> when i use the sintax to create a class OntologyGraph graph = new OntologyGraph(); OntologyClass class = graph.CreateOntologyClass(new Uri(string uriClass)); Instead to obtain the tags of a class i get the tags of a rdf description . is there someone to know how to resolve this bug? thanks to all. |
From: Rob V. <rv...@do...> - 2014-12-08 10:46:11
|
Mark Both connectors will set the PreAuthenticate property of the underlying .Net HttpWebRequest but this only works with servers that use Basic Authentication but this does make your credentials extractable by sniffing of the HTTP request. Some systems like Stardog may prefer to use the more secure Digest authentication which requires the full challenge response round trip but cannot expose your credentials. Though the fact that using SparqlConnector does pre-authenticate successfully and the StardogConnector does not is a little strange. As for why one implementation does pre-authenticate by default and the other does not I don't know why that would happen, the setup of the HTTP requests looks pretty identical to me on reviewing the code. If you have a large query then one connector may be POSTing when the other does not (though the threshold for choosing whether to GET or POST for queries should be the same for both connectors). Screenshots or dumps of the Fiddler traces would be interesting to see, or even just the Debug console traces producing by enabling Options.HttpDebugging. Note that you can also try forcing pre-authentication (using Basic Authentication) on connections by setting Options.ForceHttpBasicAuth to true Rob p.s. please remember to subscribe to the list if you intend to continue this discussions From: Mark D Wood <mar...@ko...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Friday, 5 December 2014 16:13 To: "dot...@li..." <dot...@li...> Subject: [dotNetRDF-Support] stardog connector & handling of authentication credentials > Hello, > > I noticed in doing some simple performance testing that executing a simple > SPARQL query against a Stardog SPARQL endpoint via the Stardog connector > versus using the SparqlConnector took considerably longer. > > That is, executing > > using (StardogConnector stardog = new StardogConnector(stardogURL, > SparqlDB, "admin", "admin")) > { > // execute SPARQL query > } > > takes longer than: > > using (SparqlConnector sc = new SparqlConnector(newUri(endptURL))) > { > sc.Endpoint.SetCredentials("admin", "admin"); > // do SPARQL query > } > > Watching the traffic with Fiddler, I see that with the Stardog connector, it > first attempts to execute the query w/o specifying the authentication > credentials, which results in a 401 error; it then reissues the query with the > credentials. So it takes longer, because of the retry. > > Any reason why the credentials aren’t passed the first time? > > Thanks, > > -Mark > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from > Actuate! Instantly Supercharge Your Business Reports and Dashboards with > Interactivity, Sharing, Native Excel Exports, App Integration & more Get > technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk__ > _____________________________________________ dotNetRDF-Support mailing list > dot...@li...https://lists.sourceforge.net/lists/lis > tinfo/dotnetrdf-support |
From: Mark D W. <mar...@ko...> - 2014-12-05 17:47:22
|
Hello, I noticed in doing some simple performance testing that executing a simple SPARQL query against a Stardog SPARQL endpoint via the Stardog connector versus using the SparqlConnector took considerably longer. That is, executing using (StardogConnector stardog = new StardogConnector(stardogURL, SparqlDB, "admin", "admin")) { // execute SPARQL query } takes longer than: using (SparqlConnector sc = new SparqlConnector(new Uri(endptURL))) { sc.Endpoint.SetCredentials("admin", "admin"); // do SPARQL query } Watching the traffic with Fiddler, I see that with the Stardog connector, it first attempts to execute the query w/o specifying the authentication credentials, which results in a 401 error; it then reissues the query with the credentials. So it takes longer, because of the retry. Any reason why the credentials aren't passed the first time? Thanks, -Mark |
From: Rob V. <rv...@do...> - 2014-12-04 16:33:58
|
Thanks for the test case Looks like it isn't appending the graph parameters to the right place in the POST case so they are indeed being omitted from the request Filed as CORE-434 (http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=434) and will be trivial to fix Rob On 04/12/2014 16:16, "Frank Schumacher" <fs...@in...> wrote: >Am 04.12.2014 16:01, schrieb Rob Vesse: >> That does indeed seem to be the case, I checked over the code and >> dotNetRDF's POSTed queries will definitely include the >> default-graph-uri/named-graph-uri parameters in the POST body as >> necessary. If you are able to provide code that shows a specific case >> where this does not happen then I can take a further look at it > >I created a little test programm that calls the problematic query with >post and with get. For me, the post request fails (which means it gets >data from the wrong graph). You can download the programm from >https://dl.dropboxusercontent.com/u/60331107/dotNetRDF_Post_Test.7z > > >> Having a lax parser might be possible but it would require something of >>a >> rewrite of the existing parser and there would only be certain classes >>of >> errors that were recoverable from. I would rather not provide lax >>parsers >> out of the box since it encourages bad data and hides genuine errors >>from >> users. This would certainly be something that might make a nice >>community >> supported plugin library if anyone wanted to give it a go ;) > >My skills are surely below sich a library ;) > >Thanks again, >Frank > > >> Rob >> >> On 02/12/2014 15:41, "Frank Schumacher" <fs...@in...> >> wrote: >> >>> Hey Rob, >>> >>> many thanks for your efforts! This is really a strange behaviour and it >>> took me a while to figure out what happens. >>> I found, that the corrupted data is in a different graph. My data (the >>> "ok" data) is in the graph "http://creativeartefact.org/", the corrupt >>> data is in "http://creativeartefact.org/testGraph/Simon/". >>> But I set the defaultGraphUri at the SparqlRemoteEndpoint, so maybe >>>when >>> using POST the defaultGraphUri is somehow lost? It seems, that you only >>> get the results you get with curl, when no default graph ist set. >>> >>> I'll leave the corrupt data a bit longer at the server, if you want to >>> check this. >>> >>> For the problem with invalid results returned from the server: Would it >>> be an option, to simply ignore those currupt results, maybe mentioning >>> that there is invalid data on the server but still returning the valid >>> ones? >>> >>> Thanks again for sorting that out and for providing a great tool and >>> even greater support! :) >>> >>> Frank >>> >>> Am 02.12.2014 15:26, schrieb Rob Vesse: >>>> Frank >>>> >>>> I can reproduce this with CURL so it is not a dotNetRDF specific >>>>issue. >>>> It appears to be caused by the Virtuoso server producing bad data, >>>>for >>>> example I see the following data (invalid parts highlighted): >>>> >>>> { "head": { "link": [], "vars": ["uri", "label", "dis", "ann"] }, >>>> "results": { "distinct": false, "ordered": true, "bindings": [ >>>> { "uri": { "type": "uri", "value": >>>> "Artist_1416733236244501848883290000000" } , "label": { "type": "uri", >>>> "value": "asd" } , "dis": { "type": "uri", "value": "agasgagagdadg" } >>>>, >>>> "ann": { "type": "literal", "value": "afasasfaaff" }}, >>>> { "uri": { "type": "uri", "value": "Artist_12345" } , "label": { >>>>"type": >>>> "literal", "value": "fooArtist" } , "dis": { "type": "literal", >>>>"value": >>>> "fooDisam" } , "ann": { "type": "literal", "value": "fooannotation" >>>>}}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/mbrainzImport/44a415ad-77db-4d30-8889-557d >>>>ff >>>> ecbe14" >>>> } , "label": { "type": "literal", "value": "molllust" } , "dis": { >>>> "type": "literal", "value": "Opera metal from Leipzig" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/mbrainzImport/9a6103bb-2c8b-4dd2-92d2-e005 >>>>cb >>>> 75293a" >>>> } , "label": { "type": "literal", "value": "Disillusion" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/mbrainzImport/8db9aa29-c2f4-4bcb-b592-15c7 >>>>d4 >>>> dd3a89" >>>> } , "label": { "type": "literal", "value": "Haggard" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/f2ca3b66-745e-4a4b-8d6d-8b4f9442 >>>>ad >>>> ca" >>>> } , "label": { "type": "literal", "value": "AGETO" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/5ccd3208-8cac-4b33-b6f4-bc90caba >>>>35 >>>> 18" >>>> } , "label": { "type": "literal", "value": "Metal Artist 1" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/665b9d77-ee5d-48d2-885c-f49589c2 >>>>6e >>>> c0" >>>> } , "label": { "type": "literal", "value": "Folk Artist 1" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/e11e8bc6-f8b7-4b5f-9f3b-aba935b3 >>>>e6 >>>> 7c" >>>> } , "label": { "type": "literal", "value": "RnB Artist 2" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/f878f0e1-8f06-403f-a32a-8da3f8c5 >>>>a1 >>>> ae" >>>> } , "label": { "type": "literal", "value": "Classic Artist 1" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/d5247124-b894-46d0-a34c-b40c4a18 >>>>f6 >>>> af" >>>> } , "label": { "type": "literal", "value": "RnB Artist 1" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/d1801f46-2a45-46b6-89b9-4ea822d8 >>>>f9 >>>> 2b" >>>> } , "label": { "type": "literal", "value": "RnB Artist 1 feat. Mister >>>> Blue" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/2e0684ca-8894-4a25-a605-99ced78c >>>>b7 >>>> d6" >>>> } , "label": { "type": "literal", "value": "Funk Artist 1" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/17e232ee-05d7-4f2e-8aac-3cab7677 >>>>13 >>>> 81" >>>> } , "label": { "type": "literal", "value": "Various Artists" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/b00c0dec-ad00-4560-a429-4a935e84 >>>>08 >>>> b2" >>>> } , "label": { "type": "literal", "value": "Brass Artist 1" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/4b276c0b-67c4-47f6-bda3-97211ad4 >>>>73 >>>> 52" >>>> } , "label": { "type": "literal", "value": "Topselling Artist 1" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/cae8a5ec-0a8e-448c-883f-c9694595 >>>>a5 >>>> 0e" >>>> } , "label": { "type": "literal", "value": "World Artist 1" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/acc145e9-b9bf-4086-a12a-d45d4f2b >>>>97 >>>> 67" >>>> } , "label": { "type": "literal", "value": "Topselling Artist 1, >>>>Another >>>> Rapper & More" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/agetoTest/c21ad3b7-80d5-439e-b4ba-08182490 >>>>72 >>>> 57" >>>> } , "label": { "type": "literal", "value": "Topselling Artist 2" }}, >>>> { "uri": { "type": "uri", "value": >>>> >>>> >>>>"http://creativeartefact.org/gemachecker/2807886f-a5d5-426f-aaea-554bc8 >>>>5a >>>> 3170" >>>> } , "label": { "type": "literal", "value": "Unloved" }} ] } } >>>> >>>> Note that Virtuoso is returning invalid URIs, SPARQL Results require >>>> that URIs returned be absolute >>>> >>>> >>>>(http://answers.semanticweb.com/questions/2134/are-relative-uris-permit >>>>te >>>> d-in-sparql-results) >>>> >>>> I have tried requesting different result formats and see the same >>>> invalid data, why a GET produces different results to a POST is still >>>> unclear to me but the fact remains that the data being returned is >>>>bad. >>>> There does seem to be something strange with that server because >>>> sometimes it returns me different answers, sometimes I have to POST to >>>> get the bad answers and other times a GET produces bad answers. >>>> >>>> I'm afraid there is no workaround that I know off since even though we >>>> do allow you to tweak the requested results format (via the >>>> ResultsAcceptHeader) property the bad data is returned regardless of >>>> format so the only things you can do is ask the owners of the endpoint >>>> to fix the data and report the issue to the Virtuoso folks. >>>> >>>> I have filed CORE-432 >>>> (http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=432) to track >>>> the need to make the parsers return a more informative error when this >>>> happens. I also filed CORE-433 >>>> (http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=433) which >>>> tracks a related bug I found where our SPARQL CSV parser could reject >>>> some valid data. These will get fixed for the next release but they >>>> won't resolve your problem only make it more obvious that it is the >>>> server that is in error. >>>> >>>> Thanks for reporting this, >>>> >>>> Rob >>>> >>>> >>>> On 01/12/2014 13:54, "Frank Schumacher" <fs...@in... >>>> <mailto:fs...@in...>> wrote: >>>> >>>> Hey Rob, >>>> >>>> Do you have a complete stack trace from the case where it >>>>fails? >>>> >>>> >>>> sure: >>>> >>>> System.UriFormatException: Ungültiger URI: Das URI-Format konnte >>>> nicht >>>> bestimmt werden. >>>> bei System.Uri.CreateThis(String uri, Boolean dontEscape, >>>> UriKind >>>> uriKind) >>>> bei System.Uri..ctor(String uriString) >>>> bei VDS.RDF.UriFactory.Create(String uri) >>>> bei >>>> >>>> >>>>VDS.RDF.Parsing.SparqlJsonParser.ParseBoundVariable(SparqlJsonParserCon >>>>te >>>> xt >>>> >>>> context, String var, SparqlResult r, Boolean headSeen) >>>> bei >>>> >>>> VDS.RDF.Parsing.SparqlJsonParser.ParseBinding(SparqlJsonParserContext >>>> context, Boolean headSeen) >>>> bei >>>> >>>> VDS.RDF.Parsing.SparqlJsonParser.ParseBindings(SparqlJsonParserContext >>>> context, Boolean headSeen) >>>> bei >>>> >>>> VDS.RDF.Parsing.SparqlJsonParser.ParseResults(SparqlJsonParserContext >>>> context, Boolean headSeen) >>>> bei >>>> >>>>VDS.RDF.Parsing.SparqlJsonParser.ParseBody(SparqlJsonParserContext >>>> context) >>>> bei >>>> >>>> >>>>VDS.RDF.Parsing.SparqlJsonParser.ParseResultSetObject(SparqlJsonParserC >>>>on >>>> text >>>> >>>> context) >>>> bei VDS.RDF.Parsing.SparqlJsonParser.Parse(TextReader input, >>>> ISparqlResultsHandler handler) >>>> bei >>>>VDS.RDF.Parsing.SparqlJsonParser.Load(ISparqlResultsHandler >>>> handler, TextReader input) >>>> bei >>>>VDS.RDF.Parsing.SparqlJsonParser.Load(ISparqlResultsHandler >>>> handler, StreamReader input) >>>> bei >>>> >>>> >>>>VDS.RDF.Query.SparqlRemoteEndpoint.QueryWithResultSet(ISparqlResultsHan >>>>dl >>>> er >>>> >>>> handler, String sparqlQuery) >>>> bei >>>> VDS.RDF.Query.SparqlRemoteEndpoint.QueryWithResultSet(String >>>> sparqlQuery) >>>> >>>> UriFormatException implies there is some invalid data >>>>somewhere, >>>> the fact >>>> that you are using SparqlRemoteEndpoint suggests that the >>>>remote >>>> server >>>> may be returning some bad data that we can't process though >>>>this >>>> should >>>> probably not manifest as a UriFormatException directly but >>>>as a >>>> RdfParseException if this is the case. >>>> >>>> >>>> From the results I get through the html-interface, I can't see >>>>any >>>> stange data. Here is a request that fails and doesn't try to get >>>>all >>>> data: >>>> >>>> PREFIX mbo: <http://creativeartefact.org/ontology/> PREFIX rdfs: >>>> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * WHERE >>>> {?uri a >>>> mbo:Artist. ?uri rdfs:label ?label. OPTIONAL {?uri >>>> mbo:disambiguation >>>> ?dis}. OPTIONAL {?uri mbo:annotation ?ann}. } >>>> >>>> You might also test it via http://creativeartefact.org/sparql >>>> >>>> As for why POST versus non-POST would make a difference I do >>>>not >>>> know, I >>>> will try and take a proper look later today. >>>> >>>> >>>> That would be great :) >>>> >>>> Note that SparqlRemoteEndpoint will automatically change to >>>>POST >>>> when a >>>> query is above a certain length regardless of the explicit >>>> setting, the >>>> explicit setting is mostly useful just to force a POST in all >>>> cases. >>>> >>>> >>>> Hm, really? A while ago, I got an error, when a Sparql-Query was >>>>too >>>> long and I solved it by manually setting the http-mode. But maybe >>>> this >>>> was due to another reason than the length of the statement? >>>> >>>> If there is more information I can provide to pinpoint the >>>>problem, >>>> just >>>> let me know! >>>> >>>> Thanks, >>>> Frank >>>> >>>> >>>> Rob >>>> >>>> On 01/12/2014 12:14, "Frank Schumacher" >>>> <fs...@in... >>>> <mailto:fs...@in...>> >>>> wrote: >>>> >>>> Hello again, >>>> >>>> I narrowed it down a bit more, the error seems to happen, >>>> when the >>>> endpoint is set to POST: >>>> >>>> SparqlRemoteEndpoint endpoint = new >>>>SparqlRemoteEndpoint(new >>>> Uri("http://creativeartefact.org/sparql"), >>>> "http://creativeartefact.org/"); >>>> endpoint.HttpMode = "POST"; >>>> >>>> SparqlResultSet sparqlResults = >>>> endpoint.QueryWithResultSet("PREFIX mbo: >>>> <http://creativeartefact.org/ontology/> PREFIX rdfs: >>>> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * >>>> WHERE {?uri a >>>> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri >>>> mbo:city ?city}. >>>> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri >>>> mbo:postalcode >>>> ?postalcode}. }"); >>>> >>>> SparqlResultSet sparqlResults = >>>> endpoint.QueryWithResultSet("SELECT * >>>> WHERE {?uri ?label ?city.}"); >>>> >>>> The first statement executes, but the second throws the >>>> error. When >>>> commenting out the line endpoint.HttpMode = "POST"; - >>>>also >>>> the second >>>> one executes. >>>> >>>> As my statements can get rather long, I need post to make >>>> sure the >>>> SPARQL request doesn't exceed the allowed length for GET. >>>> Any idea, how >>>> to solve this problem? >>>> >>>> Thanks in advance, >>>> Frank >>>> >>>> #Am 28.11.2014 18:03, schrieb Frank Schumacher: >>>> >>>> I made some more tests and it is getting even >>>>stranger. >>>> I tried more >>>> test queries and even the simplest ones fail. For >>>> testing, I made two >>>> call. The first one works, the second raises the >>>>error. >>>> When I try to >>>> step into it with F11, it tells me: >>>> >>>> Aufruflistenort (callstackposition?): >>>> >>>> >>>> >>>>VDS.Common.dll!VDS.Common.Tries.AbstractTrie<string,char,System.Uri>.Mo >>>>ve >>>> ToNode(string >>>> key) Zeile 211 >>>> >>>> Here is the line that works: >>>> SparqlResultSet sparqlResults = >>>> args.Endpoint.QueryWithResultSet("PREFIX >>>> mbo: <http://creativeartefact.org/ontology/> PREFIX >>>> rdfs: >>>> <http://www.w3.org/2000/01/rdf-schema#> SELECT >>>>DISTINCT >>>> * WHERE {?uri a >>>> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri >>>> mbo:city ?city}. >>>> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri >>>> mbo:postalcode >>>> ?postalcode}. }"); >>>> >>>> and here the one that raises the error: >>>> SparqlResultSet sparqlResults = >>>> args.Endpoint.QueryWithResultSet("SELECT >>>> * WHERE {?uri ?label ?city}"); >>>> >>>> I'm really puzzled ... >>>> >>>> Ciao, >>>> Frank >>>> >>>> Am 28.11.2014 17:08, schrieb Frank Schumacher: >>>> >>>> Hello Rob, >>>> >>>> I get a really strange UriFormatException >>>> (Ungültiger URI: Das >>>> URI-Format konnte nicht bestimmt werden.) when >>>> calling >>>> SparqlRemoteEndpoint.QueryWithResultSet with the >>>> following query: >>>> >>>> PREFIX mbo: >>>><http://creativeartefact.org/ontology/> >>>> PREFIX rdfs: >>>> <http://www.w3.org/2000/01/rdf-schema#> SELECT >>>> DISTINCT ?uri ?label >>>> ?dis >>>> ?ann WHERE {?uri a mbo:Artist. ?uri rdfs:label >>>> ?label. OPTIONAL {?uri >>>> mbo:disambiguation ?dis}. OPTIONAL {?uri >>>> mbo:annotation ?ann}. } >>>> >>>> With a similar query, I don't get any error: >>>> >>>> PREFIX mbo: >>>><http://creativeartefact.org/ontology/> >>>> PREFIX rdfs: >>>> <http://www.w3.org/2000/01/rdf-schema#> SELECT >>>> DISTINCT * WHERE {?uri a >>>> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL >>>> {?uri mbo:city ?city}. >>>> OPTIONAL {?uri mbo:street ?street}. OPTIONAL >>>>{?uri >>>> mbo:postalcode >>>> ?postalcode}. } >>>> >>>> When running the problematic query in the >>>> browser-frontend of my >>>> sparql-endpoint, I get the results as expected. >>>>Any >>>> idea, where the >>>> problem might be? >>>> >>>> Ciao, >>>> Frank >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> ************************************************ >>>> * Universität Leipzig, Institut für Informatik * >>>> * Abteilung Betriebliche Informationssysteme * >>>> * http://bis.informatik.uni-leipzig.de * >>>> * Tel.: 0341 / 97 32 256 * >>>> * * >>>> * ========== Opera Metal: molllust =========== * >>>> * http://www.molllust.com * >>>> * M'era Luna Newcomer 2013! * >>>> ************************************************ >>>> >>>> >>>> >>>>----------------------------------------------------------------------- >>>>-- >>>> - >>>> ---- >>>> Download BIRT iHub F-Type - The Free Enterprise-Grade >>>>BIRT >>>> Server >>>> from Actuate! Instantly Supercharge Your Business Reports >>>> and Dashboards >>>> with Interactivity, Sharing, Native Excel Exports, App >>>> Integration & more >>>> Get technology previously reserved for billion-dollar >>>> corporations, FREE >>>> >>>> >>>>http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.c >>>>lk >>>> t >>>> rk >>>> _______________________________________________ >>>> dotNetRDF-Support mailing list >>>> dot...@li... >>>> <mailto:dot...@li...> >>>> >>>> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>>----------------------------------------------------------------------- >>>>-- >>>> ----- >>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT >>>> Server >>>> from Actuate! Instantly Supercharge Your Business Reports and >>>> Dashboards >>>> with Interactivity, Sharing, Native Excel Exports, App >>>> Integration & more >>>> Get technology previously reserved for billion-dollar >>>> corporations, FREE >>>> >>>> >>>>http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.c >>>>lk >>>> trk >>>> _______________________________________________ >>>> dotNetRDF-Support mailing list >>>> dot...@li... >>>> <mailto:dot...@li...> >>>> >>>>https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >>>> >>>> >>>> >>>> -- >>>> ************************************************ >>>> * Universität Leipzig, Institut für Informatik * >>>> * Abteilung Betriebliche Informationssysteme * >>>> * http://bis.informatik.uni-leipzig.de * >>>> * Tel.: 0341 / 97 32 256 * >>>> * * >>>> * ========== Opera Metal: molllust =========== * >>>> * http://www.molllust.com * >>>> * M'era Luna Newcomer 2013! * >>>> ************************************************ >>>> >>>> >>>> >>>>----------------------------------------------------------------------- >>>>-- >>>> ----- >>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>>> from Actuate! Instantly Supercharge Your Business Reports and >>>> Dashboards >>>> with Interactivity, Sharing, Native Excel Exports, App >>>>Integration & >>>> more >>>> Get technology previously reserved for billion-dollar >>>>corporations, >>>> FREE >>>> >>>> >>>>http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.c >>>>lk >>>> trk >>>> _______________________________________________ >>>> dotNetRDF-Support mailing list >>>> dot...@li... >>>> <mailto:dot...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >>>> >>>> >>>> >>>> >>>> >>>>----------------------------------------------------------------------- >>>>-- >>>> ----- >>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>>> from Actuate! Instantly Supercharge Your Business Reports and >>>>Dashboards >>>> with Interactivity, Sharing, Native Excel Exports, App Integration & >>>> more >>>> Get technology previously reserved for billion-dollar corporations, >>>>FREE >>>> >>>> >>>>http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.c >>>>lk >>>> trk >>>> >>>> >>>> >>>> _______________________________________________ >>>> dotNetRDF-Support mailing list >>>> dot...@li... >>>> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >>>> >>> >>> >>> -- >>> ************************************************ >>> * Universität Leipzig, Institut für Informatik * >>> * Abteilung Betriebliche Informationssysteme * >>> * http://bis.informatik.uni-leipzig.de * >>> * Tel.: 0341 / 97 32 256 * >>> * * >>> * ========== Opera Metal: molllust =========== * >>> * http://www.molllust.com * >>> * M'era Luna Newcomer 2013! * >>> ************************************************ >>> >>> >>>------------------------------------------------------------------------ >>>-- >>> ---- >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>>from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & >>>more >>> Get technology previously reserved for billion-dollar corporations, >>>FREE >>> >>>http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.cl >>>kt >>> rk >>> _______________________________________________ >>> dotNetRDF-Support mailing list >>> dot...@li... >>> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >> >> >> >> >> >> >>------------------------------------------------------------------------- >>----- >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & >>more >> Get technology previously reserved for billion-dollar corporations, FREE >> >>http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clk >>trk >> _______________________________________________ >> dotNetRDF-Support mailing list >> dot...@li... >> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >> > > >-- >************************************************ >* Universität Leipzig, Institut für Informatik * >* Abteilung Betriebliche Informationssysteme * >* http://bis.informatik.uni-leipzig.de * >* Tel.: 0341 / 97 32 256 * >* * >* ========== Opera Metal: molllust =========== * >* http://www.molllust.com * >* M'era Luna Newcomer 2013! * >************************************************ > >-------------------------------------------------------------------------- >---- >Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >from Actuate! Instantly Supercharge Your Business Reports and Dashboards >with Interactivity, Sharing, Native Excel Exports, App Integration & more >Get technology previously reserved for billion-dollar corporations, FREE >http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clkt >rk >_______________________________________________ >dotNetRDF-Support mailing list >dot...@li... >https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Frank S. <fs...@in...> - 2014-12-04 16:16:53
|
Am 04.12.2014 16:01, schrieb Rob Vesse: > That does indeed seem to be the case, I checked over the code and > dotNetRDF's POSTed queries will definitely include the > default-graph-uri/named-graph-uri parameters in the POST body as > necessary. If you are able to provide code that shows a specific case > where this does not happen then I can take a further look at it I created a little test programm that calls the problematic query with post and with get. For me, the post request fails (which means it gets data from the wrong graph). You can download the programm from https://dl.dropboxusercontent.com/u/60331107/dotNetRDF_Post_Test.7z > Having a lax parser might be possible but it would require something of a > rewrite of the existing parser and there would only be certain classes of > errors that were recoverable from. I would rather not provide lax parsers > out of the box since it encourages bad data and hides genuine errors from > users. This would certainly be something that might make a nice community > supported plugin library if anyone wanted to give it a go ;) My skills are surely below sich a library ;) Thanks again, Frank > Rob > > On 02/12/2014 15:41, "Frank Schumacher" <fs...@in...> > wrote: > >> Hey Rob, >> >> many thanks for your efforts! This is really a strange behaviour and it >> took me a while to figure out what happens. >> I found, that the corrupted data is in a different graph. My data (the >> "ok" data) is in the graph "http://creativeartefact.org/", the corrupt >> data is in "http://creativeartefact.org/testGraph/Simon/". >> But I set the defaultGraphUri at the SparqlRemoteEndpoint, so maybe when >> using POST the defaultGraphUri is somehow lost? It seems, that you only >> get the results you get with curl, when no default graph ist set. >> >> I'll leave the corrupt data a bit longer at the server, if you want to >> check this. >> >> For the problem with invalid results returned from the server: Would it >> be an option, to simply ignore those currupt results, maybe mentioning >> that there is invalid data on the server but still returning the valid >> ones? >> >> Thanks again for sorting that out and for providing a great tool and >> even greater support! :) >> >> Frank >> >> Am 02.12.2014 15:26, schrieb Rob Vesse: >>> Frank >>> >>> I can reproduce this with CURL so it is not a dotNetRDF specific issue. >>> It appears to be caused by the Virtuoso server producing bad data, for >>> example I see the following data (invalid parts highlighted): >>> >>> { "head": { "link": [], "vars": ["uri", "label", "dis", "ann"] }, >>> "results": { "distinct": false, "ordered": true, "bindings": [ >>> { "uri": { "type": "uri", "value": >>> "Artist_1416733236244501848883290000000" } , "label": { "type": "uri", >>> "value": "asd" } , "dis": { "type": "uri", "value": "agasgagagdadg" } , >>> "ann": { "type": "literal", "value": "afasasfaaff" }}, >>> { "uri": { "type": "uri", "value": "Artist_12345" } , "label": { "type": >>> "literal", "value": "fooArtist" } , "dis": { "type": "literal", "value": >>> "fooDisam" } , "ann": { "type": "literal", "value": "fooannotation" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/mbrainzImport/44a415ad-77db-4d30-8889-557dff >>> ecbe14" >>> } , "label": { "type": "literal", "value": "molllust" } , "dis": { >>> "type": "literal", "value": "Opera metal from Leipzig" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/mbrainzImport/9a6103bb-2c8b-4dd2-92d2-e005cb >>> 75293a" >>> } , "label": { "type": "literal", "value": "Disillusion" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/mbrainzImport/8db9aa29-c2f4-4bcb-b592-15c7d4 >>> dd3a89" >>> } , "label": { "type": "literal", "value": "Haggard" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/f2ca3b66-745e-4a4b-8d6d-8b4f9442ad >>> ca" >>> } , "label": { "type": "literal", "value": "AGETO" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/5ccd3208-8cac-4b33-b6f4-bc90caba35 >>> 18" >>> } , "label": { "type": "literal", "value": "Metal Artist 1" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/665b9d77-ee5d-48d2-885c-f49589c26e >>> c0" >>> } , "label": { "type": "literal", "value": "Folk Artist 1" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/e11e8bc6-f8b7-4b5f-9f3b-aba935b3e6 >>> 7c" >>> } , "label": { "type": "literal", "value": "RnB Artist 2" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/f878f0e1-8f06-403f-a32a-8da3f8c5a1 >>> ae" >>> } , "label": { "type": "literal", "value": "Classic Artist 1" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/d5247124-b894-46d0-a34c-b40c4a18f6 >>> af" >>> } , "label": { "type": "literal", "value": "RnB Artist 1" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/d1801f46-2a45-46b6-89b9-4ea822d8f9 >>> 2b" >>> } , "label": { "type": "literal", "value": "RnB Artist 1 feat. Mister >>> Blue" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/2e0684ca-8894-4a25-a605-99ced78cb7 >>> d6" >>> } , "label": { "type": "literal", "value": "Funk Artist 1" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/17e232ee-05d7-4f2e-8aac-3cab767713 >>> 81" >>> } , "label": { "type": "literal", "value": "Various Artists" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/b00c0dec-ad00-4560-a429-4a935e8408 >>> b2" >>> } , "label": { "type": "literal", "value": "Brass Artist 1" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/4b276c0b-67c4-47f6-bda3-97211ad473 >>> 52" >>> } , "label": { "type": "literal", "value": "Topselling Artist 1" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/cae8a5ec-0a8e-448c-883f-c9694595a5 >>> 0e" >>> } , "label": { "type": "literal", "value": "World Artist 1" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/acc145e9-b9bf-4086-a12a-d45d4f2b97 >>> 67" >>> } , "label": { "type": "literal", "value": "Topselling Artist 1, Another >>> Rapper & More" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/agetoTest/c21ad3b7-80d5-439e-b4ba-0818249072 >>> 57" >>> } , "label": { "type": "literal", "value": "Topselling Artist 2" }}, >>> { "uri": { "type": "uri", "value": >>> >>> "http://creativeartefact.org/gemachecker/2807886f-a5d5-426f-aaea-554bc85a >>> 3170" >>> } , "label": { "type": "literal", "value": "Unloved" }} ] } } >>> >>> Note that Virtuoso is returning invalid URIs, SPARQL Results require >>> that URIs returned be absolute >>> >>> (http://answers.semanticweb.com/questions/2134/are-relative-uris-permitte >>> d-in-sparql-results) >>> >>> I have tried requesting different result formats and see the same >>> invalid data, why a GET produces different results to a POST is still >>> unclear to me but the fact remains that the data being returned is bad. >>> There does seem to be something strange with that server because >>> sometimes it returns me different answers, sometimes I have to POST to >>> get the bad answers and other times a GET produces bad answers. >>> >>> I'm afraid there is no workaround that I know off since even though we >>> do allow you to tweak the requested results format (via the >>> ResultsAcceptHeader) property the bad data is returned regardless of >>> format so the only things you can do is ask the owners of the endpoint >>> to fix the data and report the issue to the Virtuoso folks. >>> >>> I have filed CORE-432 >>> (http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=432) to track >>> the need to make the parsers return a more informative error when this >>> happens. I also filed CORE-433 >>> (http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=433) which >>> tracks a related bug I found where our SPARQL CSV parser could reject >>> some valid data. These will get fixed for the next release but they >>> won't resolve your problem only make it more obvious that it is the >>> server that is in error. >>> >>> Thanks for reporting this, >>> >>> Rob >>> >>> >>> On 01/12/2014 13:54, "Frank Schumacher" <fs...@in... >>> <mailto:fs...@in...>> wrote: >>> >>> Hey Rob, >>> >>> Do you have a complete stack trace from the case where it fails? >>> >>> >>> sure: >>> >>> System.UriFormatException: Ungültiger URI: Das URI-Format konnte >>> nicht >>> bestimmt werden. >>> bei System.Uri.CreateThis(String uri, Boolean dontEscape, >>> UriKind >>> uriKind) >>> bei System.Uri..ctor(String uriString) >>> bei VDS.RDF.UriFactory.Create(String uri) >>> bei >>> >>> VDS.RDF.Parsing.SparqlJsonParser.ParseBoundVariable(SparqlJsonParserConte >>> xt >>> >>> context, String var, SparqlResult r, Boolean headSeen) >>> bei >>> >>> VDS.RDF.Parsing.SparqlJsonParser.ParseBinding(SparqlJsonParserContext >>> context, Boolean headSeen) >>> bei >>> >>> VDS.RDF.Parsing.SparqlJsonParser.ParseBindings(SparqlJsonParserContext >>> context, Boolean headSeen) >>> bei >>> >>> VDS.RDF.Parsing.SparqlJsonParser.ParseResults(SparqlJsonParserContext >>> context, Boolean headSeen) >>> bei >>> VDS.RDF.Parsing.SparqlJsonParser.ParseBody(SparqlJsonParserContext >>> context) >>> bei >>> >>> VDS.RDF.Parsing.SparqlJsonParser.ParseResultSetObject(SparqlJsonParserCon >>> text >>> >>> context) >>> bei VDS.RDF.Parsing.SparqlJsonParser.Parse(TextReader input, >>> ISparqlResultsHandler handler) >>> bei VDS.RDF.Parsing.SparqlJsonParser.Load(ISparqlResultsHandler >>> handler, TextReader input) >>> bei VDS.RDF.Parsing.SparqlJsonParser.Load(ISparqlResultsHandler >>> handler, StreamReader input) >>> bei >>> >>> VDS.RDF.Query.SparqlRemoteEndpoint.QueryWithResultSet(ISparqlResultsHandl >>> er >>> >>> handler, String sparqlQuery) >>> bei >>> VDS.RDF.Query.SparqlRemoteEndpoint.QueryWithResultSet(String >>> sparqlQuery) >>> >>> UriFormatException implies there is some invalid data somewhere, >>> the fact >>> that you are using SparqlRemoteEndpoint suggests that the remote >>> server >>> may be returning some bad data that we can't process though this >>> should >>> probably not manifest as a UriFormatException directly but as a >>> RdfParseException if this is the case. >>> >>> >>> From the results I get through the html-interface, I can't see any >>> stange data. Here is a request that fails and doesn't try to get all >>> data: >>> >>> PREFIX mbo: <http://creativeartefact.org/ontology/> PREFIX rdfs: >>> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * WHERE >>> {?uri a >>> mbo:Artist. ?uri rdfs:label ?label. OPTIONAL {?uri >>> mbo:disambiguation >>> ?dis}. OPTIONAL {?uri mbo:annotation ?ann}. } >>> >>> You might also test it via http://creativeartefact.org/sparql >>> >>> As for why POST versus non-POST would make a difference I do not >>> know, I >>> will try and take a proper look later today. >>> >>> >>> That would be great :) >>> >>> Note that SparqlRemoteEndpoint will automatically change to POST >>> when a >>> query is above a certain length regardless of the explicit >>> setting, the >>> explicit setting is mostly useful just to force a POST in all >>> cases. >>> >>> >>> Hm, really? A while ago, I got an error, when a Sparql-Query was too >>> long and I solved it by manually setting the http-mode. But maybe >>> this >>> was due to another reason than the length of the statement? >>> >>> If there is more information I can provide to pinpoint the problem, >>> just >>> let me know! >>> >>> Thanks, >>> Frank >>> >>> >>> Rob >>> >>> On 01/12/2014 12:14, "Frank Schumacher" >>> <fs...@in... >>> <mailto:fs...@in...>> >>> wrote: >>> >>> Hello again, >>> >>> I narrowed it down a bit more, the error seems to happen, >>> when the >>> endpoint is set to POST: >>> >>> SparqlRemoteEndpoint endpoint = new SparqlRemoteEndpoint(new >>> Uri("http://creativeartefact.org/sparql"), >>> "http://creativeartefact.org/"); >>> endpoint.HttpMode = "POST"; >>> >>> SparqlResultSet sparqlResults = >>> endpoint.QueryWithResultSet("PREFIX mbo: >>> <http://creativeartefact.org/ontology/> PREFIX rdfs: >>> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * >>> WHERE {?uri a >>> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri >>> mbo:city ?city}. >>> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri >>> mbo:postalcode >>> ?postalcode}. }"); >>> >>> SparqlResultSet sparqlResults = >>> endpoint.QueryWithResultSet("SELECT * >>> WHERE {?uri ?label ?city.}"); >>> >>> The first statement executes, but the second throws the >>> error. When >>> commenting out the line endpoint.HttpMode = "POST"; - also >>> the second >>> one executes. >>> >>> As my statements can get rather long, I need post to make >>> sure the >>> SPARQL request doesn't exceed the allowed length for GET. >>> Any idea, how >>> to solve this problem? >>> >>> Thanks in advance, >>> Frank >>> >>> #Am 28.11.2014 18:03, schrieb Frank Schumacher: >>> >>> I made some more tests and it is getting even stranger. >>> I tried more >>> test queries and even the simplest ones fail. For >>> testing, I made two >>> call. The first one works, the second raises the error. >>> When I try to >>> step into it with F11, it tells me: >>> >>> Aufruflistenort (callstackposition?): >>> >>> >>> VDS.Common.dll!VDS.Common.Tries.AbstractTrie<string,char,System.Uri>.Move >>> ToNode(string >>> key) Zeile 211 >>> >>> Here is the line that works: >>> SparqlResultSet sparqlResults = >>> args.Endpoint.QueryWithResultSet("PREFIX >>> mbo: <http://creativeartefact.org/ontology/> PREFIX >>> rdfs: >>> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT >>> * WHERE {?uri a >>> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri >>> mbo:city ?city}. >>> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri >>> mbo:postalcode >>> ?postalcode}. }"); >>> >>> and here the one that raises the error: >>> SparqlResultSet sparqlResults = >>> args.Endpoint.QueryWithResultSet("SELECT >>> * WHERE {?uri ?label ?city}"); >>> >>> I'm really puzzled ... >>> >>> Ciao, >>> Frank >>> >>> Am 28.11.2014 17:08, schrieb Frank Schumacher: >>> >>> Hello Rob, >>> >>> I get a really strange UriFormatException >>> (Ungültiger URI: Das >>> URI-Format konnte nicht bestimmt werden.) when >>> calling >>> SparqlRemoteEndpoint.QueryWithResultSet with the >>> following query: >>> >>> PREFIX mbo: <http://creativeartefact.org/ontology/> >>> PREFIX rdfs: >>> <http://www.w3.org/2000/01/rdf-schema#> SELECT >>> DISTINCT ?uri ?label >>> ?dis >>> ?ann WHERE {?uri a mbo:Artist. ?uri rdfs:label >>> ?label. OPTIONAL {?uri >>> mbo:disambiguation ?dis}. OPTIONAL {?uri >>> mbo:annotation ?ann}. } >>> >>> With a similar query, I don't get any error: >>> >>> PREFIX mbo: <http://creativeartefact.org/ontology/> >>> PREFIX rdfs: >>> <http://www.w3.org/2000/01/rdf-schema#> SELECT >>> DISTINCT * WHERE {?uri a >>> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL >>> {?uri mbo:city ?city}. >>> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri >>> mbo:postalcode >>> ?postalcode}. } >>> >>> When running the problematic query in the >>> browser-frontend of my >>> sparql-endpoint, I get the results as expected. Any >>> idea, where the >>> problem might be? >>> >>> Ciao, >>> Frank >>> >>> >>> >>> >>> >>> -- >>> ************************************************ >>> * Universität Leipzig, Institut für Informatik * >>> * Abteilung Betriebliche Informationssysteme * >>> * http://bis.informatik.uni-leipzig.de * >>> * Tel.: 0341 / 97 32 256 * >>> * * >>> * ========== Opera Metal: molllust =========== * >>> * http://www.molllust.com * >>> * M'era Luna Newcomer 2013! * >>> ************************************************ >>> >>> >>> ------------------------------------------------------------------------- >>> - >>> ---- >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT >>> Server >>> from Actuate! Instantly Supercharge Your Business Reports >>> and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App >>> Integration & more >>> Get technology previously reserved for billion-dollar >>> corporations, FREE >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clk >>> t >>> rk >>> _______________________________________________ >>> dotNetRDF-Support mailing list >>> dot...@li... >>> <mailto:dot...@li...> >>> >>> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >>> >>> >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------- >>> ----- >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT >>> Server >>> from Actuate! Instantly Supercharge Your Business Reports and >>> Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App >>> Integration & more >>> Get technology previously reserved for billion-dollar >>> corporations, FREE >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clk >>> trk >>> _______________________________________________ >>> dotNetRDF-Support mailing list >>> dot...@li... >>> <mailto:dot...@li...> >>> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >>> >>> >>> >>> -- >>> ************************************************ >>> * Universität Leipzig, Institut für Informatik * >>> * Abteilung Betriebliche Informationssysteme * >>> * http://bis.informatik.uni-leipzig.de * >>> * Tel.: 0341 / 97 32 256 * >>> * * >>> * ========== Opera Metal: molllust =========== * >>> * http://www.molllust.com * >>> * M'era Luna Newcomer 2013! * >>> ************************************************ >>> >>> >>> ------------------------------------------------------------------------- >>> ----- >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>> from Actuate! Instantly Supercharge Your Business Reports and >>> Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & >>> more >>> Get technology previously reserved for billion-dollar corporations, >>> FREE >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clk >>> trk >>> _______________________________________________ >>> dotNetRDF-Support mailing list >>> dot...@li... >>> <mailto:dot...@li...> >>> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >>> >>> >>> >>> >>> ------------------------------------------------------------------------- >>> ----- >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & >>> more >>> Get technology previously reserved for billion-dollar corporations, FREE >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clk >>> trk >>> >>> >>> >>> _______________________________________________ >>> dotNetRDF-Support mailing list >>> dot...@li... >>> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >>> >> >> >> -- >> ************************************************ >> * Universität Leipzig, Institut für Informatik * >> * Abteilung Betriebliche Informationssysteme * >> * http://bis.informatik.uni-leipzig.de * >> * Tel.: 0341 / 97 32 256 * >> * * >> * ========== Opera Metal: molllust =========== * >> * http://www.molllust.com * >> * M'era Luna Newcomer 2013! * >> ************************************************ >> >> -------------------------------------------------------------------------- >> ---- >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clkt >> rk >> _______________________________________________ >> dotNetRDF-Support mailing list >> dot...@li... >> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > > > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > -- ************************************************ * Universität Leipzig, Institut für Informatik * * Abteilung Betriebliche Informationssysteme * * http://bis.informatik.uni-leipzig.de * * Tel.: 0341 / 97 32 256 * * * * ========== Opera Metal: molllust =========== * * http://www.molllust.com * * M'era Luna Newcomer 2013! * ************************************************ |
From: Rob V. <rv...@do...> - 2014-12-04 15:02:01
|
That does indeed seem to be the case, I checked over the code and dotNetRDF's POSTed queries will definitely include the default-graph-uri/named-graph-uri parameters in the POST body as necessary. If you are able to provide code that shows a specific case where this does not happen then I can take a further look at it Having a lax parser might be possible but it would require something of a rewrite of the existing parser and there would only be certain classes of errors that were recoverable from. I would rather not provide lax parsers out of the box since it encourages bad data and hides genuine errors from users. This would certainly be something that might make a nice community supported plugin library if anyone wanted to give it a go ;) Rob On 02/12/2014 15:41, "Frank Schumacher" <fs...@in...> wrote: >Hey Rob, > >many thanks for your efforts! This is really a strange behaviour and it >took me a while to figure out what happens. >I found, that the corrupted data is in a different graph. My data (the >"ok" data) is in the graph "http://creativeartefact.org/", the corrupt >data is in "http://creativeartefact.org/testGraph/Simon/". >But I set the defaultGraphUri at the SparqlRemoteEndpoint, so maybe when >using POST the defaultGraphUri is somehow lost? It seems, that you only >get the results you get with curl, when no default graph ist set. > >I'll leave the corrupt data a bit longer at the server, if you want to >check this. > >For the problem with invalid results returned from the server: Would it >be an option, to simply ignore those currupt results, maybe mentioning >that there is invalid data on the server but still returning the valid >ones? > >Thanks again for sorting that out and for providing a great tool and >even greater support! :) > >Frank > >Am 02.12.2014 15:26, schrieb Rob Vesse: >> Frank >> >> I can reproduce this with CURL so it is not a dotNetRDF specific issue. >> It appears to be caused by the Virtuoso server producing bad data, for >> example I see the following data (invalid parts highlighted): >> >> { "head": { "link": [], "vars": ["uri", "label", "dis", "ann"] }, >> "results": { "distinct": false, "ordered": true, "bindings": [ >> { "uri": { "type": "uri", "value": >> "Artist_1416733236244501848883290000000" } , "label": { "type": "uri", >> "value": "asd" } , "dis": { "type": "uri", "value": "agasgagagdadg" } , >> "ann": { "type": "literal", "value": "afasasfaaff" }}, >> { "uri": { "type": "uri", "value": "Artist_12345" } , "label": { "type": >> "literal", "value": "fooArtist" } , "dis": { "type": "literal", "value": >> "fooDisam" } , "ann": { "type": "literal", "value": "fooannotation" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/mbrainzImport/44a415ad-77db-4d30-8889-557dff >>ecbe14" >> } , "label": { "type": "literal", "value": "molllust" } , "dis": { >> "type": "literal", "value": "Opera metal from Leipzig" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/mbrainzImport/9a6103bb-2c8b-4dd2-92d2-e005cb >>75293a" >> } , "label": { "type": "literal", "value": "Disillusion" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/mbrainzImport/8db9aa29-c2f4-4bcb-b592-15c7d4 >>dd3a89" >> } , "label": { "type": "literal", "value": "Haggard" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/f2ca3b66-745e-4a4b-8d6d-8b4f9442ad >>ca" >> } , "label": { "type": "literal", "value": "AGETO" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/5ccd3208-8cac-4b33-b6f4-bc90caba35 >>18" >> } , "label": { "type": "literal", "value": "Metal Artist 1" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/665b9d77-ee5d-48d2-885c-f49589c26e >>c0" >> } , "label": { "type": "literal", "value": "Folk Artist 1" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/e11e8bc6-f8b7-4b5f-9f3b-aba935b3e6 >>7c" >> } , "label": { "type": "literal", "value": "RnB Artist 2" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/f878f0e1-8f06-403f-a32a-8da3f8c5a1 >>ae" >> } , "label": { "type": "literal", "value": "Classic Artist 1" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/d5247124-b894-46d0-a34c-b40c4a18f6 >>af" >> } , "label": { "type": "literal", "value": "RnB Artist 1" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/d1801f46-2a45-46b6-89b9-4ea822d8f9 >>2b" >> } , "label": { "type": "literal", "value": "RnB Artist 1 feat. Mister >> Blue" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/2e0684ca-8894-4a25-a605-99ced78cb7 >>d6" >> } , "label": { "type": "literal", "value": "Funk Artist 1" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/17e232ee-05d7-4f2e-8aac-3cab767713 >>81" >> } , "label": { "type": "literal", "value": "Various Artists" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/b00c0dec-ad00-4560-a429-4a935e8408 >>b2" >> } , "label": { "type": "literal", "value": "Brass Artist 1" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/4b276c0b-67c4-47f6-bda3-97211ad473 >>52" >> } , "label": { "type": "literal", "value": "Topselling Artist 1" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/cae8a5ec-0a8e-448c-883f-c9694595a5 >>0e" >> } , "label": { "type": "literal", "value": "World Artist 1" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/acc145e9-b9bf-4086-a12a-d45d4f2b97 >>67" >> } , "label": { "type": "literal", "value": "Topselling Artist 1, Another >> Rapper & More" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/agetoTest/c21ad3b7-80d5-439e-b4ba-0818249072 >>57" >> } , "label": { "type": "literal", "value": "Topselling Artist 2" }}, >> { "uri": { "type": "uri", "value": >> >>"http://creativeartefact.org/gemachecker/2807886f-a5d5-426f-aaea-554bc85a >>3170" >> } , "label": { "type": "literal", "value": "Unloved" }} ] } } >> >> Note that Virtuoso is returning invalid URIs, SPARQL Results require >> that URIs returned be absolute >> >>(http://answers.semanticweb.com/questions/2134/are-relative-uris-permitte >>d-in-sparql-results) >> >> I have tried requesting different result formats and see the same >> invalid data, why a GET produces different results to a POST is still >> unclear to me but the fact remains that the data being returned is bad. >> There does seem to be something strange with that server because >> sometimes it returns me different answers, sometimes I have to POST to >> get the bad answers and other times a GET produces bad answers. >> >> I'm afraid there is no workaround that I know off since even though we >> do allow you to tweak the requested results format (via the >> ResultsAcceptHeader) property the bad data is returned regardless of >> format so the only things you can do is ask the owners of the endpoint >> to fix the data and report the issue to the Virtuoso folks. >> >> I have filed CORE-432 >> (http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=432) to track >> the need to make the parsers return a more informative error when this >> happens. I also filed CORE-433 >> (http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=433) which >> tracks a related bug I found where our SPARQL CSV parser could reject >> some valid data. These will get fixed for the next release but they >> won't resolve your problem only make it more obvious that it is the >> server that is in error. >> >> Thanks for reporting this, >> >> Rob >> >> >> On 01/12/2014 13:54, "Frank Schumacher" <fs...@in... >> <mailto:fs...@in...>> wrote: >> >> Hey Rob, >> >> Do you have a complete stack trace from the case where it fails? >> >> >> sure: >> >> System.UriFormatException: Ungültiger URI: Das URI-Format konnte >>nicht >> bestimmt werden. >> bei System.Uri.CreateThis(String uri, Boolean dontEscape, >>UriKind >> uriKind) >> bei System.Uri..ctor(String uriString) >> bei VDS.RDF.UriFactory.Create(String uri) >> bei >> >>VDS.RDF.Parsing.SparqlJsonParser.ParseBoundVariable(SparqlJsonParserConte >>xt >> >> context, String var, SparqlResult r, Boolean headSeen) >> bei >> >>VDS.RDF.Parsing.SparqlJsonParser.ParseBinding(SparqlJsonParserContext >> context, Boolean headSeen) >> bei >> >>VDS.RDF.Parsing.SparqlJsonParser.ParseBindings(SparqlJsonParserContext >> context, Boolean headSeen) >> bei >> >>VDS.RDF.Parsing.SparqlJsonParser.ParseResults(SparqlJsonParserContext >> context, Boolean headSeen) >> bei >> VDS.RDF.Parsing.SparqlJsonParser.ParseBody(SparqlJsonParserContext >> context) >> bei >> >>VDS.RDF.Parsing.SparqlJsonParser.ParseResultSetObject(SparqlJsonParserCon >>text >> >> context) >> bei VDS.RDF.Parsing.SparqlJsonParser.Parse(TextReader input, >> ISparqlResultsHandler handler) >> bei VDS.RDF.Parsing.SparqlJsonParser.Load(ISparqlResultsHandler >> handler, TextReader input) >> bei VDS.RDF.Parsing.SparqlJsonParser.Load(ISparqlResultsHandler >> handler, StreamReader input) >> bei >> >>VDS.RDF.Query.SparqlRemoteEndpoint.QueryWithResultSet(ISparqlResultsHandl >>er >> >> handler, String sparqlQuery) >> bei >>VDS.RDF.Query.SparqlRemoteEndpoint.QueryWithResultSet(String >> sparqlQuery) >> >> UriFormatException implies there is some invalid data somewhere, >> the fact >> that you are using SparqlRemoteEndpoint suggests that the remote >> server >> may be returning some bad data that we can't process though this >> should >> probably not manifest as a UriFormatException directly but as a >> RdfParseException if this is the case. >> >> >> From the results I get through the html-interface, I can't see any >> stange data. Here is a request that fails and doesn't try to get all >> data: >> >> PREFIX mbo: <http://creativeartefact.org/ontology/> PREFIX rdfs: >> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * WHERE >>{?uri a >> mbo:Artist. ?uri rdfs:label ?label. OPTIONAL {?uri >>mbo:disambiguation >> ?dis}. OPTIONAL {?uri mbo:annotation ?ann}. } >> >> You might also test it via http://creativeartefact.org/sparql >> >> As for why POST versus non-POST would make a difference I do not >> know, I >> will try and take a proper look later today. >> >> >> That would be great :) >> >> Note that SparqlRemoteEndpoint will automatically change to POST >> when a >> query is above a certain length regardless of the explicit >> setting, the >> explicit setting is mostly useful just to force a POST in all >>cases. >> >> >> Hm, really? A while ago, I got an error, when a Sparql-Query was too >> long and I solved it by manually setting the http-mode. But maybe >>this >> was due to another reason than the length of the statement? >> >> If there is more information I can provide to pinpoint the problem, >> just >> let me know! >> >> Thanks, >> Frank >> >> >> Rob >> >> On 01/12/2014 12:14, "Frank Schumacher" >> <fs...@in... >><mailto:fs...@in...>> >> wrote: >> >> Hello again, >> >> I narrowed it down a bit more, the error seems to happen, >> when the >> endpoint is set to POST: >> >> SparqlRemoteEndpoint endpoint = new SparqlRemoteEndpoint(new >> Uri("http://creativeartefact.org/sparql"), >> "http://creativeartefact.org/"); >> endpoint.HttpMode = "POST"; >> >> SparqlResultSet sparqlResults = >> endpoint.QueryWithResultSet("PREFIX mbo: >> <http://creativeartefact.org/ontology/> PREFIX rdfs: >> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * >> WHERE {?uri a >> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri >> mbo:city ?city}. >> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri >> mbo:postalcode >> ?postalcode}. }"); >> >> SparqlResultSet sparqlResults = >> endpoint.QueryWithResultSet("SELECT * >> WHERE {?uri ?label ?city.}"); >> >> The first statement executes, but the second throws the >> error. When >> commenting out the line endpoint.HttpMode = "POST"; - also >> the second >> one executes. >> >> As my statements can get rather long, I need post to make >> sure the >> SPARQL request doesn't exceed the allowed length for GET. >> Any idea, how >> to solve this problem? >> >> Thanks in advance, >> Frank >> >> #Am 28.11.2014 18:03, schrieb Frank Schumacher: >> >> I made some more tests and it is getting even stranger. >> I tried more >> test queries and even the simplest ones fail. For >> testing, I made two >> call. The first one works, the second raises the error. >> When I try to >> step into it with F11, it tells me: >> >> Aufruflistenort (callstackposition?): >> >> >>VDS.Common.dll!VDS.Common.Tries.AbstractTrie<string,char,System.Uri>.Move >> ToNode(string >> key) Zeile 211 >> >> Here is the line that works: >> SparqlResultSet sparqlResults = >> args.Endpoint.QueryWithResultSet("PREFIX >> mbo: <http://creativeartefact.org/ontology/> PREFIX >>rdfs: >> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT >> * WHERE {?uri a >> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri >> mbo:city ?city}. >> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri >> mbo:postalcode >> ?postalcode}. }"); >> >> and here the one that raises the error: >> SparqlResultSet sparqlResults = >> args.Endpoint.QueryWithResultSet("SELECT >> * WHERE {?uri ?label ?city}"); >> >> I'm really puzzled ... >> >> Ciao, >> Frank >> >> Am 28.11.2014 17:08, schrieb Frank Schumacher: >> >> Hello Rob, >> >> I get a really strange UriFormatException >> (Ungültiger URI: Das >> URI-Format konnte nicht bestimmt werden.) when >>calling >> SparqlRemoteEndpoint.QueryWithResultSet with the >> following query: >> >> PREFIX mbo: <http://creativeartefact.org/ontology/> >> PREFIX rdfs: >> <http://www.w3.org/2000/01/rdf-schema#> SELECT >> DISTINCT ?uri ?label >> ?dis >> ?ann WHERE {?uri a mbo:Artist. ?uri rdfs:label >> ?label. OPTIONAL {?uri >> mbo:disambiguation ?dis}. OPTIONAL {?uri >> mbo:annotation ?ann}. } >> >> With a similar query, I don't get any error: >> >> PREFIX mbo: <http://creativeartefact.org/ontology/> >> PREFIX rdfs: >> <http://www.w3.org/2000/01/rdf-schema#> SELECT >> DISTINCT * WHERE {?uri a >> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL >> {?uri mbo:city ?city}. >> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri >> mbo:postalcode >> ?postalcode}. } >> >> When running the problematic query in the >> browser-frontend of my >> sparql-endpoint, I get the results as expected. Any >> idea, where the >> problem might be? >> >> Ciao, >> Frank >> >> >> >> >> >> -- >> ************************************************ >> * Universität Leipzig, Institut für Informatik * >> * Abteilung Betriebliche Informationssysteme * >> * http://bis.informatik.uni-leipzig.de * >> * Tel.: 0341 / 97 32 256 * >> * * >> * ========== Opera Metal: molllust =========== * >> * http://www.molllust.com * >> * M'era Luna Newcomer 2013! * >> ************************************************ >> >> >>------------------------------------------------------------------------- >>- >> ---- >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT >> Server >> from Actuate! Instantly Supercharge Your Business Reports >> and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App >> Integration & more >> Get technology previously reserved for billion-dollar >> corporations, FREE >> >>http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clk >>t >> rk >> _______________________________________________ >> dotNetRDF-Support mailing list >> dot...@li... >> <mailto:dot...@li...> >> >>https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >> >> >> >> >> >> >> >>------------------------------------------------------------------------- >>----- >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT >>Server >> from Actuate! Instantly Supercharge Your Business Reports and >> Dashboards >> with Interactivity, Sharing, Native Excel Exports, App >> Integration & more >> Get technology previously reserved for billion-dollar >> corporations, FREE >> >>http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clk >>trk >> _______________________________________________ >> dotNetRDF-Support mailing list >> dot...@li... >> <mailto:dot...@li...> >> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >> >> >> >> -- >> ************************************************ >> * Universität Leipzig, Institut für Informatik * >> * Abteilung Betriebliche Informationssysteme * >> * http://bis.informatik.uni-leipzig.de * >> * Tel.: 0341 / 97 32 256 * >> * * >> * ========== Opera Metal: molllust =========== * >> * http://www.molllust.com * >> * M'era Luna Newcomer 2013! * >> ************************************************ >> >> >>------------------------------------------------------------------------- >>----- >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and >>Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & >> more >> Get technology previously reserved for billion-dollar corporations, >>FREE >> >>http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clk >>trk >> _______________________________________________ >> dotNetRDF-Support mailing list >> dot...@li... >> <mailto:dot...@li...> >> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >> >> >> >> >>------------------------------------------------------------------------- >>----- >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & >>more >> Get technology previously reserved for billion-dollar corporations, FREE >> >>http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clk >>trk >> >> >> >> _______________________________________________ >> dotNetRDF-Support mailing list >> dot...@li... >> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >> > > >-- >************************************************ >* Universität Leipzig, Institut für Informatik * >* Abteilung Betriebliche Informationssysteme * >* http://bis.informatik.uni-leipzig.de * >* Tel.: 0341 / 97 32 256 * >* * >* ========== Opera Metal: molllust =========== * >* http://www.molllust.com * >* M'era Luna Newcomer 2013! * >************************************************ > >-------------------------------------------------------------------------- >---- >Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >from Actuate! Instantly Supercharge Your Business Reports and Dashboards >with Interactivity, Sharing, Native Excel Exports, App Integration & more >Get technology previously reserved for billion-dollar corporations, FREE >http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clkt >rk >_______________________________________________ >dotNetRDF-Support mailing list >dot...@li... >https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Frank S. <fs...@in...> - 2014-12-02 15:41:49
|
Hey Rob, many thanks for your efforts! This is really a strange behaviour and it took me a while to figure out what happens. I found, that the corrupted data is in a different graph. My data (the "ok" data) is in the graph "http://creativeartefact.org/", the corrupt data is in "http://creativeartefact.org/testGraph/Simon/". But I set the defaultGraphUri at the SparqlRemoteEndpoint, so maybe when using POST the defaultGraphUri is somehow lost? It seems, that you only get the results you get with curl, when no default graph ist set. I'll leave the corrupt data a bit longer at the server, if you want to check this. For the problem with invalid results returned from the server: Would it be an option, to simply ignore those currupt results, maybe mentioning that there is invalid data on the server but still returning the valid ones? Thanks again for sorting that out and for providing a great tool and even greater support! :) Frank Am 02.12.2014 15:26, schrieb Rob Vesse: > Frank > > I can reproduce this with CURL so it is not a dotNetRDF specific issue. > It appears to be caused by the Virtuoso server producing bad data, for > example I see the following data (invalid parts highlighted): > > { "head": { "link": [], "vars": ["uri", "label", "dis", "ann"] }, > "results": { "distinct": false, "ordered": true, "bindings": [ > { "uri": { "type": "uri", "value": > "Artist_1416733236244501848883290000000" } , "label": { "type": "uri", > "value": "asd" } , "dis": { "type": "uri", "value": "agasgagagdadg" } , > "ann": { "type": "literal", "value": "afasasfaaff" }}, > { "uri": { "type": "uri", "value": "Artist_12345" } , "label": { "type": > "literal", "value": "fooArtist" } , "dis": { "type": "literal", "value": > "fooDisam" } , "ann": { "type": "literal", "value": "fooannotation" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/mbrainzImport/44a415ad-77db-4d30-8889-557dffecbe14" > } , "label": { "type": "literal", "value": "molllust" } , "dis": { > "type": "literal", "value": "Opera metal from Leipzig" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/mbrainzImport/9a6103bb-2c8b-4dd2-92d2-e005cb75293a" > } , "label": { "type": "literal", "value": "Disillusion" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/mbrainzImport/8db9aa29-c2f4-4bcb-b592-15c7d4dd3a89" > } , "label": { "type": "literal", "value": "Haggard" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/f2ca3b66-745e-4a4b-8d6d-8b4f9442adca" > } , "label": { "type": "literal", "value": "AGETO" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/5ccd3208-8cac-4b33-b6f4-bc90caba3518" > } , "label": { "type": "literal", "value": "Metal Artist 1" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/665b9d77-ee5d-48d2-885c-f49589c26ec0" > } , "label": { "type": "literal", "value": "Folk Artist 1" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/e11e8bc6-f8b7-4b5f-9f3b-aba935b3e67c" > } , "label": { "type": "literal", "value": "RnB Artist 2" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/f878f0e1-8f06-403f-a32a-8da3f8c5a1ae" > } , "label": { "type": "literal", "value": "Classic Artist 1" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/d5247124-b894-46d0-a34c-b40c4a18f6af" > } , "label": { "type": "literal", "value": "RnB Artist 1" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/d1801f46-2a45-46b6-89b9-4ea822d8f92b" > } , "label": { "type": "literal", "value": "RnB Artist 1 feat. Mister > Blue" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/2e0684ca-8894-4a25-a605-99ced78cb7d6" > } , "label": { "type": "literal", "value": "Funk Artist 1" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/17e232ee-05d7-4f2e-8aac-3cab76771381" > } , "label": { "type": "literal", "value": "Various Artists" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/b00c0dec-ad00-4560-a429-4a935e8408b2" > } , "label": { "type": "literal", "value": "Brass Artist 1" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/4b276c0b-67c4-47f6-bda3-97211ad47352" > } , "label": { "type": "literal", "value": "Topselling Artist 1" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/cae8a5ec-0a8e-448c-883f-c9694595a50e" > } , "label": { "type": "literal", "value": "World Artist 1" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/acc145e9-b9bf-4086-a12a-d45d4f2b9767" > } , "label": { "type": "literal", "value": "Topselling Artist 1, Another > Rapper & More" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/agetoTest/c21ad3b7-80d5-439e-b4ba-081824907257" > } , "label": { "type": "literal", "value": "Topselling Artist 2" }}, > { "uri": { "type": "uri", "value": > "http://creativeartefact.org/gemachecker/2807886f-a5d5-426f-aaea-554bc85a3170" > } , "label": { "type": "literal", "value": "Unloved" }} ] } } > > Note that Virtuoso is returning invalid URIs, SPARQL Results require > that URIs returned be absolute > (http://answers.semanticweb.com/questions/2134/are-relative-uris-permitted-in-sparql-results) > > I have tried requesting different result formats and see the same > invalid data, why a GET produces different results to a POST is still > unclear to me but the fact remains that the data being returned is bad. > There does seem to be something strange with that server because > sometimes it returns me different answers, sometimes I have to POST to > get the bad answers and other times a GET produces bad answers. > > I'm afraid there is no workaround that I know off since even though we > do allow you to tweak the requested results format (via the > ResultsAcceptHeader) property the bad data is returned regardless of > format so the only things you can do is ask the owners of the endpoint > to fix the data and report the issue to the Virtuoso folks. > > I have filed CORE-432 > (http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=432) to track > the need to make the parsers return a more informative error when this > happens. I also filed CORE-433 > (http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=433) which > tracks a related bug I found where our SPARQL CSV parser could reject > some valid data. These will get fixed for the next release but they > won't resolve your problem only make it more obvious that it is the > server that is in error. > > Thanks for reporting this, > > Rob > > > On 01/12/2014 13:54, "Frank Schumacher" <fs...@in... > <mailto:fs...@in...>> wrote: > > Hey Rob, > > Do you have a complete stack trace from the case where it fails? > > > sure: > > System.UriFormatException: Ungültiger URI: Das URI-Format konnte nicht > bestimmt werden. > bei System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind > uriKind) > bei System.Uri..ctor(String uriString) > bei VDS.RDF.UriFactory.Create(String uri) > bei > VDS.RDF.Parsing.SparqlJsonParser.ParseBoundVariable(SparqlJsonParserContext > > context, String var, SparqlResult r, Boolean headSeen) > bei > VDS.RDF.Parsing.SparqlJsonParser.ParseBinding(SparqlJsonParserContext > context, Boolean headSeen) > bei > VDS.RDF.Parsing.SparqlJsonParser.ParseBindings(SparqlJsonParserContext > context, Boolean headSeen) > bei > VDS.RDF.Parsing.SparqlJsonParser.ParseResults(SparqlJsonParserContext > context, Boolean headSeen) > bei > VDS.RDF.Parsing.SparqlJsonParser.ParseBody(SparqlJsonParserContext > context) > bei > VDS.RDF.Parsing.SparqlJsonParser.ParseResultSetObject(SparqlJsonParserContext > > context) > bei VDS.RDF.Parsing.SparqlJsonParser.Parse(TextReader input, > ISparqlResultsHandler handler) > bei VDS.RDF.Parsing.SparqlJsonParser.Load(ISparqlResultsHandler > handler, TextReader input) > bei VDS.RDF.Parsing.SparqlJsonParser.Load(ISparqlResultsHandler > handler, StreamReader input) > bei > VDS.RDF.Query.SparqlRemoteEndpoint.QueryWithResultSet(ISparqlResultsHandler > > handler, String sparqlQuery) > bei VDS.RDF.Query.SparqlRemoteEndpoint.QueryWithResultSet(String > sparqlQuery) > > UriFormatException implies there is some invalid data somewhere, > the fact > that you are using SparqlRemoteEndpoint suggests that the remote > server > may be returning some bad data that we can't process though this > should > probably not manifest as a UriFormatException directly but as a > RdfParseException if this is the case. > > > From the results I get through the html-interface, I can't see any > stange data. Here is a request that fails and doesn't try to get all > data: > > PREFIX mbo: <http://creativeartefact.org/ontology/> PREFIX rdfs: > <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * WHERE {?uri a > mbo:Artist. ?uri rdfs:label ?label. OPTIONAL {?uri mbo:disambiguation > ?dis}. OPTIONAL {?uri mbo:annotation ?ann}. } > > You might also test it via http://creativeartefact.org/sparql > > As for why POST versus non-POST would make a difference I do not > know, I > will try and take a proper look later today. > > > That would be great :) > > Note that SparqlRemoteEndpoint will automatically change to POST > when a > query is above a certain length regardless of the explicit > setting, the > explicit setting is mostly useful just to force a POST in all cases. > > > Hm, really? A while ago, I got an error, when a Sparql-Query was too > long and I solved it by manually setting the http-mode. But maybe this > was due to another reason than the length of the statement? > > If there is more information I can provide to pinpoint the problem, > just > let me know! > > Thanks, > Frank > > > Rob > > On 01/12/2014 12:14, "Frank Schumacher" > <fs...@in... <mailto:fs...@in...>> > wrote: > > Hello again, > > I narrowed it down a bit more, the error seems to happen, > when the > endpoint is set to POST: > > SparqlRemoteEndpoint endpoint = new SparqlRemoteEndpoint(new > Uri("http://creativeartefact.org/sparql"), > "http://creativeartefact.org/"); > endpoint.HttpMode = "POST"; > > SparqlResultSet sparqlResults = > endpoint.QueryWithResultSet("PREFIX mbo: > <http://creativeartefact.org/ontology/> PREFIX rdfs: > <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * > WHERE {?uri a > mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri > mbo:city ?city}. > OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri > mbo:postalcode > ?postalcode}. }"); > > SparqlResultSet sparqlResults = > endpoint.QueryWithResultSet("SELECT * > WHERE {?uri ?label ?city.}"); > > The first statement executes, but the second throws the > error. When > commenting out the line endpoint.HttpMode = "POST"; - also > the second > one executes. > > As my statements can get rather long, I need post to make > sure the > SPARQL request doesn't exceed the allowed length for GET. > Any idea, how > to solve this problem? > > Thanks in advance, > Frank > > #Am 28.11.2014 18:03, schrieb Frank Schumacher: > > I made some more tests and it is getting even stranger. > I tried more > test queries and even the simplest ones fail. For > testing, I made two > call. The first one works, the second raises the error. > When I try to > step into it with F11, it tells me: > > Aufruflistenort (callstackposition?): > > VDS.Common.dll!VDS.Common.Tries.AbstractTrie<string,char,System.Uri>.Move > ToNode(string > key) Zeile 211 > > Here is the line that works: > SparqlResultSet sparqlResults = > args.Endpoint.QueryWithResultSet("PREFIX > mbo: <http://creativeartefact.org/ontology/> PREFIX rdfs: > <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT > * WHERE {?uri a > mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri > mbo:city ?city}. > OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri > mbo:postalcode > ?postalcode}. }"); > > and here the one that raises the error: > SparqlResultSet sparqlResults = > args.Endpoint.QueryWithResultSet("SELECT > * WHERE {?uri ?label ?city}"); > > I'm really puzzled ... > > Ciao, > Frank > > Am 28.11.2014 17:08, schrieb Frank Schumacher: > > Hello Rob, > > I get a really strange UriFormatException > (Ungültiger URI: Das > URI-Format konnte nicht bestimmt werden.) when calling > SparqlRemoteEndpoint.QueryWithResultSet with the > following query: > > PREFIX mbo: <http://creativeartefact.org/ontology/> > PREFIX rdfs: > <http://www.w3.org/2000/01/rdf-schema#> SELECT > DISTINCT ?uri ?label > ?dis > ?ann WHERE {?uri a mbo:Artist. ?uri rdfs:label > ?label. OPTIONAL {?uri > mbo:disambiguation ?dis}. OPTIONAL {?uri > mbo:annotation ?ann}. } > > With a similar query, I don't get any error: > > PREFIX mbo: <http://creativeartefact.org/ontology/> > PREFIX rdfs: > <http://www.w3.org/2000/01/rdf-schema#> SELECT > DISTINCT * WHERE {?uri a > mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL > {?uri mbo:city ?city}. > OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri > mbo:postalcode > ?postalcode}. } > > When running the problematic query in the > browser-frontend of my > sparql-endpoint, I get the results as expected. Any > idea, where the > problem might be? > > Ciao, > Frank > > > > > > -- > ************************************************ > * Universität Leipzig, Institut für Informatik * > * Abteilung Betriebliche Informationssysteme * > * http://bis.informatik.uni-leipzig.de * > * Tel.: 0341 / 97 32 256 * > * * > * ========== Opera Metal: molllust =========== * > * http://www.molllust.com * > * M'era Luna Newcomer 2013! * > ************************************************ > > -------------------------------------------------------------------------- > ---- > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT > Server > from Actuate! Instantly Supercharge Your Business Reports > and Dashboards > with Interactivity, Sharing, Native Excel Exports, App > Integration & more > Get technology previously reserved for billion-dollar > corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clkt > rk > _______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > <mailto:dot...@li...> > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > > > > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and > Dashboards > with Interactivity, Sharing, Native Excel Exports, App > Integration & more > Get technology previously reserved for billion-dollar > corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > <mailto:dot...@li...> > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > > > > -- > ************************************************ > * Universität Leipzig, Institut für Informatik * > * Abteilung Betriebliche Informationssysteme * > * http://bis.informatik.uni-leipzig.de * > * Tel.: 0341 / 97 32 256 * > * * > * ========== Opera Metal: molllust =========== * > * http://www.molllust.com * > * M'era Luna Newcomer 2013! * > ************************************************ > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & > more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > <mailto:dot...@li...> > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > > > > _______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > -- ************************************************ * Universität Leipzig, Institut für Informatik * * Abteilung Betriebliche Informationssysteme * * http://bis.informatik.uni-leipzig.de * * Tel.: 0341 / 97 32 256 * * * * ========== Opera Metal: molllust =========== * * http://www.molllust.com * * M'era Luna Newcomer 2013! * ************************************************ |
From: Rob V. <rv...@do...> - 2014-12-02 14:27:32
|
Frank I can reproduce this with CURL so it is not a dotNetRDF specific issue. It appears to be caused by the Virtuoso server producing bad data, for example I see the following data (invalid parts highlighted): { "head": { "link": [], "vars": ["uri", "label", "dis", "ann"] }, "results": { "distinct": false, "ordered": true, "bindings": [ { "uri": { "type": "uri", "value": "Artist_1416733236244501848883290000000" } , "label": { "type": "uri", "value": "asd" } , "dis": { "type": "uri", "value": "agasgagagdadg" } , "ann": { "type": "literal", "value": "afasasfaaff" }}, { "uri": { "type": "uri", "value": "Artist_12345" } , "label": { "type": "literal", "value": "fooArtist" } , "dis": { "type": "literal", "value": "fooDisam" } , "ann": { "type": "literal", "value": "fooannotation" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/mbrainzImport/44a415ad-77db-4d30-8889-557dffecb e14" } , "label": { "type": "literal", "value": "molllust" } , "dis": { "type": "literal", "value": "Opera metal from Leipzig" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/mbrainzImport/9a6103bb-2c8b-4dd2-92d2-e005cb752 93a" } , "label": { "type": "literal", "value": "Disillusion" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/mbrainzImport/8db9aa29-c2f4-4bcb-b592-15c7d4dd3 a89" } , "label": { "type": "literal", "value": "Haggard" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/f2ca3b66-745e-4a4b-8d6d-8b4f9442adca" } , "label": { "type": "literal", "value": "AGETO" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/5ccd3208-8cac-4b33-b6f4-bc90caba3518" } , "label": { "type": "literal", "value": "Metal Artist 1" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/665b9d77-ee5d-48d2-885c-f49589c26ec0" } , "label": { "type": "literal", "value": "Folk Artist 1" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/e11e8bc6-f8b7-4b5f-9f3b-aba935b3e67c" } , "label": { "type": "literal", "value": "RnB Artist 2" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/f878f0e1-8f06-403f-a32a-8da3f8c5a1ae" } , "label": { "type": "literal", "value": "Classic Artist 1" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/d5247124-b894-46d0-a34c-b40c4a18f6af" } , "label": { "type": "literal", "value": "RnB Artist 1" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/d1801f46-2a45-46b6-89b9-4ea822d8f92b" } , "label": { "type": "literal", "value": "RnB Artist 1 feat. Mister Blue" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/2e0684ca-8894-4a25-a605-99ced78cb7d6" } , "label": { "type": "literal", "value": "Funk Artist 1" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/17e232ee-05d7-4f2e-8aac-3cab76771381" } , "label": { "type": "literal", "value": "Various Artists" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/b00c0dec-ad00-4560-a429-4a935e8408b2" } , "label": { "type": "literal", "value": "Brass Artist 1" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/4b276c0b-67c4-47f6-bda3-97211ad47352" } , "label": { "type": "literal", "value": "Topselling Artist 1" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/cae8a5ec-0a8e-448c-883f-c9694595a50e" } , "label": { "type": "literal", "value": "World Artist 1" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/acc145e9-b9bf-4086-a12a-d45d4f2b9767" } , "label": { "type": "literal", "value": "Topselling Artist 1, Another Rapper & More" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/agetoTest/c21ad3b7-80d5-439e-b4ba-081824907257" } , "label": { "type": "literal", "value": "Topselling Artist 2" }}, { "uri": { "type": "uri", "value": "http://creativeartefact.org/gemachecker/2807886f-a5d5-426f-aaea-554bc85a317 0" } , "label": { "type": "literal", "value": "Unloved" }} ] } } Note that Virtuoso is returning invalid URIs, SPARQL Results require that URIs returned be absolute (http://answers.semanticweb.com/questions/2134/are-relative-uris-permitted-i n-sparql-results) I have tried requesting different result formats and see the same invalid data, why a GET produces different results to a POST is still unclear to me but the fact remains that the data being returned is bad. There does seem to be something strange with that server because sometimes it returns me different answers, sometimes I have to POST to get the bad answers and other times a GET produces bad answers. I'm afraid there is no workaround that I know off since even though we do allow you to tweak the requested results format (via the ResultsAcceptHeader) property the bad data is returned regardless of format so the only things you can do is ask the owners of the endpoint to fix the data and report the issue to the Virtuoso folks. I have filed CORE-432 (http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=432) to track the need to make the parsers return a more informative error when this happens. I also filed CORE-433 (http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=433) which tracks a related bug I found where our SPARQL CSV parser could reject some valid data. These will get fixed for the next release but they won't resolve your problem only make it more obvious that it is the server that is in error. Thanks for reporting this, Rob On 01/12/2014 13:54, "Frank Schumacher" <fs...@in...> wrote: > Hey Rob, > >> Do you have a complete stack trace from the case where it fails? > > sure: > > System.UriFormatException: Ungültiger URI: Das URI-Format konnte nicht > bestimmt werden. > bei System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind > uriKind) > bei System.Uri..ctor(String uriString) > bei VDS.RDF.UriFactory.Create(String uri) > bei > VDS.RDF.Parsing.SparqlJsonParser.ParseBoundVariable(SparqlJsonParserContext > context, String var, SparqlResult r, Boolean headSeen) > bei > VDS.RDF.Parsing.SparqlJsonParser.ParseBinding(SparqlJsonParserContext > context, Boolean headSeen) > bei > VDS.RDF.Parsing.SparqlJsonParser.ParseBindings(SparqlJsonParserContext > context, Boolean headSeen) > bei > VDS.RDF.Parsing.SparqlJsonParser.ParseResults(SparqlJsonParserContext > context, Boolean headSeen) > bei > VDS.RDF.Parsing.SparqlJsonParser.ParseBody(SparqlJsonParserContext context) > bei > VDS.RDF.Parsing.SparqlJsonParser.ParseResultSetObject(SparqlJsonParserContext > context) > bei VDS.RDF.Parsing.SparqlJsonParser.Parse(TextReader input, > ISparqlResultsHandler handler) > bei VDS.RDF.Parsing.SparqlJsonParser.Load(ISparqlResultsHandler > handler, TextReader input) > bei VDS.RDF.Parsing.SparqlJsonParser.Load(ISparqlResultsHandler > handler, StreamReader input) > bei > VDS.RDF.Query.SparqlRemoteEndpoint.QueryWithResultSet(ISparqlResultsHandler > handler, String sparqlQuery) > bei VDS.RDF.Query.SparqlRemoteEndpoint.QueryWithResultSet(String > sparqlQuery) > >> UriFormatException implies there is some invalid data somewhere, the fact >> that you are using SparqlRemoteEndpoint suggests that the remote server >> may be returning some bad data that we can't process though this should >> probably not manifest as a UriFormatException directly but as a >> RdfParseException if this is the case. > > From the results I get through the html-interface, I can't see any > stange data. Here is a request that fails and doesn't try to get all data: > > PREFIX mbo: <http://creativeartefact.org/ontology/> PREFIX rdfs: > <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * WHERE {?uri a > mbo:Artist. ?uri rdfs:label ?label. OPTIONAL {?uri mbo:disambiguation > ?dis}. OPTIONAL {?uri mbo:annotation ?ann}. } > > You might also test it via http://creativeartefact.org/sparql > >> As for why POST versus non-POST would make a difference I do not know, I >> will try and take a proper look later today. > > That would be great :) > >> Note that SparqlRemoteEndpoint will automatically change to POST when a >> query is above a certain length regardless of the explicit setting, the >> explicit setting is mostly useful just to force a POST in all cases. > > Hm, really? A while ago, I got an error, when a Sparql-Query was too > long and I solved it by manually setting the http-mode. But maybe this > was due to another reason than the length of the statement? > > If there is more information I can provide to pinpoint the problem, just > let me know! > > Thanks, > Frank > > >> Rob >> >> On 01/12/2014 12:14, "Frank Schumacher" <fs...@in...> >> wrote: >> >>> Hello again, >>> >>> I narrowed it down a bit more, the error seems to happen, when the >>> endpoint is set to POST: >>> >>> SparqlRemoteEndpoint endpoint = new SparqlRemoteEndpoint(new >>> Uri("http://creativeartefact.org/sparql"), >>> "http://creativeartefact.org/"); >>> endpoint.HttpMode = "POST"; >>> >>> SparqlResultSet sparqlResults = endpoint.QueryWithResultSet("PREFIX mbo: >>> <http://creativeartefact.org/ontology/> PREFIX rdfs: >>> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * WHERE {?uri a >>> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri mbo:city ?city}. >>> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri mbo:postalcode >>> ?postalcode}. }"); >>> >>> SparqlResultSet sparqlResults = endpoint.QueryWithResultSet("SELECT * >>> WHERE {?uri ?label ?city.}"); >>> >>> The first statement executes, but the second throws the error. When >>> commenting out the line endpoint.HttpMode = "POST"; - also the second >>> one executes. >>> >>> As my statements can get rather long, I need post to make sure the >>> SPARQL request doesn't exceed the allowed length for GET. Any idea, how >>> to solve this problem? >>> >>> Thanks in advance, >>> Frank >>> >>> #Am 28.11.2014 18:03, schrieb Frank Schumacher: >>>> I made some more tests and it is getting even stranger. I tried more >>>> test queries and even the simplest ones fail. For testing, I made two >>>> call. The first one works, the second raises the error. When I try to >>>> step into it with F11, it tells me: >>>> >>>> Aufruflistenort (callstackposition?): >>>> >>>> VDS.Common.dll!VDS.Common.Tries.AbstractTrie<string,char,System.Uri>.Move >>>> ToNode(string >>>> key) Zeile 211 >>>> >>>> Here is the line that works: >>>> SparqlResultSet sparqlResults = args.Endpoint.QueryWithResultSet("PREFIX >>>> mbo: <http://creativeartefact.org/ontology/> PREFIX rdfs: >>>> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * WHERE {?uri a >>>> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri mbo:city ?city}. >>>> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri mbo:postalcode >>>> ?postalcode}. }"); >>>> >>>> and here the one that raises the error: >>>> SparqlResultSet sparqlResults = args.Endpoint.QueryWithResultSet("SELECT >>>> * WHERE {?uri ?label ?city}"); >>>> >>>> I'm really puzzled ... >>>> >>>> Ciao, >>>> Frank >>>> >>>> Am 28.11.2014 17:08, schrieb Frank Schumacher: >>>>> Hello Rob, >>>>> >>>>> I get a really strange UriFormatException (Ungültiger URI: Das >>>>> URI-Format konnte nicht bestimmt werden.) when calling >>>>> SparqlRemoteEndpoint.QueryWithResultSet with the following query: >>>>> >>>>> PREFIX mbo: <http://creativeartefact.org/ontology/> PREFIX rdfs: >>>>> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT ?uri ?label >>>>> ?dis >>>>> ?ann WHERE {?uri a mbo:Artist. ?uri rdfs:label ?label. OPTIONAL {?uri >>>>> mbo:disambiguation ?dis}. OPTIONAL {?uri mbo:annotation ?ann}. } >>>>> >>>>> With a similar query, I don't get any error: >>>>> >>>>> PREFIX mbo: <http://creativeartefact.org/ontology/> PREFIX rdfs: >>>>> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * WHERE {?uri a >>>>> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri mbo:city ?city}. >>>>> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri mbo:postalcode >>>>> ?postalcode}. } >>>>> >>>>> When running the problematic query in the browser-frontend of my >>>>> sparql-endpoint, I get the results as expected. Any idea, where the >>>>> problem might be? >>>>> >>>>> Ciao, >>>>> Frank >>>>> >>>> >>>> >>> >>> >>> -- >>> ************************************************ >>> * Universität Leipzig, Institut für Informatik * >>> * Abteilung Betriebliche Informationssysteme * >>> * http://bis.informatik.uni-leipzig.de * >>> * Tel.: 0341 / 97 32 256 * >>> * * >>> * ========== Opera Metal: molllust =========== * >>> * http://www.molllust.com * >>> * M'era Luna Newcomer 2013! * >>> ************************************************ >>> >>> -------------------------------------------------------------------------- >>> ---- >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>> Get technology previously reserved for billion-dollar corporations, FREE >>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clkt >>> rk >>> _______________________________________________ >>> dotNetRDF-Support mailing list >>> dot...@li... >>> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >> >> >> >> >> >> >> ----------------------------------------------------------------------------->> - >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >> _______________________________________________ >> dotNetRDF-Support mailing list >> dot...@li... >> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support >> > > > -- > ************************************************ > * Universität Leipzig, Institut für Informatik * > * Abteilung Betriebliche Informationssysteme * > * http://bis.informatik.uni-leipzig.de * > * Tel.: 0341 / 97 32 256 * > * * > * ========== Opera Metal: molllust =========== * > * http://www.molllust.com * > * M'era Luna Newcomer 2013! * > ************************************************ > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > |
From: Frank S. <fs...@in...> - 2014-12-01 13:54:36
|
Hey Rob, > Do you have a complete stack trace from the case where it fails? sure: System.UriFormatException: Ungültiger URI: Das URI-Format konnte nicht bestimmt werden. bei System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) bei System.Uri..ctor(String uriString) bei VDS.RDF.UriFactory.Create(String uri) bei VDS.RDF.Parsing.SparqlJsonParser.ParseBoundVariable(SparqlJsonParserContext context, String var, SparqlResult r, Boolean headSeen) bei VDS.RDF.Parsing.SparqlJsonParser.ParseBinding(SparqlJsonParserContext context, Boolean headSeen) bei VDS.RDF.Parsing.SparqlJsonParser.ParseBindings(SparqlJsonParserContext context, Boolean headSeen) bei VDS.RDF.Parsing.SparqlJsonParser.ParseResults(SparqlJsonParserContext context, Boolean headSeen) bei VDS.RDF.Parsing.SparqlJsonParser.ParseBody(SparqlJsonParserContext context) bei VDS.RDF.Parsing.SparqlJsonParser.ParseResultSetObject(SparqlJsonParserContext context) bei VDS.RDF.Parsing.SparqlJsonParser.Parse(TextReader input, ISparqlResultsHandler handler) bei VDS.RDF.Parsing.SparqlJsonParser.Load(ISparqlResultsHandler handler, TextReader input) bei VDS.RDF.Parsing.SparqlJsonParser.Load(ISparqlResultsHandler handler, StreamReader input) bei VDS.RDF.Query.SparqlRemoteEndpoint.QueryWithResultSet(ISparqlResultsHandler handler, String sparqlQuery) bei VDS.RDF.Query.SparqlRemoteEndpoint.QueryWithResultSet(String sparqlQuery) > UriFormatException implies there is some invalid data somewhere, the fact > that you are using SparqlRemoteEndpoint suggests that the remote server > may be returning some bad data that we can't process though this should > probably not manifest as a UriFormatException directly but as a > RdfParseException if this is the case. From the results I get through the html-interface, I can't see any stange data. Here is a request that fails and doesn't try to get all data: PREFIX mbo: <http://creativeartefact.org/ontology/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * WHERE {?uri a mbo:Artist. ?uri rdfs:label ?label. OPTIONAL {?uri mbo:disambiguation ?dis}. OPTIONAL {?uri mbo:annotation ?ann}. } You might also test it via http://creativeartefact.org/sparql > As for why POST versus non-POST would make a difference I do not know, I > will try and take a proper look later today. That would be great :) > Note that SparqlRemoteEndpoint will automatically change to POST when a > query is above a certain length regardless of the explicit setting, the > explicit setting is mostly useful just to force a POST in all cases. Hm, really? A while ago, I got an error, when a Sparql-Query was too long and I solved it by manually setting the http-mode. But maybe this was due to another reason than the length of the statement? If there is more information I can provide to pinpoint the problem, just let me know! Thanks, Frank > Rob > > On 01/12/2014 12:14, "Frank Schumacher" <fs...@in...> > wrote: > >> Hello again, >> >> I narrowed it down a bit more, the error seems to happen, when the >> endpoint is set to POST: >> >> SparqlRemoteEndpoint endpoint = new SparqlRemoteEndpoint(new >> Uri("http://creativeartefact.org/sparql"), >> "http://creativeartefact.org/"); >> endpoint.HttpMode = "POST"; >> >> SparqlResultSet sparqlResults = endpoint.QueryWithResultSet("PREFIX mbo: >> <http://creativeartefact.org/ontology/> PREFIX rdfs: >> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * WHERE {?uri a >> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri mbo:city ?city}. >> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri mbo:postalcode >> ?postalcode}. }"); >> >> SparqlResultSet sparqlResults = endpoint.QueryWithResultSet("SELECT * >> WHERE {?uri ?label ?city.}"); >> >> The first statement executes, but the second throws the error. When >> commenting out the line endpoint.HttpMode = "POST"; - also the second >> one executes. >> >> As my statements can get rather long, I need post to make sure the >> SPARQL request doesn't exceed the allowed length for GET. Any idea, how >> to solve this problem? >> >> Thanks in advance, >> Frank >> >> #Am 28.11.2014 18:03, schrieb Frank Schumacher: >>> I made some more tests and it is getting even stranger. I tried more >>> test queries and even the simplest ones fail. For testing, I made two >>> call. The first one works, the second raises the error. When I try to >>> step into it with F11, it tells me: >>> >>> Aufruflistenort (callstackposition?): >>> >>> VDS.Common.dll!VDS.Common.Tries.AbstractTrie<string,char,System.Uri>.Move >>> ToNode(string >>> key) Zeile 211 >>> >>> Here is the line that works: >>> SparqlResultSet sparqlResults = args.Endpoint.QueryWithResultSet("PREFIX >>> mbo: <http://creativeartefact.org/ontology/> PREFIX rdfs: >>> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * WHERE {?uri a >>> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri mbo:city ?city}. >>> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri mbo:postalcode >>> ?postalcode}. }"); >>> >>> and here the one that raises the error: >>> SparqlResultSet sparqlResults = args.Endpoint.QueryWithResultSet("SELECT >>> * WHERE {?uri ?label ?city}"); >>> >>> I'm really puzzled ... >>> >>> Ciao, >>> Frank >>> >>> Am 28.11.2014 17:08, schrieb Frank Schumacher: >>>> Hello Rob, >>>> >>>> I get a really strange UriFormatException (Ungültiger URI: Das >>>> URI-Format konnte nicht bestimmt werden.) when calling >>>> SparqlRemoteEndpoint.QueryWithResultSet with the following query: >>>> >>>> PREFIX mbo: <http://creativeartefact.org/ontology/> PREFIX rdfs: >>>> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT ?uri ?label >>>> ?dis >>>> ?ann WHERE {?uri a mbo:Artist. ?uri rdfs:label ?label. OPTIONAL {?uri >>>> mbo:disambiguation ?dis}. OPTIONAL {?uri mbo:annotation ?ann}. } >>>> >>>> With a similar query, I don't get any error: >>>> >>>> PREFIX mbo: <http://creativeartefact.org/ontology/> PREFIX rdfs: >>>> <http://www.w3.org/2000/01/rdf-schema#> SELECT DISTINCT * WHERE {?uri a >>>> mbo:Organiser. ?uri rdfs:label ?label. OPTIONAL {?uri mbo:city ?city}. >>>> OPTIONAL {?uri mbo:street ?street}. OPTIONAL {?uri mbo:postalcode >>>> ?postalcode}. } >>>> >>>> When running the problematic query in the browser-frontend of my >>>> sparql-endpoint, I get the results as expected. Any idea, where the >>>> problem might be? >>>> >>>> Ciao, >>>> Frank >>>> >>> >>> >> >> >> -- >> ************************************************ >> * Universität Leipzig, Institut für Informatik * >> * Abteilung Betriebliche Informationssysteme * >> * http://bis.informatik.uni-leipzig.de * >> * Tel.: 0341 / 97 32 256 * >> * * >> * ========== Opera Metal: molllust =========== * >> * http://www.molllust.com * >> * M'era Luna Newcomer 2013! * >> ************************************************ >> >> -------------------------------------------------------------------------- >> ---- >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clkt >> rk >> _______________________________________________ >> dotNetRDF-Support mailing list >> dot...@li... >> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > > > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > dotNetRDF-Support mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support > -- ************************************************ * Universität Leipzig, Institut für Informatik * * Abteilung Betriebliche Informationssysteme * * http://bis.informatik.uni-leipzig.de * * Tel.: 0341 / 97 32 256 * * * * ========== Opera Metal: molllust =========== * * http://www.molllust.com * * M'era Luna Newcomer 2013! * ************************************************ |