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] ClassCastException when loading ontology

Timothy Redmond tredmond at stanford.edu
Sun Apr 8 06:42:14 PDT 2007


A common recommendation in these cases is to validate the ontology  
(http://phoebus.cs.man.ac.uk:9999/OWL/Validator).  A quick check   
shows that this is a relatively pathological ontology.  Unfortunately  
Protege has trouble with ontologies that have these constructs.

The main issue is that there are several objects in the ontology that  
are both owl:ObjectProperties and owl:Class's.  So the first report is

> http://counterterror.mindswap.org/2005/ 
> terrorism.owl#Organization_Founded used as Class and ObjectProperty

Here is the corresponding declaration in the ontology:

   <owl:Class rdf:about="#Organization_Founded">
     <rdf:type rdf:resource="&owl;ObjectProperty"/>
	...

I suspect that this is a mistake.  But if it isn't I think that the  
author should have a compelling reason for wanting to do this.  It  
makes the ontology owl full and also doesn't appear to make a lot of  
sense.  There are several instances of this problem.

There are also some other strange anomalies.  event_convicted_for  
looks like it is an ObjectProperty because its range is the  
intersection of TerrorAttacks, TerrorPlots and crimes (why is the  
class "crime" in lower case unlike the other classes in this  
ontology?). But event_convicted_for is declared as a DatatypeProperty.

The property  publicationdate is declared as an ObjectProperty even  
though there is a nearby range declaration that suggests that it is a  
DatatypeProperty:

   <owl:ObjectProperty rdf:about="#publicationdate"
                       rdfs:label="Date of Publication">
     <rdfs:domain rdf:resource="#Publications"/>
     <rdfs:subPropertyOf rdf:resource="#date"/>
   </owl:ObjectProperty>


Also there is no reason to redefine rdfs:label and rdfs:comment.

The validator also finds a couple of other problems.  But there is  
another problem for Protege that the validator does not turn up that  
just looks gratuitous.  The declaration

   <owl:ObjectProperty rdf:about=""
                       rdfs:label="Terrorism at en">
     <rdf:type rdf:resource="&owl;Ontology"/>
   </owl:ObjectProperty>

is defining something that is an instance of an owl:Ontology and an  
owl:ObjectProperty.  It is hard to see why this is useful and this  
will also break Protege.

-Timothy




On Apr 7, 2007, at 6:14 AM, Matthew Donaldson wrote:

> Hi All,
>
> I'm trying to load a Terrorism ontology in OWL format
> (http://www.mindswap.org/dav/ontologies/terrorism.owl) into Protege  
> 3.3 beta,
> and I'm getting several ClassCastExceptions.  The first relates to
> DefaultOWLNamedClass.  I'm not sure what the best way is to narrow  
> down the
> problem from here.  Here's part of the stack trace:
>
> SEVERE: Error at loading file
> file:/var/disk2/home/matthew/projects/Ontology/terrorism.owl --
> java.lang.ClassCastException:
> edu.stanford.smi.protegex.owl.model.impl.DefaultOWLNamedClass
>          at
> edu.stanford.smi.protegex.owl.model.triplestore.impl.RDFPropertyPostPr 
> ocessor.<init>(Unknown
>
> Source)
>          at
> edu.stanford.smi.protegex.owl.model.triplestore.impl.TripleChangePostP 
> rocessor.postProcess(Unknown
>
> Source)
>          at
> edu.stanford.smi.protegex.owl.model.triplestore.impl.AbstractTripleSto 
> reModel.endTripleStoreChanges(Unknown
>
> Source)
>          at
> edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples 
> (Unknown
> Source)
>          at
> edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run 
> (Unknown Source)
>          at
> edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run 
> (Unknown Source)
>          at
> edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run 
> (Unknown Source)
>          at edu.stanford.smi.protegex.owl.jena.JenaOWLModel.load 
> (Unknown Source)
>          at edu.stanford.smi.protegex.owl.jena.JenaOWLModel.load 
> (Unknown Source)
>          at
> edu.stanford.smi.protegex.owl.jena.JenaKnowledgeBaseFactory.loadKnowle 
> dgeBase(Unknown
>
> Source)
>          at edu.stanford.smi.protege.model.Project.loadDomainKB 
> (Unknown Source)
>          at
> edu.stanford.smi.protege.model.Project.createDomainKnowledgeBase 
> (Unknown Source)
>          at
> edu.stanford.smi.protegex.owl.jena.CreateOWLProjectFromFilePlugin.crea 
> teProject(Unknown
>
> Source)
>          at
> edu.stanford.smi.protege.util.ProjectChooser.useCreateProjectFromFileP 
> lugin(Unknown
>
> Source)
>          at
> edu.stanford.smi.protege.util.ProjectChooser.getProjectFromFile 
> (Unknown Source)
>          at edu.stanford.smi.protege.util.ProjectChooser.getProject 
> (Unknown
> Source)
>          at
> edu.stanford.smi.protege.ui.ProjectManager.getRequestedProject 
> (Unknown Source)
>          at
> edu.stanford.smi.protege.ui.ProjectManager.openProjectRequest 
> (Unknown Source)
>
>
>
> Thanks
>
>                    -Matthew
>
> -- 
> +--------------------------------------------------------------------- 
> -----+
> | Matthew Donaldson             http:// 
> www.datadeliverance.com             |
> | Data Deliverance Pty. Ltd.    Email:  
> matthew at datadeliverance.com         |
> | 30 Musgrave Ave.              Phone: +61 8 8265 7976             
> _        |
> | Banksia Park                  Fax:   +61 8 8265 0032     John  /  
> \/      |
> | South Australia 5091                                     3:16  \_/ 
> \      |
> +--------------------------------------------------------------------- 
> -----+
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/ 
> faq.html#01a.03




More information about the protege-owl mailing list