semantic-web

Define mutiple domains/ranges in a same propery in OWL

孤街醉人 提交于 2019-12-23 20:54:07
问题 What's the correct way to set domains/ranges of data/object properties in OWL? If I have two classes A , B and a data property hasName : <Declaration><Class IRI="#A"/></Declaration> <Declaration><Class IRI="#B"/></Declaration> <Declaration><DataProperty IRI="#hasName"/></Declaration> <FunctionalDataProperty> <DataProperty IRI="#hasName"/> </FunctionalDataProperty> <DataPropertyRange> <DataProperty IRI="#hasName"/> <Datatype abbreviatedIRI="xsd:string"/> </DataPropertyRange> I want to set

Filtering based on a URI in SParQL [duplicate]

放肆的年华 提交于 2019-12-23 16:07:10
问题 This question already has an answer here : Exclude results from DBpedia SPARQL query based on URI prefix (1 answer) Closed 3 years ago . You can run the query below at the Linked MDB SPARQL Explorer. The values of ?imdbID (the last variable) contains IRIs from one of three possible domains (freebase.com, rottentomatoes.com or imdb.com). I would like to know how to apply a filter such that only the rows from the imdb.com domain are retained. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

How to get a concise bounded description of a resource with Sesame?

左心房为你撑大大i 提交于 2019-12-23 09:01:54
问题 I've been testing Sesame 2.7.2 and I got a big surprise when faced to the fact that DESCRIBE queries do not include blank nodes closure [ EDIT: the right term for this is CBD for concise bounded description ] If I correctly understand, the SPARQL spec is quite loose on that and says that what is returned is actually up to the provider, but I'm still surprised at the choice, since bnodes (in the results of the describe query) cannot be used in subsequent SPARQL queries. So the question is: how

The difference between blank nodes and variables in SPARQL queries

狂风中的少年 提交于 2019-12-23 06:59:04
问题 I've studied SPARQL specification on the topic and also found this answer rather interesting. However definitions are complicated enough, so I still don't see the answer for my question. I can't find any example of query with blank nodes that returns different results than the same query with variables in place of blank nodes. For example is there any case when the following queries return different results: SELECT ?a ?b WHERE { ?a :predicate _:blankNode . _:blankNode :otherPredicate ?b . }

When to use the subclass in RDFS?

こ雲淡風輕ζ 提交于 2019-12-23 06:51:10
问题 I want to create a RDFS schema about venue info which contains for example: only photo and address info. I find another schema about it: https://schema.org/Place. It contains more properties than I need. So, should I make my schema venue as a subclass of https://schema.org/Place? Or I just make a new class but reuse the properties in https://schema.org/Place? Do they have differences? 回答1: The semantic web / linked data lives of the re-use of existing vocabularies, so if you only need a sub

merge equivalent classes using owl API

余生长醉 提交于 2019-12-23 04:52:53
问题 I used OWL API to merge 2 owl files correctly. However I discovered that classes/entities withe the same name(Joshua helped to define it this way: prefixes defined such that the suffix of the classes' IRIs equal under a case insensitive string comparison) are repeated. I need to output these classes with the same names as one. any help will be appreciated. thank you in advance. 来源: https://stackoverflow.com/questions/19515464/merge-equivalent-classes-using-owl-api

Meaning of owl:hasValue?

自作多情 提交于 2019-12-23 03:33:10
问题 What is the meaning of an owl:hasValue restriction, and how is it different from owl:allValuesFrom and owl:someValuesFrom ? In an ontology, I want to write an axiom that says, “Every body that has a diploma is literate.” How can I write this? 回答1: Different types of restriction classes Consider an individual x, a class C, a property P, and another individual y. Then there are a few class expressions that it sounds like you're concerned with: someValuesFrom An individual x is an element of the

What's the difference between using RDFS/OWL and XML?

笑着哭i 提交于 2019-12-23 03:02:08
问题 Mainly, I was wondering what advantages the ontology languages of RDFS/OWL has over using a markup system (such as http://www.schema.org/) for managing and creating metadata? I'm still very confused about how different concepts of the "Semantic Web" are supposed to fit together in the overall picture... The relation between RDF/RDFS/RDFa? OWL? URIs? and finally, XML and SQL/SPARQL? All the descriptions I've read about so far about them make sense individually, but I'm not sure if I could be

is it correct that a class can be an instance?

烂漫一生 提交于 2019-12-23 02:16:10
问题 In this document https://www.w3.org/TR/rdf-schema/#ch_introduction it is written: rdfs:Resource is an instance of rdfs:Class. however it is also written: This is the class of everything is this a typo? can a class be an instance ? 回答1: That's actually an interesting question. I just want to add to your comment in CaptSolo's answer: but can I define my custom classes as instances of an instance? ( i highly doubt that ) It's not so much a question of whether you "can" do something or not (at

how to use cidoc-crm in jena

别来无恙 提交于 2019-12-23 01:11:36
问题 Recently, I'm trying to approach semantic web using Jena to create RDF and make query. Now, I have successfully made a owl based RDF file in Jena. However, when I trying to use different ontologies (such as: cidoc-crm), I do not know how to import those ontologies to Jena. Does anyone know how to import them to Jena? Do I need to create a new ontology model? 回答1: Jena's OntModel interface provides a convenient way of working with ontologies (including RDFS ontologies). The following code