Protege won't read the owl from Template Specifications List

Message
Author
hmottestad
Posts: 18
Joined: Mon May 06, 2013 6:54 am

Protege won't read the owl from Template Specifications List

#1 Post by hmottestad »

Hello

I was looking at the Template Specifications List (http://15926.org/15926_template_specs.php) with Lillian and it was fairly heavy reading. So I thought I would look at the OWL file instead with Protege since that often makes the data a bit easier to read.

Protege 4.3 gives a string out of range exception at a chartAt method. It is below the SAX parser, so I think the XML is valid. The first method above the actualy exception is a getOWLLiteral method, so there must be something wonky with a literal definition.

It opens in Protege 3.5, but on closer inspection there doesn't really seem to be anything there and after a bit of browsing it just crashes.

Anyone managed to open the owl file in protege?


-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Error 1 Logged at Tue Jul 30 16:29:49 CEST 2013
StringIndexOutOfBoundsException: String index out of range: 0
java.lang.String.charAt(String.java:686)
uk.ac.manchester.cs.owl.owlapi.InternalsNoCache.getOWLLiteral(InternalsNoCache.java:211)
uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryInternalsImpl.getOWLLiteral(OWLDataFactoryInternalsImpl.java:149)
uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryImpl.getOWLLiteral(OWLDataFactoryImpl.java:1635)
org.coode.owlapi.rdfxml.parser.OWLRDFConsumer.getOWLLiteral(OWLRDFConsumer.java:1805)
org.coode.owlapi.rdfxml.parser.OWLRDFConsumer.handleStreaming(OWLRDFConsumer.java:1781)
org.coode.owlapi.rdfxml.parser.OWLRDFConsumer.statementWithLiteralValue(OWLRDFConsumer.java:1702)
org.semanticweb.owlapi.rdf.syntax.RDFParser.statementWithLiteralValue(RDFParser.java:597)
org.semanticweb.owlapi.rdf.syntax.RDFParser$ResourceOrLiteralPropertyElement.endElement(RDFParser.java:998)
org.semanticweb.owlapi.rdf.syntax.RDFParser.endElement(RDFParser.java:293)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
com.sun.org.apache.xerces.internal.impl.dtd.XMLNSDTDValidator.endNamespaceScope(XMLNSDTDValidator.java:263)
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:2028)
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:901)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2939)
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
org.semanticweb.owlapi.rdf.syntax.RDFParser.parse(RDFParser.java:170)
org.coode.owlapi.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.java:119)
uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:206)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:906)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:843)
org.protege.editor.owl.model.OWLModelManagerImpl.loadOntologyFromPhysicalURI(OWLModelManagerImpl.java:313)
org.protege.editor.owl.OWLEditorKit.handleLoadFrom(OWLEditorKit.java:190)
org.protege.editor.owl.OWLEditorKit.handleLoadRequest(OWLEditorKit.java:184)
org.protege.editor.core.ProtegeManager.openAndSetupEditorKit(ProtegeManager.java:173)
org.protege.editor.core.ui.action.OpenAction.openInNewWorkspace(OpenAction.java:57)
org.protege.editor.core.ui.util.UIUtil.openRequest(UIUtil.java:216)
org.protege.editor.core.ui.action.OpenAction.actionPerformed(OpenAction.java:33)
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
javax.swing.AbstractButton.doClick(AbstractButton.java:389)
com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:95)
java.awt.MenuItem.processActionEvent(MenuItem.java:650)
java.awt.MenuItem.processEvent(MenuItem.java:609)
java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:343)
java.awt.MenuComponent.dispatchEvent(MenuComponent.java:331)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:720)
java.awt.EventQueue.access$400(EventQueue.java:82)
java.awt.EventQueue$2.run(EventQueue.java:676)
java.awt.EventQueue$2.run(EventQueue.java:674)
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
java.awt.EventQueue$3.run(EventQueue.java:690)
java.awt.EventQueue$3.run(EventQueue.java:688)
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
---------------------------------------------------------------------------------------------------
Håvard Mikkelsen Ottestad @ PCA

vvagr
Posts: 282
Joined: Mon Feb 27, 2012 11:01 pm
Location: Moscow, Russia
Contact:

Re: Protege won't read the owl from Template Specifications

#2 Post by vvagr »

Current version of my Editor can not rebuild signatures also. But the newest alpha version returns some useful diagnostics! Looks like all problems are from the last empty template.

