rdfs

Using the 'GRAPH' keyword in SPARQL to fetch remote graphs

有些话、适合烂在心里 提交于 2019-12-21 10:17:00
问题 I'm looking to use SPARQL for a relatively basic task: Given a FOAF graph, I'd like to parse the elements I find in there, get their tags (if they exist) and then, use those as new graphs from which to find information about those people. So for instance, you could imagine a simple use case where I want to run a SPARQL query to list all of my favorite foods (as per my FOAF file), and also the favorite foods of all my friends. Here is what this looks like at the moment. Note that for testing

Difference between domain and range in rdf schema?

一世执手 提交于 2019-12-20 10:23:23
问题 could you please explain me the difference between rdfs:domain and rdfs:range with an example? and when should i use domain and when range? i have read h w3c rdf primer but i did not understand the difference 回答1: From a simplistic point of view, the domain and range properties are there to give you insight into the way that the property links a subject to an object. In the case of the domain property , when you link a subject to an object using a property with this associated attribute, then

Equal relationship between ontology properties

ぃ、小莉子 提交于 2019-12-18 09:28:58
问题 I have 2 properties, e.g. 'hasColor' and 'hasFinish'. I want to express with ontology that in case of ontology class A are properties 'hasColor' and 'hasFinish' equal (owl:equivalentProperty). But in case of ontology class B the properties 'hasColor' and 'hasFinish' are NOT equal. How can I achieve this? One way probably is to create 'hasColor' and 'hasFinish' properties with class A as a range and set them to be equal. Then create another ones 'hasColor' and 'hasFinish' properties with class

How to Define My Own Ranges for OWL DataProperties

☆樱花仙子☆ 提交于 2019-12-18 05:12:25
问题 I have recently started learning Web Ontology Language (OWL). I want to define a DataProperty with my own defined range of value. Consider the following property: <owl:DatatypeProperty rdf:ID="myProperty"> <rdfs:domain rdf:resource="#MyDomain"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> </owl:DatatypeProperty> The property has the range of double value but I want to restrict the range in order to make my property to accept only double values between 0 and 1. I would

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

Extract schema from rdf/xml

核能气质少年 提交于 2019-12-13 04:55:36
问题 I am making use of a tool called as FRED (http://wit.istc.cnr.it/stlab-tools/fred) , which generates the RDF/XML for the given natural language text. But that tool is making use its own predefined schema and also the namespaces. There is no way for the user to give their own schema for the tool. Whatever the RDF/XML data, which I have got from that tool is fed to Triple Data Store using Apache JENA library. Is it possible to extract the Schema like class properties, objects and Data

When i declare property how to use it

南笙酒味 提交于 2019-12-13 02:56:35
问题 I use RDF/XML to represent some data. First of all i want to show that a person knows other person, i declare the property and i use the following code to specify that mark knows katrin and katrin knows john PART 1 <rdf:Property rdf:about="Know"> <rdfs:domain rdf:resource="#Person"/> <rdfs:range rdf:resource="#Person"/> </rdf:Property> PART2 <rdf:Description rdf:about="#Mark"> <dc:Knows rdf:resource="#Katrin"/> </rdf:Description> <rdf:Description rdf:about="#Katrin"> <dc:Knows rdf:resource="

Writing nested rdf:Description elements in RDF/XML with Jena

随声附和 提交于 2019-12-12 02:49:40
问题 I would like to have a file like this: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://stackoverflow.com/q/24084473/1281433/" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:j.0="http://stackoverflow.com/q/24084473/1281433/relations/"> <rdf:Property rdf:about="http://stackoverflow.com/q/24084473/1281433/Regione"> <rdfs:label>Regione</rdfs:label> </rdf:Property> <rdf:Property rdf:about="http://stackoverflow.com/q/24084473/1281433/Nome"> <rdfs:label>Nome<

DELETE QUERY SPARQL FUSEKI

假装没事ソ 提交于 2019-12-12 02:15:45
问题 How can I delete all triples statement for a given uri? My graph contains: PREFIX mo: <http://www.dbwic.org/ontology#> PREFIX term: <http://www.dbwic.org/ontology/terms/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> <http://www.dbwic.org/page/d2e2e606-f962-4db1-8ffc-883e75da109a> term:title "tiitle album"; term:date "date title"; term:name " name ". I tried to delete all triples for http://www.dbwic.org/page/d2e2e606-f962-4db1-8ffc-883e75da109a but the query is not working. PREFIX mo:

Difference between rdf:seeAlso and rdfs:seeAlso

空扰寡人 提交于 2019-12-11 21:30:05
问题 What is the difference between rdf:seeAlso and rdfs:seeAlso ? When I can use rdf:seeAlso and when I can use rdfs:seeAlso ? Can you do any examples? 回答1: First, note that rdf and rdfs are prefixes commonly used to reference the RDF syntax and RDF schema vocabularies respectively. The rdf is typically used for http://www.w3.org/1999/02/22-rdf-syntax-ns#, so that rdf:seeAlso would expand to http://www.w3.org/1999/02/22-rdf-syntax-ns#seeAlso. However, if you follow the vocabulary reference, you