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] simple protege backup server

Tania Tudorache tudorache at
Thu Sep 6 12:50:25 PDT 2007

Yes, that code is well hidden :)

You'll find the code for the CLIPS export in

the method you're interested in is:

    private static void exportProject(Project project, String 
clsesFileName, String instancesFileName) {
        Collection errors = new ArrayList();
        KnowledgeBase kb = project.getKnowledgeBase();
        ClipsKnowledgeBaseFactory factory = new ClipsKnowledgeBaseFactory();
        Writer clsesWriter = FileUtilities.getWriter(clsesFileName);
        Writer instancesWriter = FileUtilities.getWriter(instancesFileName);
        factory.saveKnowledgeBase(kb, clsesWriter, instancesWriter, errors);

where "project" is the remote Project object. If you don't have a 
reference for the remote project, you can get one pretty easy. This is 
described here:

(Use first method)


Henk-Jan Lebbink wrote:
> Dear List,
> In Protege 3.3.1 under 'file', 'Export to Format' we can export a loaded
> project to a clips-based file format, even when we are logged into a
> server project. I would like to write a method that logs into a server
> project (like any other user) and writes a copy of the entire project
> locally in a pins and pont file on its hard drive every hour. Basically,
> such a method is a simple backup server.
> Logging into a server is not difficult.
>> RemoteProjectManager rpm = RemoteProjectManager.getInstance();
>> Project p = rpm.getProject(machine, user, password, projectName, true);
> My question: How can I save this project p as a clips project. I've
> searched the source code for the 'Export to Format' code, but I couldn't
> find it.
> Thanx in advance!
> Henk-Jan.
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at
> Instructions for unsubscribing: 

More information about the protege-discussion mailing list