Thank you for this Andy ________________________________________ From: Andy Seaborne [[email protected]] Sent: 03 May 2011 17:34 To: [email protected] Subject: Re: Valid SPARQL query no results
On 03/05/11 16:56, McGibbney, Lewis John wrote: > I am making progress with this and can now execute various queries but I've > run into a problem and am struggling with the logic... > > Again it appears that this query is valid > > PREFIX xsd:<http://www.w3.org/2001/XMLSchema#> > PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> > PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> > PREFIX owl:<http://www.w3.org/2002/07/owl#> > PREFIX fn:<http://www.w3.org/2005/xpath-functions#> > PREFIX apf:<http://jena.hpl.hp.com/ARQ/property#> > PREFIX dc:<http://purl.org/dc/elements/1.1/> > PREFIX > ns:<http://www.semanticweb.org/ontologies/2010/11/section6energydomestic2010.owl#hasNoMaximumOrMinimumAreaGuidance> > > SELECT ?range ?comment > FROM ns:hasNoMaximumOrMinimumAreaGuidance This is the dataset description Did you mean: WHERE { GRAPH ns:hasNoMaximumOrMinimumAreaGuidance { ?x ns:hasNoMaximumOrMinimumAreaGuidance ?range . ?x ns:hasNoMaximumOrMinimumAreaGuidance ?comment FILTER regex (?comment, "^^xsd:string") } } } FROM creates the thing to query, GRAPH accesses it. Andy > WHERE > { ?x ns:hasNoMaximumOrMinimumAreaGuidance ?range . > ?x ns:hasNoMaximumOrMinimumAreaGuidance ?comment > FILTER regex (?comment, "^^xsd:string") } > > But I get an Error 400: Query may not include a dataset description > (FROM/FROM NAMED) > > Can someone please advise on how I can rearrange the query to obtain a three > column table of results > range | prefix:ns | comment > > Thank you > ________________________________________ > From: McGibbney, Lewis John [[email protected]] > Sent: 03 May 2011 14:42 > To: [email protected] > Subject: Valid SPARQL query no results > > Hi list, > > Using Fuseki-0.2.0, I'm trying to run queries on some test data. I load in > the data with the following command > ./fuseki-server --update --file myfile.owl /dataset > Part of my test data is as below > > ### > http://www.semanticweb.org/ontologies/2010/11/section6energydomestic2010.owl#hasNoMaximumOrMinimumAreaGuidance > > section6energydomestic2010:hasNoMaximumOrMinimumAreaGuidance rdf:type > owl:FunctionalProperty , > > owl:ObjectProperty ; > > rdfs:comment > "Due to the target method set by carbon dioxide emissions standard 6.1, there > is no need for guidance on minimum or maximum area for windows, doors, > rooflights and roof windows in new dwellings."^^xsd:string ; > > rdfs:range > section6energydomestic2010:Door , > > section6energydomestic2010:Framing , > > section6energydomestic2010:Glazing , > > section6energydomestic2010:RoofWindow , > > section6energydomestic2010:Rooflight , > > section6energydomestic2010:Window ; > > rdfs:domain [ > rdf:type owl:Class ; > > owl:intersectionOf ( section6energydomestic2010:BuildingElement > > section6energydomestic2010:NewDwelling > > ) > ] . > > After confirming that the syntax in the following query is valid, from the > control panel I submit the query but I get a 404 error: not found... > > > PREFIX xsd:<http://www.w3.org/2001/XMLSchema#> > PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> > PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> > PREFIX owl:<http://www.w3.org/2002/07/owl#> > PREFIX fn:<http://www.w3.org/2005/xpath-functions#> > PREFIX apf:<http://jena.hpl.hp.com/ARQ/property#> > PREFIX dc:<http://purl.org/dc/elements/1.1/> > PREFIX > ns:<http://www.semanticweb.org/ontologies/2010/11/section6energydomestic2010.owl#hasNoMaximumOrMinimumAreaGuidance> > > SELECT ?range ?b ?comment > WHERE > { ?range ns:hasNoMaximumOrMinimumAreaGuidance ?comment > FILTER regex (?comment, "^^xsd:string") } > > Can someone please help me with my query. I wish to retrieve something like > the following > > range ?b > ?comment > ----------------------------------------------------------------------------------------------------------------- > Door hasNoMaximumOrMinimumAreaGuidance Due to the target method set > by carbon dioxide emissions standard 6.1... blah blah blah > Framing hasNoMaximumOrMinimumAreaGuidance Due to the target method set by > carbon dioxide emissions standard 6.1... blah blah blah > Glazing hasNoMaximumOrMinimumAreaGuidance Due to the target method set > by carbon dioxide emissions standard 6.1... blah blah blah > etc > etc > etc > > Any help would be great. Thanks > > Lewis > > Glasgow Caledonian University is a registered Scottish charity, number > SC021474 > > Winner: Times Higher Education’s Widening Participation Initiative of the > Year 2009 and Herald Society’s Education Initiative of the Year 2009. > http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html > > Winner: Times Higher Education’s Outstanding Support for Early Career > Researchers of the Year 2010, GCU as a lead with Universities Scotland > partners. > http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html > > Email has been scanned for viruses by Altman Technologies' email management > service - www.altman.co.uk/emailsystems > > Glasgow Caledonian University is a registered Scottish charity, number > SC021474 > > Winner: Times Higher Education’s Widening Participation Initiative of the > Year 2009 and Herald Society’s Education Initiative of the Year 2009. > http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html > > Winner: Times Higher Education’s Outstanding Support for Early Career > Researchers of the Year 2010, GCU as a lead with Universities Scotland > partners. > http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html Email has been scanned for viruses by Altman Technologies' email management service - www.altman.co.uk/emailsystems Glasgow Caledonian University is a registered Scottish charity, number SC021474 Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009. http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners. http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html