I've just deleted everything from line 36883 to the end of the file (except the last line of course).

And now my Editor opens the file and you can see all 245 signatures.

Don't believe Protege will be much help in reading template definitions :-)

hmottestad
Posts: 18
Joined: Mon May 06, 2013 6:54 am

Re: Protege won't read the owl from Template Specifications

#3 Post by hmottestad »

That worked.

I am used to reading templates as manchester syntax in Protege, so it's not too bad.

There are still some errors though. They are generated by OWL API.

Image
Håvard Mikkelsen Ottestad @ PCA

vvagr
Posts: 282
Joined: Mon Feb 27, 2012 11:01 pm
Location: Moscow, Russia
Contact:

Re: Protege won't read the owl from Template Specifications

#4 Post by vvagr »

Something very subtle. Hope Onno and Hans will see this thread and investigate the mistake.

Looks like roles are referenced in all three Deprecated... template definitions as
<owl:onProperty rdf:resource="owl:annotatedProperty"/>
<owl:onProperty rdf:resource="owl:deprecated"/>
Some roles (like deprecated) are absent from ObjectProperties declarations. And of course there are none in owl: namespace.

My Editor rebuilds signatures (see screenshot), but these roles are identified with quite senseless URIs like:
That's exactly what I don't like about Protege. For business purposes templates are better visualized in my Editor, at the same time passing basic RDF and complex P8 verification. But for subtle RDF/XML problems I've to do investigation in text editor. No use for Protege in between for me.
Screenshot_1.png
Screenshot_1.png (71.05 KiB) Viewed 17781 times

HansTeijgeler
Posts: 283
Joined: Sun Jan 22, 2012 10:02 pm

Re: Protege won't read the owl from Template Specifications

#5 Post by HansTeijgeler »

Gentlemen,

I know exactly which templates give such problems. Sometimes, when you design templates, you come to the conclusion that something has to be done to the overall architecture. Even in Part 7 that was already the case, see subclause 7.2 Reference data items needed.

In the publication "Architecture" (http://www.15926.org/publications/gener ... /index.htm) you see a new ontology called edm - Extented Data Model. Things like ClassOfClassOfIdentification_rdfsLabel will find a place there. It means that ClassOfClassOfIdentification_rdfsLabel is declared there as a subtype of dm:ClassOfClassOfIdentification that is narrowed down to rdfs:label.

The reason for that is that the template definitions shall remain at a meta model level, and parts of those definitions shall therefore not reside at the level of template instances (i.e. the RDL). I am working on a publication to explain that in detail. "Soon in this theater". :-)

Regards,
Hans

hmottestad
Posts: 18
Joined: Mon May 06, 2013 6:54 am

Re: Protege won't read the owl from Template Specifications

#6 Post by hmottestad »

huh?
Håvard Mikkelsen Ottestad @ PCA

HansTeijgeler
Posts: 283
Joined: Sun Jan 22, 2012 10:02 pm

Re: Protege won't read the owl from Template Specifications

#7 Post by HansTeijgeler »

Dear Håvard,
There are some more people deeply involved in ISO 15926. I am since 1992.
Regards,
Hans

hmottestad
Posts: 18
Joined: Mon May 06, 2013 6:54 am

Re: Protege won't read the owl from Template Specifications

#8 Post by hmottestad »

That is not a very nice way to put it.
Håvard Mikkelsen Ottestad @ PCA

HansTeijgeler
Posts: 283
Joined: Sun Jan 22, 2012 10:02 pm

Re: Protege won't read the owl from Template Specifications

#9 Post by HansTeijgeler »

Dear Håvard,
I must have misunderstood your "huh?"
Regards,
Hans

hmottestad
Posts: 18
Joined: Mon May 06, 2013 6:54 am

Re: Protege won't read the owl from Template Specifications

#10 Post by hmottestad »

My "huh" was a: I don't understand what you are talking about.

Anyhow.

I found the problem with the OWL file. Edit: Seems to just be one problem.

The classes that Protege are showing as "error xx" have the wrong namespace in the OWL file.

Example of this is: <owl:onProperty rdf:resource="owl:annotatedSource"/>
Which should be: <owl:onProperty rdf:resource="&owl;annotatedSource"/>

There is also : <p7tm:hasRole rdf:resource="#owl:annotatedSource"/>

There must still be some errors because I still can't get it to work correctly in Protege.
Håvard Mikkelsen Ottestad @ PCA

Post Reply