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] Save modified protege server project to physical copy without reinitializing server

Csongor Nyulas csongor.nyulas at
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 
clients do.

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 [1] (look for the "" 
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
> 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
> Instructions for unsubscribing: 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the protege-discussion mailing list