使用RDF/XML格式在Protege中创建的本体文件是RDF文件还是OWL文件? [英] Is Ontology File created in Protege with RDF/XML Format a RDF file or the OWL file?

查看:124
本文介绍了使用RDF/XML格式在Protege中创建的本体文件是RDF文件还是OWL文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Protege中创建了本体文件,并将其保存为RDF/XML格式. 它还包含OWL标签.

I have created the ontology file in the Protege and save it in the RDF/XML format. It also contains the OWL tag.

那么,由Protege创建并保存为RDF/XML格式的本体文件实际上是RDF文件还是OWL文件的RDF形式,还是包含RDF或其他形式的OWL格式?

So, the ontology file created by Protege and saved as RDF/XML format are actually the RDF files or the RDF form of the OWL files or the OWL format containing the RDF also or something else ?

<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [
    <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>

<rdf:RDF xmlns="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#"
     xml:base="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <owl:Ontology rdf:about="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13"/> 
    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // Classes
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->
    <!-- http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#Student -->
    **<owl:Class rdf:about="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#Student"/>**  
  <!-- http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#University -->

    **<owl:Class rdf:about="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#University"/>
</rdf:RDF>**
<!-- Generated by the OWL API (version 3.4.2) http://owlapi.sourceforge.net -->

推荐答案

这是OWL本体的RDF映射的RDF/XML序列化.

It's the RDF/XML serialization of the RDF mapping of your OWL ontology.

OWL本体是一组公理.它可以通过多种方式直接序列化:Manchester语法,OWL/XML标准和Functional Syntax是所有选项. OWL本体也可以映射到一组RDF三元组,如 OWL 2 Web本体语言 映射到RDF图(第二版).现在,RDF也可以以多种不同的格式进行序列化,例如,RDF/XML,Turtle,N3和N-Triples.

An OWL ontology is a set of axioms. It can be serialized directly in a number ways: the Manchester syntax, the OWL/XML standard, and Functional Syntax are all options. An OWL ontology can also be mapped to a set of RDF triples, as described in OWL 2 Web Ontology Language Mapping to RDF Graphs (Second Edition). Now, RDF can be serialized in a bunch of different formats, too, e.g., RDF/XML, Turtle, N3, and N-Triples.

因此,您已经获得了OWL本体的RDF映射的RDF/XML序列化.因此它 RDF文件,因为它是RDF图的序列化.将它称为OWL文件也很有意义,因为它是OWL本体.实际上,您在线上找到的许多OWL文件都是OWL本体的RDF映射的RDF/XML序列化.

So, you've got the RDF/XML serialization of the RDF mapping of an OWL ontology. So it is an RDF file, because it's the serialization of an RDF graph. It also makes sense to call it an OWL file, because it's an OWL ontology. In fact, many of the OWL files you'll find online are RDF/XML serializations of RDF mappings of OWL ontologies.

您的OWL本体可以通过多种方式编写.例如,在功能语法中:

Your OWL ontology can be written in a number of ways. For instance, in the functional syntax:

Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)
Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
Prefix(:=<http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#>)
Prefix(xml:=<http://www.w3.org/XML/1998/namespace>)
Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)
Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)

Ontology(<http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13>

Declaration(Class(:Student))
Declaration(Class(:University))
)

在OWL/XML序列化中:

In the OWL/XML serialization:

<?xml version="1.0"?>
<!DOCTYPE Ontology [
    <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
    <!ENTITY xml "http://www.w3.org/XML/1998/namespace" >
    <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
    <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>
<Ontology xmlns="http://www.w3.org/2002/07/owl#"
     xml:base="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:xml="http://www.w3.org/XML/1998/namespace"
     ontologyIRI="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13">
    <Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/>
    <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
    <Prefix name="" IRI="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#"/>
    <Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
    <Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/>
    <Declaration>
        <Class IRI="#Student"/>
    </Declaration>
    <Declaration>
        <Class IRI="#University"/>
    </Declaration>
</Ontology>
<!-- Generated by the OWL API (version 3.2.5.1912) http://owlapi.sourceforge.net -->

这些是相同 OWL本体的不同序列化.由于它们是OWL本体的序列化,因此将它们称为OWL文件是很有意义的.

These are different serializations of the same OWL ontology. Because they're serializations of an OWL ontology, it makes sense to call them OWL files.

序列化OWL本体的另一种方法是RDF图. RDF图不过是抽象的东西;这只是一组三元组. OWL 2 Web本体语言到RDF图的映射(第二版) )描述了OWL本体的RDF映射.因此,从OWL本体中,您可以生成一组RDF三元组,即RDF图.但是,RDF图也可以用多种不同的格式编写.这是您的OWL本体在几种不同的RDF序列化中的RDF图.以下所有都是相同 RDF图.由于所有这些都是RDF序列化,因此调用它们的RDF文件是很有意义的.由于它们是OWL本体的RDF编码,因此将它们称为OWL文件也很有意义.

One more way to serialize an OWL ontology is an RDF Graph. An RDF graph is an abstract thing though; it's just a set of triples. OWL 2 Web Ontology Language Mapping to RDF Graphs (Second Edition) describes the RDF mapping of OWL ontologies. So from the OWL ontology, you can generate a set of RDF triples, i.e., an RDF graph. An RDF graph can be written in a number of different formats, too, though. Here's the RDF Graph for your OWL ontology in a few different RDF serializations. All of the following are the same RDF graph. SInce all of these are RDF serializations, it makes sense to call of them RDF files. Since they're RDF encodings of an OWL ontology, it also makes sense to call them OWL files.

在Turtle RDF序列化中:

In the Turtle RDF serialization:

@prefix :      <http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#> .
@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .

<http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13>
        a       owl:Ontology .

:University  a  owl:Class .

:Student  a     owl:Class .

在N-Triples序列化中(每行一个三元组):

In the N-Triples serialization (one triple per line):

<http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> .
<http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#University> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
<http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#Student> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .

在没有快捷方式"的RDF/XML中:

In RDF/XML with no "shortcuts":

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#" > 
  <rdf:Description rdf:about="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13">
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Ontology"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#University">
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#Student">
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
  </rdf:Description>
</rdf:RDF>

在RDF/XML中,使用一些快捷方式:

In RDF/XML using some of the shortcuts:

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
  <owl:Ontology rdf:about="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13"/>
  <owl:Class rdf:about="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#University"/>
  <owl:Class rdf:about="http://www.semanticweb.org/q49f318b/ontologies/2014/5/untitled-ontology-13#Student"/>
</rdf:RDF>

这篇关于使用RDF/XML格式在Protege中创建的本体文件是RDF文件还是OWL文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