Search Mailing List Archives
[protege-discussion] Save modified protege server project to physical copy without reinitializing server
csongor.nyulas at stanford.edu
Thu Nov 10 15:16:27 PST 2011
*Once you start a Protege project in client-server mode, you should
always connect to it with a client, and you should never open the
underlying owl file (or database) with standalone Protege.* All the
clients would see instantaneously (i.e. within a few seconds) what other
The Protege server saves the OWL file backed projects automatically in
regular time intervals (I think by default every 2 minutes or so), and
it also saves the content of the project when you shut down the project
from the Protege Server Admin interface. In case of WebProtege, you can
set the length of the time interval, when you wish the automatic saving
to occure as described at  (look for the "server.save.interval.sec"
However, if you have important content in your ontology, you should set
up your Protege project to use a database back-end rather than an OWL
file back-end. This way every single action that is made by a client is
saved instantaneously in the DB and it can't be lost in case of an
unexpected crash of the Protege server (for example, due to a power outage).
On 11/10/2011 6:16 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
> However I am not sure if you have an idea on how to save a modified
> 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
> 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
> 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,
> RemoteServer rserver = (RemoteServer) Naming.lookup("//" + serverName
> + "/" +
> RemoteSession rm = server.openSession("Testuser", "TEST-PC",
> remotepm = new RemoteProjectManager();
> Project proj = remotepm.connectToProject(server, rm, "TestOntology");
> KnowledgeBase kb = proj.getKnowledgeBase();
> 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",
> 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
> 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,
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> Instructions for unsubscribing:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the protege-discussion