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    

[p4-feedback] Custom annotations are lost after save and reload

Holger Stenzhorn holger.stenzhorn at ifomis.uni-saarland.de
Fri Apr 17 00:25:28 PDT 2009


Hi,

Yes, you are right in that they are not totally "lost" but rather
interestingly "transformed"... :-)

Cheers,
Holger


Thomas Schneider schrieb:
> Hi Holger,
>
> hmm, the annotations aren't completely lost:
>
> * you've saved your ontology in RDF/XML. After reopening, the  
> annotation is gone, but it has been turned into a data property  
> assertion prefLabel(ABC, "123 at en") -- just check the "Individuals" and  
> "Data Properties" tabs.
>
> * if you save the same ontology in OWL/XML or in OWL Functional  
> Syntax, everything is fine after reloading.
>
> * if you save the same ontology in Manchester Syntax, then it can't be  
> reopened because the parser chokes on the "skos:prefLabel", see full  
> stack trace below.
>
> Matthew, Nick, any comments on this?
>
> Cheers
>
> Thomas
>
>   
>> Encountered skos:prefLabel at line 22 column 8. Expected one of:
>> 	owl:backwardCompatibleWith
>> 	owl:versionInfo
>> 	dc:coverage
>> 	dc:title
>> 	dc:publisher
>> 	dc:creator
>> 	dc:contributor
>> 	owl:priorVersion
>> 	dc:rights
>> 	dc:language
>> 	owl:incompatibleWith
>> 	dc:relation
>> 	rdfs:comment
>> 	dc:type
>> 	dc:subject
>> 	dc:source
>> 	owl:deprecated
>> 	rdfs:label
>> 	dc:date
>> 	dc:identifier
>> 	rdfs:seeAlso
>> 	dc:description
>> 	rdfs:isDefinedBy
>> 	dc:format
>>
>>
>>
>> Full Stack Trace
>> -----------------------------------------------------------------------------------------
>>
>> org.semanticweb.owl.expression.ParserException: Encountered  
>> skos:prefLabel at line 22 column 8. Expected one of:
>> 	owl:backwardCompatibleWith
>> 	owl:versionInfo
>> 	dc:coverage
>> 	dc:title
>> 	dc:publisher
>> 	dc:creator
>> 	dc:contributor
>> 	owl:priorVersion
>> 	dc:rights
>> 	dc:language
>> 	owl:incompatibleWith
>> 	dc:relation
>> 	rdfs:comment
>> 	dc:type
>> 	dc:subject
>> 	dc:source
>> 	owl:deprecated
>> 	rdfs:label
>> 	dc:date
>> 	dc:identifier
>> 	rdfs:seeAlso
>> 	dc:description
>> 	rdfs:isDefinedBy
>> 	dc:format
>>
>> 	at  
>> org 
>> .coode 
>> .manchesterowlsyntax 
>> .ManchesterOWLSyntaxEditorParser 
>> .throwException(ManchesterOWLSyntaxEditorParser.java:2067)
>> 	at  
>> org 
>> .coode 
>> .manchesterowlsyntax 
>> .ManchesterOWLSyntaxEditorParser 
>> .parseAnnotations(ManchesterOWLSyntaxEditorParser.java:1041)
>> 	at  
>> org 
>> .coode 
>> .manchesterowlsyntax 
>> .ManchesterOWLSyntaxEditorParser 
>> .parseAnnotations(ManchesterOWLSyntaxEditorParser.java:1083)
>> 	at  
>> org 
>> .coode 
>> .manchesterowlsyntax 
>> .ManchesterOWLSyntaxEditorParser 
>> .parseClassFrame(ManchesterOWLSyntaxEditorParser.java:1145)
>> 	at  
>> org 
>> .coode 
>> .manchesterowlsyntax 
>> .ManchesterOWLSyntaxEditorParser 
>> .parseClassFrame(ManchesterOWLSyntaxEditorParser.java:1091)
>> 	at  
>> org 
>> .coode 
>> .manchesterowlsyntax 
>> .ManchesterOWLSyntaxEditorParser 
>> .parseOntology(ManchesterOWLSyntaxEditorParser.java:1993)
>> 	at  
>> org 
>> .coode 
>> .manchesterowlsyntax 
>> .ManchesterOWLSyntaxOntologyParser 
>> .parse(ManchesterOWLSyntaxOntologyParser.java:71)
>> 	at  
>> uk 
>> .ac 
>> .manchester 
>> .cs 
>> .owl 
>> .ParsableOWLOntologyFactory 
>> .loadOWLOntology(ParsableOWLOntologyFactory.java:159)
>> 	at  
>> uk 
>> .ac 
>> .manchester 
>> .cs 
>> .owl.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java: 
>> 461)
>> 	at  
>> uk 
>> .ac 
>> .manchester 
>> .cs 
>> .owl.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java: 
>> 424)
>> 	at  
>> org 
>> .protege 
>> .editor 
>> .owl.model.OWLModelManagerImpl.loadOntology(OWLModelManagerImpl.java: 
>> 323)
>> 	at  
>> org 
>> .protege 
>> .editor 
>> .owl 
>> .model 
>> .OWLModelManagerImpl 
>> .loadOntologyFromPhysicalURI(OWLModelManagerImpl.java:385)
>> 	at  
>> org.protege.editor.owl.OWLEditorKit.handleLoadFrom(OWLEditorKit.java: 
>> 148)
>> 	at  
>> org 
>> .protege.editor.owl.OWLEditorKit.handleLoadRequest(OWLEditorKit.java: 
>> 143)
>> 	at  
>> org 
>> .protege 
>> .editor 
>> .core.ProtegeManager.openAndSetupEditorKit(ProtegeManager.java:146)
>> 	at  
>> org 
>> .protege 
>> .editor.core.ui.action.OpenAction.openInNewWorkspace(OpenAction.java: 
>> 51)
>> 	at org.protege.editor.core.ui.util.UIUtil.openRequest(UIUtil.java: 
>> 169)
>> 	at  
>> org 
>> .protege 
>> .editor.core.ui.action.OpenAction.actionPerformed(OpenAction.java:27)
>> 	at  
>> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java: 
>> 1882)
>> 	at javax.swing.AbstractButton 
>> $Handler.actionPerformed(AbstractButton.java:2202)
>> 	at  
>> javax 
>> .swing 
>> .DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
>> 	at  
>> javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
>> 	at javax.swing.AbstractButton.doClick(AbstractButton.java:334)
>> 	at javax.swing.AbstractButton.doClick(AbstractButton.java:282)
>> 	at javax.swing.plaf.basic.BasicMenuItemUI 
>> $Actions.actionPerformed(BasicMenuItemUI.java:1020)
>> 	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1576)
>> 	at javax.swing.JComponent.processKeyBinding(JComponent.java:2772)
>> 	at  
>> javax 
>> .swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:656)
>> 	at  
>> javax 
>> .swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:664)
>> 	at  
>> javax 
>> .swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:664)
>> 	at javax.swing.JMenuBar.processKeyBinding(JMenuBar.java:640)
>> 	at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:255)
>> 	at  
>> javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java: 
>> 242)
>> 	at  
>> javax 
>> .swing.JComponent.processKeyBindingsForAllComponents(JComponent.java: 
>> 2849)
>> 	at javax.swing.JComponent.processKeyBindings(JComponent.java:2841)
>> 	at javax.swing.JComponent.processKeyEvent(JComponent.java:2735)
>> 	at java.awt.Component.processEvent(Component.java:5379)
>> 	at java.awt.Container.processEvent(Container.java:2010)
>> 	at java.awt.Component.dispatchEventImpl(Component.java:4068)
>> 	at java.awt.Container.dispatchEventImpl(Container.java:2068)
>> 	at java.awt.Component.dispatchEvent(Component.java:3903)
>> 	at  
>> java 
>> .awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java: 
>> 1826)
>> 	at  
>> java 
>> .awt 
>> .DefaultKeyboardFocusManager 
>> .dispatchKeyEvent(DefaultKeyboardFocusManager.java:681)
>> 	at  
>> java 
>> .awt 
>> .DefaultKeyboardFocusManager 
>> .preDispatchKeyEvent(DefaultKeyboardFocusManager.java:938)
>> 	at  
>> java 
>> .awt 
>> .DefaultKeyboardFocusManager 
>> .typeAheadAssertions(DefaultKeyboardFocusManager.java:810)
>> 	at  
>> java 
>> .awt 
>> .DefaultKeyboardFocusManager 
>> .dispatchEvent(DefaultKeyboardFocusManager.java:645)
>> 	at java.awt.Component.dispatchEventImpl(Component.java:3941)
>> 	at java.awt.Container.dispatchEventImpl(Container.java:2068)
>> 	at java.awt.Window.dispatchEventImpl(Window.java:1801)
>> 	at java.awt.Component.dispatchEvent(Component.java:3903)
>> 	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
>> 	at  
>> java 
>> .awt 
>> .EventDispatchThread 
>> .pumpOneEventForHierarchy(EventDispatchThread.java:269)
>> 	at  
>> java 
>> .awt 
>> .EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java: 
>> 190)
>> 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java: 
>> 184)
>> 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java: 
>> 176)
>> 	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
>>
>>     
>
>
>
>
>
>
>
> On 16 Apr 2009, at 21:50, Holger Stenzhorn wrote:
>
>   
>> Hi,
>>
>> I have a problem when adding a custom annotation to a class.
>>
>> First, I create a new class "ABC" and then I add to this class the
>> custom annotation URI "http://www.w3.org/2004/02/skos/core#prefLabel"
>> with the value "123" and "Lang" set to "en".
>> As a result, "prefLabel - "123"@en" appears in the annotations section
>> on the right for "123".
>>
>> Now I save the ontology and get the source [1].
>> When I reload it, the annotations section is empty for "123".
>> Saving the ontology now again results in [2].
>>
>> I am sorry if this issue has been on the list before and I  
>> overlooked it...
>> (Checked in build 109 and build from latest SVN checkout)
>>
>> Cheers,
>> Holger
>>
>> [1]
>>
>> <?xml version="1.0"?>
>>
>> <!DOCTYPE rdf:RDF [
>>   <!ENTITY baz "http://foo.bar/baz#" >
>>   <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
>>   <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
>>   <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" >
>>   <!ENTITY skos "http://www.w3.org/2004/02/skos/core#" >
>>   <!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://foo.bar/baz#"
>>    xml:base="http://foo.bar/baz"
>>    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
>>    xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
>>    xmlns:baz="http://foo.bar/baz#"
>>    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#"
>>    xmlns:skos="http://www.w3.org/2004/02/skos/core#">
>>   <owl:Ontology rdf:about=""/>
>>
>>   <!--
>>
>> ///////////////////////////////////////////////////////////////////////////////////////
>>   //
>>   // Annotation properties
>>   //
>>
>> ///////////////////////////////////////////////////////////////////////////////////////
>>    -->
>>   <owl:AnnotationProperty rdf:about="&skos;prefLabel"/>
>>
>>   <!--
>>
>> ///////////////////////////////////////////////////////////////////////////////////////
>>   //
>>   // Classes
>>   //
>>
>> ///////////////////////////////////////////////////////////////////////////////////////
>>    -->
>>
>>   <!-- http://foo.bar/baz#ABC -->
>>
>>   <owl:Class rdf:about="#ABC">
>>       <skos:prefLabel>123</skos:prefLabel>
>>   </owl:Class>
>> </rdf:RDF>
>>
>> <!-- Generated by the OWL API (version 2.2.1.974)
>> http://owlapi.sourceforge.net -->
>>
>>
>>
>>
>>
>> [2]
>>
>> <?xml version="1.0"?>
>>
>> <!DOCTYPE rdf:RDF [
>>   <!ENTITY baz "http://foo.bar/baz#" >
>>   <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
>>   <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
>>   <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" >
>>   <!ENTITY skos "http://www.w3.org/2004/02/skos/core#" >
>>   <!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://foo.bar/baz#"
>>    xml:base="http://foo.bar/baz"
>>    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
>>    xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
>>    xmlns:baz="http://foo.bar/baz#"
>>    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#"
>>    xmlns:skos="http://www.w3.org/2004/02/skos/core#">
>>   <owl:Ontology rdf:about=""/>
>>
>>   <!--
>>
>> ///////////////////////////////////////////////////////////////////////////////////////
>>   //
>>   // Data properties
>>   //
>>
>> ///////////////////////////////////////////////////////////////////////////////////////
>>    -->
>>
>>   <!-- http://www.w3.org/2004/02/skos/core#prefLabel -->
>>
>>   <owl:DatatypeProperty rdf:about="&skos;prefLabel"/>
>>
>>   <!--
>>
>> ///////////////////////////////////////////////////////////////////////////////////////
>>   //
>>   // Classes
>>   //
>>
>> ///////////////////////////////////////////////////////////////////////////////////////
>>    -->
>>
>>   <!-- http://foo.bar/baz#ABC -->
>>
>>   <owl:Class rdf:about="#ABC"/>
>>
>>   <!--
>>
>> ///////////////////////////////////////////////////////////////////////////////////////
>>   //
>>   // Individuals
>>   //
>>
>> ///////////////////////////////////////////////////////////////////////////////////////
>>    -->
>>
>>   <!-- http://foo.bar/baz#ABC -->
>>
>>   <rdf:Description rdf:about="#ABC">
>>       <skos:prefLabel>123</skos:prefLabel>
>>   </rdf:Description>
>> </rdf:RDF>
>>
>> <!-- Generated by the OWL API (version 2.2.1.974)
>> http://owlapi.sourceforge.net -->
>> _______________________________________________
>> p4-feedback mailing list
>> p4-feedback at lists.stanford.edu
>> https://mailman.stanford.edu/mailman/listinfo/p4-feedback
>>     
>
> +----------------------------------------------------------------------+
> |  Dr Thomas Schneider                         schneider at cs.man.ac.uk  |
> |  School of Computer Science       http://www.cs.man.ac.uk/~schneidt  |
> |  Kilburn Building, Room 2.114                 phone +44 161 2756136  |
> |  University of Manchester                                            |
> |  Oxford Road                                             _///_       |
> |  Manchester M13 9PL                                      (o~o)       |
> +-----------------------------------------------------oOOO--(_)--OOOo--+
>
> Imber (vb.)
>   To lean from side to side while watching a car chase in the cinema.
>
>                   Douglas Adams, John Lloyd: The Deeper Meaning of Liff
>
>
>
>
>
>
>
> _______________________________________________
> p4-feedback mailing list
> p4-feedback at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback
>   




More information about the p4-feedback mailing list