Search Mailing List Archives
[protege-discussion] pprj file - WAS: (no subject)
Tania Tudorache
tudorache at stanford.edu
Wed Sep 26 11:29:57 PDT 2007
I am not sure what you mean by getting a copy of the pprj file. If you
want to make a copy of the existing project, we have this documented on
the wiki:
http://protege.cim3.net/cgi-bin/wiki.pl?SaveAs
Tania
Sjaak van Werkhoven wrote:
> Dear list
>
> The classWriter and instanceWriter files mentioned are related to
> copies of the pins and pont files. Can someone tell me how i can get
> hold of a copy of the pprj file?
>
> greeting
>
> Sjaak van Werkhoven
>
>
>> Yes, that code is well hidden :)
>>
>> You'll find the code for the CLIPS export in
>>
>> edu.stanford.smi.protege.storage.clips.ClipsImportExportPlugin
>>
>> 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);
>> handleErrors(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:
>>
>> http://protege.cim3.net/cgi-bin/wiki.pl?MultiUserTutorial#nid9AV
>>
>> (Use first method)
>>
>> Cheers,
>> Tania
>>
>> 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> lists.stanford.edu
>>> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>>>
>>> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
>>>
>>>
>>>
>> _______________________________________________
>> 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
>>
>>
> _______________________________________________
> 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