Re: Owl-database export functionality and scalability

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Owl-database export functionality and scalability

Ville-P Komulainen, tkol
Hi,

My co-worker had time to take a look into this bug and found out the
following bugs in the owl-plugin. He made the changes to the source and
tested it using our 23 000 concept ontology. The lines having "-" were
removed and those having "+" were added. Could someone confirm that the
changes don't break anything and commit these changes to the svn
repository?

*******************************************************************

src/edu/stanford/smi/protegex/owl/jena/creator/JenaCreator.java:

For metaclasses, setRDFType removes owl:Class as type, after which the
Jena ontModel.getOntClass used elsewhere doesn't think it's a class
and returns null, possibly leading to endless loops of
addPropertyValues->createNamedClass->...

private OntClass createNamedClass(RDFSNamedClass rdfsClass) {
...
         if (!forReasoning
&& !owlModel.getOWLNamedClassClass().equals(rdfsClass.getProtegeType()))
{
             OntClass metaClass = getOntClass((RDFSClass)
rdfsClass.getProtegeType());
-            ontClass.setRDFType(metaClass);
+            ontClass.addRDFType(metaClass);
         }
...
}

src/edu/stanford/smi/protegex/owl/model/impl/DefaultRDFSLiteral.java:

endIndex is not found for empty literals with language, resulting in
an IndexOutOfBoundsException.

public String getLanguage() {
         if (rawValue.startsWith(LANGUAGE_PREFIX)) {
             int endIndex = rawValue.indexOf(SEPARATOR);
-            return rawValue.substring(2, endIndex);
+            return endIndex>0 ? rawValue.substring(2, endIndex) :
rawValue.substring(2);
        }
    return null;
}

*******************************************************************

> Ville,
>
> I wasn't aware of this problem - sorry, I've raised this in the
> bugtracker [1].
> Can I assume you've been trying to use the "export to format" option
> in the file menu?
> Have you tried using "convert project to format" to turn this into a
> file project and then saving using the native writer? I know this
> would be a pain (and possibly won't scale) - just interested in case
> you've experimented with it.
>
> Nick
>
> [1] http://www.co-ode.org/mantis/view.php?id=478
>
> Ville-P Komulainen, tkol wrote:
> > Hi,
> >
> > I am using latest protege beta 3.2, owl-plugin build 300. It looks
>
> like
>
> > the function for using experimental native writer described in [1]
>
> will
>
> > not be added to the preferences panel. Also, I couldn't find an
> > experimental writer export-plugin from the list of export-plugins.
> >
> > How can I use/activate the experimental native writer for my
> > owl-database project, since there is no "rdf/xml writer" panel
> > available in the preferences and it seems to be missing from the
> > list of export-plugins in the UI. Or does the default "owl/rdf"
> > export use native writer? I am still getting StackOverflowError [2]
> > and it seems that the writer uses Jena. If I can do it using Java
> > Protege API, that is also an option, all I need is few tips to get
> > things started.
> >
> > [1] http://www.co-ode.org/mantis/view.php?id=308
> > [2] at
>
> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.createNamedCla
>ss(Unknown
>
> > Source)
> >         at
>
> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getOntClass(Un
>known
>
> > Source)
> >         at
>
> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getOntResource
>(Unknown
>
> > Source)
> >         at
>
> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getResource(Un
>known
>
> > Source)
> >         at
>
> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.addPropertyVal
>ues(Unknown
>
> > Source)
> >         at
>
> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.addPropertyVal
>ues(Unknown
>
> > Source)
> >         at
>
> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.createNamedCla
>ss(Unknown
>
> > Source)
> >         at
>
> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getOntClass(Un
>known
>
> > Source)
> >         at
>
> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getOntResource
>(Unknown
>
> > Source)
> >
> >> Hi Ville,
> >>
> >> I will add an export plugin that uses the native OWL writer -
> >> hopefully that should work.
> >>
> >> Cheers,
> >>
> >> Matthew
> >>
> >>
> >>
> >> I forgot to mention that we're using Protege 3.1.1 build 216 (Owl
> >> plugin
> >> build 284). Didn't see the serialization option in OWL
> >> preferences. I quess this feature comes in later owl-plugin
> >> versions..
> >>
> >> Then I Tried 3.2 beta (Owl plugin build 288), but the
> >> serialization option "Experimental native writer" was only
> >> available when opening a OWL-file project. In fact, the whole
> >> panel was missing on
>
> DB-projects?
>
> >> - Ville
> >>
> >> On Wednesday 04 January 2006 15:36, Matthew Horridge wrote:
> >>> Hi Ville,
> >>>
> >>> You might like to try the "native" protege-owl writer, which
> >>> might not cause the stack overflow (actually I'd be interested to
> >>> know if it does or if it doesn't :) ).  You need to activate it
> >>> from the OWL Preferences Dialog.
> >>>
> >>> Cheers,
> >>>
> >>> Matthew
> >>>
> >>> On 3 Jan 2006, at 10:09, Ville-P Komulainen, tkol wrote:
> >>>> Hi,
> >>>>
> >>>> We're using protege with MySQL-database and the ontology has
> >>>> about 20000
> >>>> classes. We're experiencing following problems with the export
> >>>> functionality (It works ok with small 100 class ontology).
> >>>>
> >>>> 1) java.lang.StackOverflowError
> >>>> - Memory parameters : '-Xmx1024M -Xss6M'
> >>>> - The JenaCreator exception marked with loop-tag is in the
> >>>> stacktrace several times
> >>>> -------------------------------
> >>>>
> >>>> Exception in thread "AWT-EventQueue-0"
> >>>> java.lang.StackOverflowError at
> >>>> sun.font.FontManager.getFont2D(Native Method)
> >>>>
> >>>> atsun.java2d.SunGraphics2D.checkFontInfo(SunGraphics2D.java:
> >>>> 668) at sun.java2d.SunGraphics2D.getFontInfo(SunGraphics2D.java:
> >>>> 701)
> >>>>         ...<LOOP]>
> >>>> at
> >>>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.addProper
> >>>>tyV alu es(JenaCreator.java:175)
> >>>>         at
> >>>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.addProper
> >>>>tyV alu es(JenaCreator.java:162)
> >>>>         at
> >>>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.createNam
> >>>>edC las s(JenaCreator.java:424)
> >>>>         at
> >>>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getOntCla
> >>>>ss (JenaCreator.java:687)
> >>>>         at
> >>>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getOntRes
> >>>>our ce( JenaCreator.java:718)
> >>>>         at
> >>>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getResour
> >>>>ce (JenaCreator.java:749)
> >>>> ...
> >>>> </LOOP]>
> >>>>
> >>>>
> >>>> 2) java.io.EOFException
> >>>> - Memory parameters : '-Xmx1024M -Xss40M'
> >>>> -----------------------------------
> >>>> Exception in thread "AWT-EventQueue-0"
> >>>> java.lang.RuntimeException: Communications link failure due to
> >>>> underlying exception:
>
> - Ville

