Search code examples
rdfowlontologyprotege

Is Ontology File created in Protege with RDF/XML Format a RDF file or the OWL file?


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

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 -->

Solution

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

    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.

    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.

    Examples

    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))
    )
    

    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 -->
    

    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.

    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.

    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 .
    

    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> .
    

    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>
    

    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>