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-discussion] Saving modified protege server project to physical copy without re-initializing server

Csongor Nyulas csongor.nyulas at stanford.edu
Thu Nov 10 15:25:28 PST 2011


See my reply to this question in the new thread that you started here:
http://thread.gmane.org/gmane.comp.misc.ontology.protege.general/20270

Csongor

On 11/10/2011 6:09 AM, Philip Yeo wrote:
> Hi Csongor,
>
> Thanks. I've actually managed to figure it out on my one. It is 
> exactly what you
> said plus a host of other stuff that I can do all under the package
> edu.stanford.smi.protege.server.metaproject.*
>
> However I am not sure if you have an idea on how to save a modified 
> current
> project on protege server to its physical copy of the owl file.
>
> Right now, when anyone changes their protege server project's content 
> e.g. add
> an instance, and then opens up the physical copy of the owl file (w/o 
> connecting
> to the server), it does not show the modification - unless of course 
> the Protege
> server has been re-initialized.
>
> I'm not sure if that I can defy that programmatically. I've attempted 
> a bit by
> looking at the Protege 3.4.7 source code (protege-src-3.4.7). I saw 
> something
> which I thought may make it possible (saving the changes to the 
> physical copy
> w/o server restarting), but I faced some errors.
>
> The attempt was to connect to that Project itself. So using,
> edu.stanford.smi.protege.model.Project;
> edu.stanford.smi.protege.server.RemoteServer;
> and
> edu.stanford.smi.protege.server.RemoteSession;
>
> RemoteServer rserver = (RemoteServer) Naming.lookup("//" + serverName 
> + "/" +
> Server.getBoundName());
> RemoteSession rm = server.openSession("Testuser", "TEST-PC", 
> "testuserpw");
> remotepm = new RemoteProjectManager();
> Project proj = remotepm.connectToProject(server, rm, "TestOntology");
> KnowledgeBase kb = proj.getKnowledgeBase();
> kb.getProject().save(null);
>
> The error I faced is at connecting to the project. Apparently it calls
> RemoteProjectManager.connectToProject which in that method calls
> server.openProject(name, session); but doesn't return the desired
> RemoteServerProject object.
>
> Strange thing is, if I were to write the code,
> RemoteServerProject serverProject = server.openProject("TestOntology", 
> session);
> in my test code, this works.
>
> I'm not sure if what I'm attempting is even possible in the first 
> place. I
> thought I just get your thoughts on whether this is something futile 
> or perhaps
> there's something I've missed. I've read an ol' forum archived which 
> Tania
> responded to saying that this feature isn't available (downloading the 
> owl file
> from webprotege) which is why I am attempting to do so.
>
> Sorry for the long email. and thanks in advance for your patience,
> Philip
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: 
> http://protege.stanford.edu/doc/faq.html#01a.03



More information about the protege-discussion mailing list