Question

I need to convert my RDF graph document into OWL (1 or 2) recognized by Protege 3.x. There is a W3C Recommendation for mapping OWL 2 Web Ontology Language Mapping to RDF Graphs which says that to declare Object Properties from RDF graphs one should add the rdf:type owl:ObjectProperty element. I have found problems for expressing OWL object properties with RDF graph formalisms in the following code:

<rdf:Property rdf:about="&uni;isTaughtBy">
        <rdf:type rdf:resource="&owl;ObjectProperty"/>
        <rdfs:domain rdf:resource="&uni;Course"/>
        <rdfs:range rdf:resource="&uni;Proffessor"/>
</rdf:Property> 

With the following specified namespaces:

xmlns:uni="http://www.mydomain.org/uni-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"

Unfortunately, the upper mentioned code is not recognized and thus shown in the Protege 3.x IDE.

No correct solution

OTHER TIPS

The following code is readable by Protege 4 (recommended version). Copy paste the block and save it in a new file, you should then be able to read it with Protege:

<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [
  <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
  <!ENTITY uni-ns "http://www.mydomain.org/uni-ns#" >
  <!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.mydomain.org/uni-ns#"
 xml:base="http://www.mydomain.org/uni-ns"
 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
 xmlns:uni-ns="http://www.mydomain.org/uni-ns#"
 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.mydomain.org/uni-ns#"/>
<owl:ObjectProperty rdf:about="&uni-ns;isTaughtBy">
    <rdfs:domain rdf:resource="&uni-ns;Course"/>
    <rdfs:range rdf:resource="&uni-ns;Professor"/>
</owl:ObjectProperty>
<owl:Class rdf:about="&uni-ns;Course"/>
<owl:Class rdf:about="&uni-ns;Professor">
    <rdfs:subClassOf rdf:resource="&owl;Thing"/>
</owl:Class>
</rdf:RDF>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top