You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by "McGibbney, Lewis John" <Le...@gcu.ac.uk> on 2011/05/03 15:42:17 UTC
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
RE: Valid SPARQL query no results
Posted by Dave Reynolds <da...@gmail.com>.
On Tue, 2011-05-03 at 17:23 +0100, McGibbney, Lewis John wrote:
> This works perfectly Dave thank you
>
> I am still very much finding my feet here so apologies for the mundane thread discussion on my part
No problems, there's a lot of stuff to get to grips with in RDF and
SPARQL which can seem arcane until you get into the mind set.
Dave
RE: Valid SPARQL query no results
Posted by "McGibbney, Lewis John" <Le...@gcu.ac.uk>.
This works perfectly Dave thank you
I am still very much finding my feet here so apologies for the mundane thread discussion on my part
________________________________________
From: Dave Reynolds [dave.e.reynolds@gmail.com]
Sent: 03 May 2011 17:15
To: jena-users@incubator.apache.org
Subject: Re: Valid SPARQL query no results
On Tue, 2011-05-03 at 14:42 +0100, McGibbney, Lewis John wrote:
> 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") }
In your example ns:hasNoMaximumOrMinimumAreaGuidance is the subject, not
the property and the property is rdfs:comment.
Secondly, the ^^xsd:string in the source data is declaring a datatype,
it is not part of the lexical form of the string and you can't regex on
it that way. But then I don't see why you would need to.
>
> 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
Maybe something simple like:
SELECT ?range ?b ?comment WHERE
{ ?b rdfs:range ?range; rdfs:comment ?comment. }
?
Dave
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
Re: Valid SPARQL query no results
Posted by Dave Reynolds <da...@gmail.com>.
On Tue, 2011-05-03 at 14:42 +0100, McGibbney, Lewis John wrote:
> 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") }
In your example ns:hasNoMaximumOrMinimumAreaGuidance is the subject, not
the property and the property is rdfs:comment.
Secondly, the ^^xsd:string in the source data is declaring a datatype,
it is not part of the lexical form of the string and you can't regex on
it that way. But then I don't see why you would need to.
>
> 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
Maybe something simple like:
SELECT ?range ?b ?comment WHERE
{ ?b rdfs:range ?range; rdfs:comment ?comment. }
?
Dave
RE: Valid SPARQL query no results
Posted by "McGibbney, Lewis John" <Le...@gcu.ac.uk>.
Thank you for this Andy
________________________________________
From: Andy Seaborne [andy.seaborne@epimorphics.com]
Sent: 03 May 2011 17:34
To: jena-users@incubator.apache.org
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 [Lewis.McGibbney@gcu.ac.uk]
> Sent: 03 May 2011 14:42
> To: jena-users@incubator.apache.org
> 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
Re: Valid SPARQL query no results
Posted by Andy Seaborne <an...@epimorphics.com>.
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 [Lewis.McGibbney@gcu.ac.uk]
> Sent: 03 May 2011 14:42
> To: jena-users@incubator.apache.org
> 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
RE: Valid SPARQL query no results
Posted by "McGibbney, Lewis John" <Le...@gcu.ac.uk>.
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
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 [Lewis.McGibbney@gcu.ac.uk]
Sent: 03 May 2011 14:42
To: jena-users@incubator.apache.org
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