rdf

Defining Protege class with expression of numerical data

£可爱£侵袭症+ 提交于 2020-01-28 10:58:24
问题 I am building a smart home ontology. I now have a class hierarchy like that: I want to give definitions to the subclass of 'RoomStatus'. For example, I want to define that when room temperature is in range of 18-22 Centigrade and Humidity is in range of 40-50%, then the room has a mild status. I tried to use Class Expression Editor in Protege but it doesn't work. How can I realize this definition? Thanks in advance! 回答1: Hatim's answer may work for you, but I think it might be better not to

Limiting graphs to be used by Factforge sparql endpoint

随声附和 提交于 2020-01-24 17:13:11
问题 Using http://www.sparql.org/sparql.html to run this query prefix oxprop: <http://ophileon.com/ox/property#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix owl: <http://www.w3.org/2002/07/owl#> prefix wgs84_pos: <http://www.w3.org/2003/01/geo/wgs84_pos#> prefix gn: <http://www.geonames.org/ontology#> select * from <http://www.ophileon.com/ox/poi.rdf> where { ?poi rdfs:label ?poiname. ?poi owl:sameAs ?geonameuri. SERVICE <http://factforge.net/sparql>{ ?geonameuri gn:population

Can OWL punning help in defining data properties on object property?

两盒软妹~` 提交于 2020-01-24 15:34:07
问题 Punning (which was introduced in OWL 2 DL) allows one to give the same name (IRI) to a Class and an Object Property (see Association Example). Can I use this way of meta-modelling to attach attributes on a relation? For instance, the relation drives connects Person and Vehicle . I want to specify the velocity with which the Vehicle is driven, and this property belongs on drives . Punning allows me to model drives as an association class by specifying both a class and an object property named

Querying a repository in Open RDF and displaying the results

柔情痞子 提交于 2020-01-24 15:17:07
问题 I have loaded an RDF data-store into an OpenRDF Repository, and then I am trying to query the Repository and retrieve certain data based on the query. I am running a very simple query to get all the subjects predicates and the objects. But when I am trying to print the query results it is just showing the first triple. I am giving the code of the method which is doing the query work only, please check and let me know what is wrong.- private static void queryingRDF(Repository repo) { try{

Sparql - delete queries stop working after update

淺唱寂寞╮ 提交于 2020-01-23 17:46:25
问题 I've created an application, which works with openrdf sesame and owlim module. Recently, I needed to update licence key to owlim (I received a key for the newest owlim version), so I was forced to update sesame as well. Application was build with sesame 2.6.0 and owlim 4.3, now updated to sesame 2.6.8 and owlim 5.2 There are issues with delete sparql queries, which works in older version, so I got a hunch, that update is the problem. Here is one such query: PREFIX oporg: <http://sesame

Is there a differense between a CONSTRUCT queries sent to a virtuoso endpoint and one sent to a Jena one?

て烟熏妆下的殇ゞ 提交于 2020-01-23 02:54:46
问题 I am trying to infer some new triples based on the following CONSTRUCT query: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX gpml: <http://vocabularies.wikipathways.org/gpml#> PREFIX wp: <http://vocabularies.wikipathways.org/wp#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> CONSTRUCT { ?line rdf:type wp:DirectedInteraction . } WHERE { ?pathway dc:identifier ?wpIdentifier .{ SELECT

Querying DBpedia for English-only description (with SPARQL)

元气小坏坏 提交于 2020-01-22 17:47:05
问题 I'm querying dbpedia.org for a description of Big Ben with this SPARQL query: select ?desc where { <http://dbpedia.org/resource/Big_Ben> <http://www.w3.org/2000/01/rdf-schema#comment> ?desc } This returns a list of descriptions in at least 10 different languages. How do I specify that I only want the English language description? 回答1: The keys you need to know are that str() and lang() pull apart the text and language of the value, so you can do this: select str(?desc) where { <http://dbpedia

Filter by date range in SPARQL

老子叫甜甜 提交于 2020-01-22 11:07:06
问题 I am using Jena's SPARQL engine and trying to write a query to filter on a date range as I need to find the value of a property after a fixed date. My date property is in the following format: Fri May 23 10:20:13 IST 2014 How do I write a SPARQL query to get other properties with dates greater than this? 回答1: With your data in that format you can't filter on a range of it without adding a custom extension function to ARQ (which is intended for advanced users) since you would need to parse and

Filter by date range in SPARQL

六月ゝ 毕业季﹏ 提交于 2020-01-22 11:03:50
问题 I am using Jena's SPARQL engine and trying to write a query to filter on a date range as I need to find the value of a property after a fixed date. My date property is in the following format: Fri May 23 10:20:13 IST 2014 How do I write a SPARQL query to get other properties with dates greater than this? 回答1: With your data in that format you can't filter on a range of it without adding a custom extension function to ARQ (which is intended for advanced users) since you would need to parse and

Filter by date range in SPARQL

和自甴很熟 提交于 2020-01-22 11:03:06
问题 I am using Jena's SPARQL engine and trying to write a query to filter on a date range as I need to find the value of a property after a fixed date. My date property is in the following format: Fri May 23 10:20:13 IST 2014 How do I write a SPARQL query to get other properties with dates greater than this? 回答1: With your data in that format you can't filter on a range of it without adding a custom extension function to ARQ (which is intended for advanced users) since you would need to parse and