ontology

Extract all parents of a given node

◇◆丶佛笑我妖孽 提交于 2019-12-20 06:28:20
问题 I'm trying to extract all parents of a each given GO Id (a node) using EBI-RDF sparql endpoint, I was based on this two similar questions to formulate the query, here're two examples illustrating the problem: Example 1 (Link to the structure): biological_process (GO:0008150) |__ metabolic process (GO:0008152) |__ methylation (GO:0032259) In this example, using the following query: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SPARQL full aggregation on a group aggregation

 ̄綄美尐妖づ 提交于 2019-12-20 06:25:08
问题 I have an Ontology where users can use one of five predicates to express how much they like an item. The Ontology contains specific predicates that have a property called hasSimilarityValue. I am trying to do the following: Having a user let's say rs:ania Extract all the items that this user has rated before. (this is easy because the Ontology already contains triple from the user to the items) Extract similary items to the items that have been extracted in step 2 and calculate their

how to do reasoning in Jena via Sparql Query

大城市里の小女人 提交于 2019-12-20 05:40:24
问题 I'm using Jena and Sparql to query the ontology file. I have class Tag with two subclasses : C++ and Java. class Subject with several subclasses, which stand for particular University subjects: "C++ programming","System programming", "Java programming" etc. ObjectProperty "hasTags" domain:Subject range:Tag. Each class subject has some tag like "Java", "C++" When executing query SELECT ?subject WHERE { ?subject owl:equivalentClass ?restriction . ?restriction owl:onProperty ont:hasTags .

How could I store multiple ontologies in TDB

[亡魂溺海] 提交于 2019-12-20 04:04:50
问题 I am working on a project which need to save multiple ontologies in one TDB. I tried to do it in my own way, but it didn't work. Help me please..If you know how to use TDB , could you post the code applied to my code? String directory = "./111"; Dataset dataset = TDBFactory.createDataset(directory); Model tdb = dataset.getNamedModel("test1"); String source = "file:///e:/Course.rdf"; System.out.println(tdb.toString()); tdb.commit(); tdb.close(); String source2 = "file:///e:/lyx/resouces

What is the difference between dublin core terms and dublin core elements vocabularies

只谈情不闲聊 提交于 2019-12-19 09:03:16
问题 There's 2 Dublin Core vocabularies DC terms and DC elements. They define almost the same classes and properties. So what is the key differences between them, and when to use each one. 回答1: Element Set: Namespace: http://purl.org/dc/elements/1.1/ Predefined prefix: dc11 It defines 15 terms . These terms are also published as the standards ISO 15836, ANSI/NISO Z39.85, and RFC 5013. Terms: Namespace: http://purl.org/dc/terms/ Predefined prefixes: dc , dcterms It defines all terms , including the

how can i add some triple to my Ontology by Jena?

笑着哭i 提交于 2019-12-18 13:39:24
问题 I have instance1 of class1 and instance2 of class2 . Also I have defined HasName(object property) in my ontology. Now, how can I add the triple ( instance1 HasName instance2 ) to my ontology by jena? 回答1: Here's a way without dealing with intermediate Statements . // RDF Nodes -- you can make these immutable in your own vocabulary if you want -- see Jena's RDFS, RDF, OWL, etc vocabularies Resource class1 = ResourceFactory.createResource(yourNamespace + "class1"); Resource class2 =

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

obtain the matrix in protege

馋奶兔 提交于 2019-12-17 20:26:19
问题 My work is about library book of recommendation systems . that as input I need book Classification ontology . in my ontology classify library books. this classification has 14 categories, beside the sibling classes Author, book, Isbn. Individuals in book class are book’s subject(about 600 subjects) , and individuals in author class are name’s author and also isbn class. I design this ontology with protege 4.1. also I collected and Have got in part of belong book to categories manually. That a

Is there a way to convert the data format of an RDF vocabulary to SKOS

假装没事ソ 提交于 2019-12-17 19:29:58
问题 The rdfs file I'm want to use is cv.rdfs, I want to convert it to SKOS, so I can use it in Maui Indexer I am a complete noob in the subject. Please help. 回答1: SKOS is for organizing concepts, and doesn't deal with properties, it seems, so there's a lot of information in the CV RDFS that doesn't really have a SKOS version. However, it's easy enough to define a mapping for the RDFS classes and generate some data using SPARQL. Here's a possible mapping: rdfs:Class maps to skos:Concept. rdfs

owl protege how can I describe a class that has just some properties?

烂漫一生 提交于 2019-12-17 14:54:05
问题 Is it possible in protege (Thus in owl) to describe a class depending if it has some properties? For example I have a class Home , and I want to say that every instance that has property1 and property2 and property2 is considered an instance of that class? 回答1: Suppose you have a class Duck and you want to say that if something walks like a Duck, and talks like a Duck, then it is a Duck. You can do that with a class axiom: ((walksLike some Duck) and (talksLike some Duck)) SubClassOf Duck A