- Ville
--
Ville Komulainen | +358 (0)40 5963 872 | [hidden email]
Room 2532, Laboratory of Media Technology, TKK, Espoo, Finland
www.seco.tkk.fi | www.seco.tkk.fi/u/vpkomula
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

OWL Full in Protege!

eduard barbu

I play a little bit with protege to see how it supports OWL-FULL. I did the following:
1. I used same identifier for a class and an instance. Protege says that the language profile is OWL -FULL
Wonder Web validator says the same thing
but W3c RDF validator reports an error.
2. I used the same identifier for a class and a ObjectProperty.
Protege reports a parse error.
Wonder Web validator says the ontology is OWL-FULL
W3C RDF validator reports an error.

My question is: Who is right in the above cases?

Regards!
Eduard


New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
Reply | Threaded
Open this post in threaded view
|

ODBC backend storage

Alan March
Hi all.
 
For reasons of interfacing, I intended to use the OWL/database format for storing an ontology. When I run my first tests, I noticed that no matter what (even a simple ontology just composed of one subclass with no restrictions), my ontology was always detected as Owl-Full, and the Fact++ reasoner seems to go into an eternal loop.
Should I assume that OWL-database is only intended to provide a storage mechanism for "finished" ontologies and not for an ontology "in the making" (and therefore the subject of processing through reasoners? Or am I doing something wrong?
 
Thanks in advance
 
Alan March
Reply | Threaded
Open this post in threaded view
|

Re: OWL Full in Protege!

Nick Drummond
In reply to this post by eduard barbu
Both of these will be in OWL full - I would go with the validator - I don't know why the RDF validator reports an error - this should still be valid RDF.

Nick


On 8 May 2006, at 12:17, eduard barbu wrote:


I play a little bit with protege to see how it supports OWL-FULL. I did the following:
1. I used same identifier for a class and an instance. Protege says that the language profile is OWL -FULL
Wonder Web validator says the same thing
but W3c RDF validator reports an error.
2. I used the same identifier for a class and a ObjectProperty.
Protege reports a parse error.
Wonder Web validator says the ontology is OWL-FULL
W3C RDF validator reports an error.

My question is: Who is right in the above cases?

Regards!
Eduard


New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

Reply | Threaded
Open this post in threaded view
|

Re: Owl-database export functionality and scalability

Nick Drummond
In reply to this post by Ville-P Komulainen, tkol
Ville,

Thankyou very much for looking into this.

The second fix, I've committed - well spotted.
The first fix causes some tests to fail so I'll have to investigate  
further.

I'll let you know the outcome

Thanks

Nick


On 8 May 2006, at 14:44, Ville-P Komulainen, tkol wrote:

> Hi,
>
> My co-worker had time to take a look into this bug and found out the
> following bugs in the owl-plugin. He made the changes to the source  
> and
> tested it using our 23 000 concept ontology. The lines having "-" were
> removed and those having "+" were added. Could someone confirm that  
> the
> changes don't break anything and commit these changes to the svn
> repository?
>
> *******************************************************************
>
> src/edu/stanford/smi/protegex/owl/jena/creator/JenaCreator.java:
>
> For metaclasses, setRDFType removes owl:Class as type, after which the
> Jena ontModel.getOntClass used elsewhere doesn't think it's a class
> and returns null, possibly leading to endless loops of
> addPropertyValues->createNamedClass->...
>
> private OntClass createNamedClass(RDFSNamedClass rdfsClass) {
> ...
>          if (!forReasoning
> && !owlModel.getOWLNamedClassClass().equals(rdfsClass.getProtegeType
> ()))
> {
>              OntClass metaClass = getOntClass((RDFSClass)
> rdfsClass.getProtegeType());
> -            ontClass.setRDFType(metaClass);
> +            ontClass.addRDFType(metaClass);
>          }
> ...
> }
>
> src/edu/stanford/smi/protegex/owl/model/impl/DefaultRDFSLiteral.java:
>
> endIndex is not found for empty literals with language, resulting in
> an IndexOutOfBoundsException.
>
> public String getLanguage() {
>          if (rawValue.startsWith(LANGUAGE_PREFIX)) {
>              int endIndex = rawValue.indexOf(SEPARATOR);
> -            return rawValue.substring(2, endIndex);
> +            return endIndex>0 ? rawValue.substring(2, endIndex) :
> rawValue.substring(2);
>         }
>     return null;
> }
>
> *******************************************************************
>
>> Ville,
>>
>> I wasn't aware of this problem - sorry, I've raised this in the
>> bugtracker [1].
>> Can I assume you've been trying to use the "export to format" option
>> in the file menu?
>> Have you tried using "convert project to format" to turn this into a
>> file project and then saving using the native writer? I know this
>> would be a pain (and possibly won't scale) - just interested in case
>> you've experimented with it.
>>
>> Nick
>>
>> [1] http://www.co-ode.org/mantis/view.php?id=478
>>
>> Ville-P Komulainen, tkol wrote:
>>> Hi,
>>>
>>> I am using latest protege beta 3.2, owl-plugin build 300. It looks
>>
>> like
>>
>>> the function for using experimental native writer described in [1]
>>
>> will
>>
>>> not be added to the preferences panel. Also, I couldn't find an
>>> experimental writer export-plugin from the list of export-plugins.
>>>
>>> How can I use/activate the experimental native writer for my
>>> owl-database project, since there is no "rdf/xml writer" panel
>>> available in the preferences and it seems to be missing from the
>>> list of export-plugins in the UI. Or does the default "owl/rdf"
>>> export use native writer? I am still getting StackOverflowError [2]
>>> and it seems that the writer uses Jena. If I can do it using Java
>>> Protege API, that is also an option, all I need is few tips to get
>>> things started.
>>>
>>> [1] http://www.co-ode.org/mantis/view.php?id=308
>>> [2] at
>>
>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.createNamedCla
>> ss(Unknown
>>
>>> Source)
>>>         at
>>
>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getOntClass(Un
>> known
>>
>>> Source)
>>>         at
>>
>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getOntResource
>> (Unknown
>>
>>> Source)
>>>         at
>>
>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getResource(Un
>> known
>>
>>> Source)
>>>         at
>>
>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.addPropertyVal
>> ues(Unknown
>>
>>> Source)
>>>         at
>>
>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.addPropertyVal
>> ues(Unknown
>>
>>> Source)
>>>         at
>>
>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.createNamedCla
>> ss(Unknown
>>
>>> Source)
>>>         at
>>
>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getOntClass(Un
>> known
>>
>>> Source)
>>>         at
>>
>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getOntResource
>> (Unknown
>>
>>> Source)
>>>
>>>> Hi Ville,
>>>>
>>>> I will add an export plugin that uses the native OWL writer -
>>>> hopefully that should work.
>>>>
>>>> Cheers,
>>>>
>>>> Matthew
>>>>
>>>>
>>>>
>>>> I forgot to mention that we're using Protege 3.1.1 build 216 (Owl
>>>> plugin
>>>> build 284). Didn't see the serialization option in OWL
>>>> preferences. I quess this feature comes in later owl-plugin
>>>> versions..
>>>>
>>>> Then I Tried 3.2 beta (Owl plugin build 288), but the
>>>> serialization option "Experimental native writer" was only
>>>> available when opening a OWL-file project. In fact, the whole
>>>> panel was missing on
>>
>> DB-projects?
>>
>>>> - Ville
>>>>
>>>> On Wednesday 04 January 2006 15:36, Matthew Horridge wrote:
>>>>> Hi Ville,
>>>>>
>>>>> You might like to try the "native" protege-owl writer, which
>>>>> might not cause the stack overflow (actually I'd be interested to
>>>>> know if it does or if it doesn't :) ).  You need to activate it
>>>>> from the OWL Preferences Dialog.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Matthew
>>>>>
>>>>> On 3 Jan 2006, at 10:09, Ville-P Komulainen, tkol wrote:
>>>>>> Hi,
>>>>>>
>>>>>> We're using protege with MySQL-database and the ontology has
>>>>>> about 20000
>>>>>> classes. We're experiencing following problems with the export
>>>>>> functionality (It works ok with small 100 class ontology).
>>>>>>
>>>>>> 1) java.lang.StackOverflowError
>>>>>> - Memory parameters : '-Xmx1024M -Xss6M'
>>>>>> - The JenaCreator exception marked with loop-tag is in the
>>>>>> stacktrace several times
>>>>>> -------------------------------
>>>>>>
>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>> java.lang.StackOverflowError at
>>>>>> sun.font.FontManager.getFont2D(Native Method)
>>>>>>
>>>>>> atsun.java2d.SunGraphics2D.checkFontInfo(SunGraphics2D.java:
>>>>>> 668) at sun.java2d.SunGraphics2D.getFontInfo(SunGraphics2D.java:
>>>>>> 701)
>>>>>>         ...<LOOP]>
>>>>>> at
>>>>>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.addProper
>>>>>> tyV alu es(JenaCreator.java:175)
>>>>>>         at
>>>>>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.addProper
>>>>>> tyV alu es(JenaCreator.java:162)
>>>>>>         at
>>>>>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.createNam
>>>>>> edC las s(JenaCreator.java:424)
>>>>>>         at
>>>>>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getOntCla
>>>>>> ss (JenaCreator.java:687)
>>>>>>         at
>>>>>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getOntRes
>>>>>> our ce( JenaCreator.java:718)
>>>>>>         at
>>>>>> edu.stanford.smi.protegex.owl.jena.creator.JenaCreator.getResour
>>>>>> ce (JenaCreator.java:749)
>>>>>> ...
>>>>>> </LOOP]>
>>>>>>
>>>>>>
>>>>>> 2) java.io.EOFException
>>>>>> - Memory parameters : '-Xmx1024M -Xss40M'
>>>>>> -----------------------------------
>>>>>> Exception in thread "AWT-EventQueue-0"
>>>>>> java.lang.RuntimeException: Communications link failure due to
>>>>>> underlying exception:
>>
>> - Ville
>
> - Ville
> --
> Ville Komulainen | +358 (0)40 5963 872 | [hidden email]
> Room 2532, Laboratory of Media Technology, TKK, Espoo, Finland
> www.seco.tkk.fi | www.seco.tkk.fi/u/vpkomula
> ----------------------------------------------------------------------
> ---
> To unsubscribe go to http://protege.stanford.edu/community/ 
> subscribe.html
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: ODBC backend storage

Nick Drummond
In reply to this post by Alan March
Alan,

No, it should work fine for ontologies in the making
What do you mean "run my first tests"?
I'm surprised FaCT++ is falling over - have you tried Pellet or another alternative reasoner?

Nick

On 8 May 2006, at 12:34, Alan March wrote:

Hi all.
 
For reasons of interfacing, I intended to use the OWL/database format for storing an ontology. When I run my first tests, I noticed that no matter what (even a simple ontology just composed of one subclass with no restrictions), my ontology was always detected as Owl-Full, and the Fact++ reasoner seems to go into an eternal loop.
Should I assume that OWL-database is only intended to provide a storage mechanism for "finished" ontologies and not for an ontology "in the making" (and therefore the subject of processing through reasoners? Or am I doing something wrong?
 
Thanks in advance
 
Alan March