owl

How to add qualified cardinality in JENA

与世无争的帅哥 提交于 2019-11-30 15:49:07
问题 How can I add qualified cardinality restriction in Jena? I can not use createCardinalityQRestriction because the OntModelSpec is for the first version of OWL, not OWL2. In ModelFactory's createOntologyModel, is there a way to create an OWL2 ontology? I need a class expression like JeVysledkom exactly 1 Kolik_Fazovy I've tried using this code: OntModel ontModel = ModelFactory.createOntologyModel(); OntClass ret = ontModel.createCardinalityQRestriction(null, ontProperty, cardinality, ontClass2

How to add qualified cardinality in JENA

余生颓废 提交于 2019-11-30 15:30:23
How can I add qualified cardinality restriction in Jena? I can not use createCardinalityQRestriction because the OntModelSpec is for the first version of OWL, not OWL2. In ModelFactory's createOntologyModel, is there a way to create an OWL2 ontology? I need a class expression like JeVysledkom exactly 1 Kolik_Fazovy I've tried using this code: OntModel ontModel = ModelFactory.createOntologyModel(); OntClass ret = ontModel.createCardinalityQRestriction(null, ontProperty, cardinality, ontClass2 ); ontClass.addSuperClass(ret); but I get this exception: com.hp.hpl.jena.ontology.ProfileException:

get OWL restrictions on classes using Jena

淺唱寂寞╮ 提交于 2019-11-30 14:16:52
Using the pizza ontology , I want to be able to look up all the toppings for American pizza. If I open the ontology in Protégé, I can see that American pizza has the following restrictions: hasTopping some MozerellaTopping hasTopping some TomatoTopping How can I get the same information programatically through Jena? Here's my solution. I've just printed out the strings you ask for, but hopefully you can see from this how to use the Jena OntAPI to traverse an ontology graph and pick out the things you're interested in. package examples; import java.util.Iterator; import com.hp.hpl.jena.ontology

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

大憨熊 提交于 2019-11-30 10:46:48
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? 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 = ResourceFactory.createResource(yourNamespace + "class1"); Property hasName = ResourceFactory.createProperty

Check if an underlying representation is OWL or RDFS

蓝咒 提交于 2019-11-30 09:31:03
问题 Imagine you are querying a data source via an SPARQL endpoint and you want to know if the underlying representation of this data source is OWL or RDF/XML. Is there anyway that you would be able to do that via a SPARQL query? My personal line of thought was to write a query that uses one of the OWL properties and see if that returns any result, however the disadvantage of using such approach is that if you use an OWL property that doesn't appear in the data source even if the underlying

How to extend ontology with other standard ontologies in Protégé?

落爺英雄遲暮 提交于 2019-11-30 04:56:29
问题 I am building an ontology using Protégé, but wan to extend it with other standard ontologies such as frbr, prov, and org. Is there a standard way to integrate our ontology with these standard ontologies or can we merge these ontologies with each other? I want to do these tasks using Protégé. 回答1: Unless I'm missing something about your question (which didn't really provide enough information to diagnose the problem that you're actually having), this is what owl:imports is for. You can import

how can I recognize object properties vs datatype properties?

旧巷老猫 提交于 2019-11-30 00:52:38
My ontology is book classification library. I have problems in this. I want to build a book classification ontology by protégé 4.1, 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. then I'm confused in object properties and datatype properties. if hasEdition is in properties in my ontology then i say that every book in class book have relation with edition class. so i use object properties but individual in this class

Sparql query for children, grandchildren, .. of a class

你。 提交于 2019-11-29 22:52:35
问题 I have an owl file I built in Protege. What is the sparql query which will select all the subclasses of a class and all the subclasses of those subclasses, so on and so on (Breadth First Search Sort of Manner)? 回答1: This might be answered by Sparql query Subclass or EquivalentTo, but that question and its answer contain a lot more information that what you're asking for here. You can't really enforce the search strategy (depth first vs. depth first), but you can (sort of) order subclasses by

基于本体的语义信息模型的验证方法

情到浓时终转凉″ 提交于 2019-11-29 22:20:13
一、先简单说说整个的一个需求吧 广义的配电管理系统(DMS)涵盖配电网生产、运行和服务全过程,是整个电力企业信息集成系统的一个有机组成部分。DMS 包含着大量应用系统, 由于现在配网一体化和智能化发展的要求,需要这些应用系统之间能够相互的进行数据交换(实现系统间的 互操作 如下图 ),但 这些大量的系统由于开发时间和功能的不一致,造成了这些系统和相应的数据库采用了不同的接口标准和模型,相对独立,不可避免的造成信息重叠和“信息孤岛”,无法实现全局范围内的信息交互和信息共享。 目前,整个电网对此的解决方案是构建基于 SOA 的电力企业服务总线(ESB),它是基于IEC61968提出来的。这种设计为电 力企业的信息集成提供了信息机交互的可能性,从体系架构的级别保证了整个系统的松耦合性和灵活性。IEC 61968 采用基于公共信息模型(Common Information Model,简称 CIM)的消息交换机制,对配电企业中的信息模型进行扩展,包括资产、用户、工作、文档等部分,制定资产管理系统、工作管理系统、施工管理、配电网管理、停电管理等业务功能的接口消息规范 XSD(XML Schema Definition),在消息总线上通过标准消息的传递,实现了各业务功能系统间的数据交互。但在此工程中,出现了如下问题: 1 公共信息模型(CIM)随着需求的不断提升,版本更新频繁

get OWL restrictions on classes using Jena

邮差的信 提交于 2019-11-29 20:43:06
问题 Using the pizza ontology, I want to be able to look up all the toppings for American pizza. If I open the ontology in Protégé, I can see that American pizza has the following restrictions: hasTopping some MozerellaTopping hasTopping some TomatoTopping How can I get the same information programatically through Jena? 回答1: Here's my solution. I've just printed out the strings you ask for, but hopefully you can see from this how to use the Jena OntAPI to traverse an ontology graph and pick out