EmmanuelOga / hypergraphdb

Automatically exported from code.google.com/p/hypergraphdb
1 stars 0 forks source link

Protege Plugin not works with import section for Ontology #105

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1.) Load Ontology with imports declaration.
2.) After restart protege imports list is empty...

Original issue reported on code.google.com by v.gordievskiy@gmail.com on 5 Dec 2014 at 6:28

GoogleCodeExporter commented 9 years ago
I tried save the ontology (with import declaration) by programmatically way.
And have this exception: 

java.lang.NullPointerException
        at org.hypergraphdb.app.owl.HGDBOntologyInternalsImpl.findEqualImportsDeclaration(HGDBOntologyInternalsImpl.java:526)
        at org.hypergraphdb.app.owl.HGDBOntologyInternalsImpl.containsImportDeclaration(HGDBOntologyInternalsImpl.java:535)
        at org.hypergraphdb.app.owl.HGDBOntologyInternalsImpl$11.call(HGDBOntologyInternalsImpl.java:543)
        at org.hypergraphdb.app.owl.HGDBOntologyInternalsImpl$11.call(HGDBOntologyInternalsImpl.java:1)
        at org.hypergraphdb.transaction.HGTransactionManager.transact(HGTransactionManager.java:396)
        at org.hypergraphdb.transaction.HGTransactionManager.ensureTransaction(HGTransactionManager.java:323)
        at org.hypergraphdb.transaction.HGTransactionManager.ensureTransaction(HGTransactionManager.java:294)
        at org.hypergraphdb.app.owl.HGDBOntologyInternalsImpl.addImportsDeclaration(HGDBOntologyInternalsImpl.java:541)
        at org.hypergraphdb.app.owl.HGDBOntologyImpl$OWLOntologyChangeFilter.visit(HGDBOntologyImpl.java:1742)
        at org.semanticweb.owlapi.model.AddImport.accept(AddImport.java:100)
        at org.hypergraphdb.app.owl.HGDBOntologyImpl.applyChange(HGDBOntologyImpl.java:1645)
        at org.hypergraphdb.app.owl.HGDBStorer.storeOntology(HGDBStorer.java:112)
        at org.hypergraphdb.app.owl.HGDBStorer.storeOntology(HGDBStorer.java:156)
        at org.hypergraphdb.app.owl.HGDBStorer.storeOntology(HGDBStorer.java:54)
        at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.saveOntology(OWLOntologyManagerImpl.java:991)
        at Implementation.OntoManager.HGDBOntoManager.NewOntology(HGDBOntoManager.java:199)

Original comment by v.gordievskiy@gmail.com on 5 Dec 2014 at 7:05

GoogleCodeExporter commented 9 years ago
Note: 
Implementation.OntoManager.HGDBOntoManager.NewOntology(HGDBOntoManager.java:199)
 - is part of code from my test.

Original comment by v.gordievskiy@gmail.com on 5 Dec 2014 at 7:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Seems a reason in:

apps/owl/src/java/org/hypergraphdb/app/owl/HGDBOntologyImpl.java 

@SuppressWarnings("unchecked")
    @Override
    public List<HGHandle> findAll(HGQueryCondition condition)
    {
        // TODO Auto-generated method stub
        return null;
    }

Original comment by v.gordievskiy@gmail.com on 6 Dec 2014 at 1:32

GoogleCodeExporter commented 9 years ago
Hi, I'm traveling at the moment. Will look at those at the beginning of next 
week. Thanks much for the detailed reports! You are using the latest SVN 
codebase I assume?

Original comment by borislav...@gmail.com on 6 Dec 2014 at 10:26

GoogleCodeExporter commented 9 years ago
Hi! Yes, I checkout Revision: 2964.

I made a workaround for this in my working copy. Just return the empty 
ArrayList in the method presented above and all fine works with import 
declaration.

Original comment by v.gordievskiy@gmail.com on 6 Dec 2014 at 10:40

GoogleCodeExporter commented 9 years ago
Ok, I committed an implementation for that method. If you have a test case that 
I could add to unit testing, please pass it on, it would be useful!!

If you update from svn, please get the core module also, I made a small change 
there to avoid duplication of some fields in HGOntologyImpl.

Original comment by borislav...@gmail.com on 9 Dec 2014 at 5:01

GoogleCodeExporter commented 9 years ago
Thanks!

I shall do manual testing for this and preparing a code for test case.

Original comment by v.gordievskiy@gmail.com on 9 Dec 2014 at 9:04