rdfs

Sparql query on restriction list (Equivalent To) in protégé

喜欢而已 提交于 2019-11-29 12:05:22
My ontology is about Cocktail. This is a cocktail named "AfterGlow" <owl:Class rdf:about="&cocktails;AfterGlow"> <owl:equivalentClass> <owl:Class> <owl:intersectionOf rdf:parseType="Collection"> <owl:Restriction> <owl:onProperty rdf:resource="&cocktails;aPourIngredient"/> <owl:someValuesFrom rdf:resource="&cocktails;JusAnanas"/> </owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource="&cocktails;aPourIngredient"/> <owl:someValuesFrom rdf:resource="&cocktails;JusOrange"/> </owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource="&cocktails;aPourIngredient"/> <owl

How to Define My Own Ranges for OWL DataProperties

十年热恋 提交于 2019-11-29 08:03:10
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 be very grateful if you guide me how to define my own ranges for data properties. Here you go (in

How are RDF and RDFS related?

柔情痞子 提交于 2019-11-29 01:50:30
问题 I've been reading about Semantic Web technologies such as RDF/RDFS and "ontology", but was wondering how each of these are related? At the moment the terms all seem interchangeable, or I'm not understanding a fundamental concept here. 回答1: Basic definitions RDF is a concept. RDF is also a NAME of a vocabulary. RDFS is a NAME of another vocabulary. "ontology" is just a SYNONYM of the term "vocabulary". Explanations RDF is a concept RDF is a concept or a way of describing things. The concept of

Parsing schema.org ttl/owl file using Jena

末鹿安然 提交于 2019-11-28 14:30:42
I'm writing a code generator that generate entities (POJO's in Java language) from the schema defined here http://schema.rdfs.org/all.ttl . I'm using Jena to parse the ttl file and retrieve the meta data that I need to generate them. Jena parses the file successfully, however, for some reason it does not list all the attributes of a given entity, e.g., Person. I'm not sure whether I'm doing something wrong, using the wrong API, etc. Here's the code sample that recreates the scenario: public class PersonParser { public static void main(String[] args) { OntModel model = ModelFactory

Sparql query on restriction list (Equivalent To) in protégé

余生长醉 提交于 2019-11-28 05:34:51
问题 My ontology is about Cocktail. This is a cocktail named "AfterGlow" <owl:Class rdf:about="&cocktails;AfterGlow"> <owl:equivalentClass> <owl:Class> <owl:intersectionOf rdf:parseType="Collection"> <owl:Restriction> <owl:onProperty rdf:resource="&cocktails;aPourIngredient"/> <owl:someValuesFrom rdf:resource="&cocktails;JusAnanas"/> </owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource="&cocktails;aPourIngredient"/> <owl:someValuesFrom rdf:resource="&cocktails;JusOrange"/> </owl

Parsing schema.org ttl/owl file using Jena

僤鯓⒐⒋嵵緔 提交于 2019-11-27 08:31:59
问题 I'm writing a code generator that generate entities (POJO's in Java language) from the schema defined here http://schema.rdfs.org/all.ttl. I'm using Jena to parse the ttl file and retrieve the meta data that I need to generate them. Jena parses the file successfully, however, for some reason it does not list all the attributes of a given entity, e.g., Person. I'm not sure whether I'm doing something wrong, using the wrong API, etc. Here's the code sample that recreates the scenario: public