Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] Problems with "rdf:type" constructs

Roberto Alves Gueleri r.a.gueleri at gmail.com
Wed Aug 8 18:24:17 PDT 2007


Hi!!!

I have experienced some troubles in attempting to work with owl ontologies
containing metaclasses, dealing with "rdf:type" constructs.

An example of this problem:

I've the following ontology, which contains a metaclass called "MetaClassA",
three classes ("ClassA", "ClassB" and "ClassC"), and an instance of "ClassA"
called "IndividualA". Note that "MetaClassA" is an occurrence of
"owl:Class", so it is an owl class, but it plays the role of a metaclass by
asserting that the other three classes ("ClassA", "ClassB" and "ClassC") are
its occurrences, by means of "rdf:type" constructs.



<?xml version="1.0"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns="http://www.owl-ontologies.com/Ontology1186578166.owl#"
  xml:base="http://www.owl-ontologies.com/Ontology1186578166.owl">
  <owl:Ontology rdf:about=""/>

  <owl:Class rdf:ID="MetaClassA"/>

  <owl:Class rdf:ID="ClassA">
    <rdf:type rdf:resource="#MetaClassA"/>
  </owl:Class>
  <owl:Class rdf:ID="ClassB">
    <rdf:type rdf:resource="#MetaClassA"/>
  </owl:Class>
  <owl:Class rdf:ID="ClassC">
    <rdf:type rdf:resource="#MetaClassA"/>
  </owl:Class>

  <ClassA rdf:ID="IndividualA"/>

</rdf:RDF>



If I try to open this ontology in Protégé, all seems to be ok. The classes
and instances appears correctly. But if I simply insert a new class,
"ClassD", as being an occurrence of "owl:Class", of course the owl file is
changed to append the new class, but the original "rdf:type" constructs are
changed too. Below I show the new ontology created by Protégé:



<?xml version="1.0"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns="http://www.owl-ontologies.com/Ontology1186578166.owl#"
  xml:base="http://www.owl-ontologies.com/Ontology1186578166.owl">
  <owl:Ontology rdf:about=""/>

  <owl:Class rdf:ID="MetaClassA"/>

  <MetaClassA rdf:ID="ClassA">
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
  </MetaClassA>
  <MetaClassA rdf:ID="ClassB">
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
  </MetaClassA>
  <MetaClassA rdf:ID="ClassC">
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
  </MetaClassA>
  <owl:Class rdf:ID="ClassD"/>

  <ClassA rdf:ID="IndividualA"/>

</rdf:RDF>

<!-- Created with Protege (with OWL Plugin 3.2.1, Build 365)
http://protege.stanford.edu -->



Note that constructions of the form:

  <owl:Class rdf:ID="ClassA">
    <rdf:type rdf:resource="#MetaClassA"/>
  </owl:Class>

were automatically changed by Protégé to the form:

  <MetaClassA rdf:ID="ClassA">
    <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
  </MetaClassA>

Now if I try to open the new ontology, some errors will be reported by
Protégé and the ontology won't open. Below the errors reported are showed:



There were errors at performing operation.

1. Exception class
edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParserException.
Message: The resource IndividualA has the rdf:type ClassA which is not a
class but a edu.stanford.smi.protegex.owl.model.impl.DefaultOWLIndividual

2. Errors at loading OWL file from file:/C:/betao/metaclasses.owl

Please consider running the file through an RDF or OWL validation service
such as:
  - RDF Validator: http://www.w3.org/RDF/Validator
  - OWL Validator: http://phoebus.cs.man.ac.uk:9999/OWL/Validator

See console and log for more details.



As can be viewed at the end of the last ontology, I have used Protégé 3.2.1.
I tried to use other versions of Protégé (including Protégé 4.0 alpha) and
problems persist on the use of "rdf:type" constructs.

I think it's great if Protégé could support those "rdf:type" constructs, on
the freedom context of OWL-FULL. In my work, I'm facing a problem where a
good solution appear by using metaclasses. A classic example: I'm interested
in define a concept "Homo sapiens", so I create a class "HomoSapiens", whose
instances could be any person in the world; but this class must be an
instance of a higher order class, "Species", because Homo sapiens is a
species; therefore the class "Species" will be a metaclass. Seeing classes
or concepts as sets, cases like these appear when we have to declare sets,
sets of sets ("meta-sets"), sets of "meta-sets" ("meta-meta-sets"), and so
on...

Thanks!!!...

Roberto Alves Gueleri

r.a.gueleri at gmail.com

(Student of Computer Science at the State University of São Paulo (UNESP) -
Brazil)
(Working on a research project dealing with the uses of ontologies to
describe species of foraminifera)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20070808/cdc1920b/attachment.html>


More information about the protege-owl mailing list