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] error calling getOntModel

Steve Wilder swilder at atl.lmco.com
Tue Jan 8 11:35:22 PST 2008


Hello,

I have a client/server model in Protege 3.4 Build 122:

RemoteProjectManager rpm = RemoteProjectManager.getInstance();
Project p = rpm.getProject(hostname, username, password, project, true);
KnowledgeBase kb = p.getKnowledgeBase();
OWLModel model = (OWLModel) kb;

This model works fine for creating and retrieving data.

What I would like to do is dump the contents of this ontology to a file,
the code I'm currently trying to use is this:

model.save(new File("myfile.owl").toURI(), FileUtils.langXMLAbbrev, new
ArrayList());

That code produces the following stack trace:

used by: java.lang.ClassCastException: $Proxy1 cannot be cast to
edu.stanford.
smi.protege.model.framestore.InMemoryFrameDb
        at
edu.stanford.smi.protegex.owl.jena.triplestore.JenaTripleStore.listTriples(JenaTripleStore.java:54)
        at
edu.stanford.smi.protegex.owl.jena.protege2jena.Protege2Jena.copyTriples(Protege2Jena.java:90)
        at
edu.stanford.smi.protegex.owl.jena.protege2jena.Protege2Jena.fillModels(Protege2Jena.java:185)
        at
edu.stanford.smi.protegex.owl.jena.protege2jena.Protege2Jena.<init>(Protege2Jena.java:85)
        at
edu.stanford.smi.protegex.owl.jena.protege2jena.Protege2Jena.createOntModel(Protege2Jena.java:130)
        at
edu.stanford.smi.protegex.owl.jena.protege2jena.Protege2Jena.createOntModel(Protege2Jena.java:118)
        at
edu.stanford.smi.protegex.owl.jena.protege2jena.Protege2Jena.saveAll(Protege2Jena.java:370)
        at
edu.stanford.smi.protegex.owl.jena.JenaOWLModel.save(JenaOWLModel.java:352)
													
Thanks,
Steve			


-------------- next part --------------
A non-text attachment was scrubbed...
Name: swilder.vcf
Type: text/x-vcard
Size: 187 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20080108/a9a05a56/attachment.vcf>


More information about the protege-owl mailing list