rdf

Finding all steps in property path

ⅰ亾dé卋堺 提交于 2019-12-17 06:15:08
问题 I'm new to SPARQL and I'm trying to create a property path query that will spit out each intermediate step along the path. So far I have this: select ?object where { <subjectURI> <isRelatedTo>+ ?object . } This gives me a list of all the relations to my subject URI throughout the path, no matter how distantly the relation (correct me if I'm wrong so far). But, I'd like to see how the relations are organized. Something like: <subjectURI> <isRelatedTo> <object1> <object1> <isRelatedTo> <object2

how to use Union/or in sparql path with arbitrary length?

陌路散爱 提交于 2019-12-14 02:19:46
问题 I'm using below query to find all properties with domain of city (or superclasses of city) or range of country (or superclasses of country) from DBPedia ontology. when I use path with fixed length there is no problem but when I put * to define paths with arbitrary length, I get this error: Virtuoso 37000 Error SP031: SPARQL compiler: Variable '_::trans_subj_6_4' is used in subexpressions of the query but not assigned my SPARQL: define sql:signal-void-variables 1 define input:default-graph-uri

uml Composition relationships to RDF and OWL

爱⌒轻易说出口 提交于 2019-12-14 02:06:08
问题 I'm beginner in RDF and OWL ontologies. I'm trying to transform this diagram into OWL syntax. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:dc="http://purl.org/dc/elements/1.1/" > <!-- OWL Class Definition - Robot Position --> <owl:Class rdf:ID="house" /> <owl:Class rdf:ID="room" /> <owl:Class rdf:ID="kitchen" /> <owl:Class rdf:ID="garden" /> <owl:Class rdf:ID="table" /> <owl

Desktop SPARQL client for Jena (TDB)?

感情迁移 提交于 2019-12-14 01:54:03
问题 I'm working on an app that uses Jena for storage (with the TDB backend). I'm looking for something like the equivalent of Squirrel, that lets me see what's being stored, run queries etc. This seems like an obvious thing to need, but my (perhaps badly phrased) google queries aren't turning up anything promising. Any suggestions, please? I'm on XP. Even a command line tool would be helpful. 回答1: Take a look at my Store Manager tool which is part of the dotNetRDF Toolkit which I develop as part

Error in SPARQL Query

放肆的年华 提交于 2019-12-13 20:51:46
问题 I'm getting an error with my SPARQL query but can't find it out: Query PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> PREFIX : <http://dbpedia.org/resource/> PREFIX dbpedia2: <http://dbpedia.org/property/> PREFIX dbpedia: <http://dbpedia.org/> SELECT DISTINCT ?lat, ?long { :Taj_Mahal

Explanation about Direct Mapping to convert Many-to-Many relationship

僤鯓⒐⒋嵵緔 提交于 2019-12-13 19:01:45
问题 One of the standards from W3C for RDB2RDF is Direct Mapping. I heard that there is a problem when converting many-to-many relationship from a relational database and they say it loses semantic, I need more explanation about it. 回答1: ...there is a problem when converting many-to-many relationship from a relational database I'd say that direct mapping introduces additional "parasitic" semantics, treating normalization artefacts as first-class object. Let's consider the D011-M2MRelations

List in front of the expression in OWL?

懵懂的女人 提交于 2019-12-13 18:22:33
问题 Is it possible to have a list in front of an expression in OWL? Something like: ( :Dairy :Egg :Nut ) rdfs:subClassOf :FoodGroup . or: :Dairy , :Egg , :Nut rdfs:subClassOf :FoodGroup . Or in general, is there a syntactic sugar for a group of expressions of the type?: :Diary rdfs:subClassOf :FoodGroup . :Egg rdfs:subClassOf :FoodGroup . :Nut rdfs:subClassOf :FoodGroup . 回答1: Turtle In Turtle, there are no subject lists that would be similar to object lists. It is possible to write something

Should queries with URIs like http://pt.dbpedia.org/resource/.. be different from the ones with URIs like http://dbpedia.org/resource/..?

两盒软妹~` 提交于 2019-12-13 17:20:54
问题 I'm making that SPARQL query: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?label WHERE { <http://pt.dbpedia.org/resource/Brasil> rdfs:label ?label.} and I don't get any results for ?text . I checked that URI on my browser and found the rdfs:label property there. Is that problem caused by the URI form http://pt.dbpedia.org/ ? I've already used the same query with IRIs starting with http://dbpedia.org/resource/ , e.g.,

RDF/XML how to define RDFS classes,subclasses and link them as a type

你离开我真会死。 提交于 2019-12-13 17:17:30
问题 How can we define classes and sub classes in Jena and add them as type of other resources after? I use Java,Jena and RDF/XML notation. I want to create something like: <rdfs:Class rdf:about="http://www.help.me/NS/Classname"/> <rdfs:Class rdf:about="http://www.help.me/NS/Subclassname"> <rdfs:subClassOf rdf:resource="http://www.help.me/NS/Classname"/> </rdfs:Class> And after: linking a resource to a subclass: <rdf:Description rdf:about="http://www.help.me/NS/NewResource"> <rdf:type rdf:resource

How can I programmatically compute path length using Jena RDF/Ontology API?

别等时光非礼了梦想. 提交于 2019-12-13 15:53:50
问题 I have an RDF Graph with only one relationship(RDFS.subClassOf or is-a) between all the classes. The 'size' of each class is equal to the total number of its subclasses. The 'size' of each RDFS.subClassOf property is 0.5 if it is connecting from a class with fewer total number of subclasses and 1 if it is connecting from class with large total number of subclasses to class with less total number of subclasses. I want to perform an arithmetic sum of all the sizes of each semantic component