OWL文件和protege的关系(加深理解版)
2017-12-01 17:19
253 查看
图1 代码分析
图2 ontology
RDF文件的代码如下:
<!--the namespace of Ontology-->
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:plants="http://www.linkeddatatools.com/plants#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<!--the header of Ontology-->
<owl:Ontology rdf:about="http://www.linkeddatatools.com/plants">
<dc:title>The LinkedDataTools.com Example Plant Ontology</dc:title>
</owl:Ontology>
<!-- OWL Class Definition -->
<owl:Class rdf:about="http://www.linkeddatatools.com/plants#planttype">
<rdfs:label>planttype</rdfs:label>
<rdfs:comment>The class of all plant types.</rdfs:comment>
</owl:Class>
<!-- OWL Subclass Definition - flowers -->
<owl:Class rdf:about="http://www.linkeddatatools.com/plants#flowers">
<rdfs:subClassOf rdf:resource="http://www.linkeddatatools.com/plants#planttype"/>
<rdfs:label>flowers</rdfs:label>
<rdfs:comment>Flowering plants, also known as angiosperms.</rdfs:comment>
</owl:Class>
<!-- OWL Subclass Definition - Shrub -->
<owl:Class rdf:about="http://www.linkeddatatools.com/plants#shrubs">
<rdfs:subClassOf rdf:resource="http://www.linkeddatatools.com/plants#planttype"/>
<rdfs:label>shrubs</rdfs:label>
<rdfs:comment>Shrubs, a type of plant which branches from the base.</rdfs:comment>
</owl:Class>
<!-- Define the family DatatypeProperty -->
<owl:DatatypeProperty rdf:about="http://www.linkeddatatools.com/plants#family"/>
<!-- Define the similarlyPopularTo ObjectProperty -->
<owl:ObjectProperty rdf:about="http://www.linkeddatatools.com/plants#similarlyPopularTo"/>
<!-- Define the instance of flowers_magnolia -->
<rdf:Description rdf:about="http://www.linkeddatatools.com/plants#magnolia">
<rdf:type rdf:resource="http://www.linkeddatatools.com/plants#flowers"/>
<plants:similarlyPopularTo rdf:resource="http://www.linkeddatatools.com/plants#orchid"/>
<plants:family>Magnoliaceae</plants:family>
</rdf:Description>
<!-- Define the instance of flowers_orchid -->
<rdf:Description rdf:about="http://www.linkeddatatools.com/plants#orchid">
<rdf:type rdf:resource="http://www.linkeddatatools.com/plants#flowers"/>
<plants:similarlyPopularTo rdf:resource="http://www.linkeddatatools.com/plants#magnolia"/>
<plants:family>Orchidaceae</plants:family>
</rdf:Description>
</rdf:RDF>
PS:可直接将该代码放于记事本中,将后缀名直接改为rdf格式,然后可以用protege5.0.0打开就可以看到图2
背景:由于现在在手工创建本体的时候,大多采用protege等软件,该软件屏蔽了代码层面的细节(类、属性、实例等的定义),我们可以直接通过概念层进行本体的搭建
所以导致我们队代码无法理解;其次当我们打开一个rdf或者OWL文件的时候,密密麻麻的代码让我们心乱如麻,根本分不清楚每一段代码都表达什么意思,完全淹没于字符当中。
故 大家可以按照图1中红色框分出来的部分(每一个框算一个部分),逐个框的往记事本中粘贴,粘完一部分马上保存,然后用protege打开看效果,这样的话我们就能够搞明白每段代码在protege当中对应的效果是什么,从而加深我们对OWL文件和protege软件的理解。
相关文章推荐
- 解决Protege使用中的一个问题:从已有owl文件建立项目失败(w3china)
- 关于域名解析即DNS的理解,以及hosts文件跟域名解析的关系。tomcat发布的工程,怎么设置一个虚拟域名?
- 理解TimesTen中两个CheckPoint文件与Trans Log的关系及其原理
- android 几个文件 和 mvc 的对应关系理解
- 火锅妙用--深入理解路径级文件关系 推荐
- 理解postgresql数据表与其对应的数据文件关系
- VS2005 自述文件 ,有空看看 ,也许能加深你对vs2005的理解
- 理解redo(8)redo和undo的一点关系及删除联机日志文件组的注意事项
- tlb,tlh,tli文件的关系
- Configure,Makefile.am, Makefile.in, Makefile文件之间关系
- springboot中配置文件application.properties的理解
- 深入理解Java Class文件格式(九)
- C++进阶 降低文件间的编译依存关系(接口与实现解耦合)
- 理解“UML类间的五种关系,也是对代码实现形式的一种约束”
- 新手理解HTML、CSS、javascript之间的关系
- C++文件依存关系
- sysctl.conf和/proc文件系统的关系
- Android 异步消息处理机制 让你深入理解 Looper、Handler、Message三者关系
- 记录settings.xml的配置,理解mirror、repository、profile的关系
- 【理解】一个利用递归打印对象路径下所有文件的小程序