Search Mailing List Archives
[protege-discussion] Remote Project Access Programmatically
Tania Tudorache
tudorache at stanford.edu
Thu Mar 5 17:30:19 PST 2009
Apologies for the late reply.
Your initial method should have worked, unless there was a policy
problem. The user should have read access to the ontologies that it
tries to access.
The easiest way to access a remote project from a client is:
edu.stanford.smi.protege.server.RemoteProjectManager.getProject(
String serverName,
String username,
String password,
String projectName,
boolean pollForEvents)
pollForEvents should be true.
Tania
Ron Schultz wrote:
> As a follow up, I found that programmatic access does work, but for some
> reason, asking aproject for its name returns null. But the following code
> snippet does return the reporter names as I would expect.
>
> if (serverProject != null) {
> p = RemoteClientProject.createProject(server, serverProject, session, true);
> KnowledgeBase kb = p.getKnowledgeBase();
> Slot slot = kb.getSlot("name");
> Collection<Instance> list = kb.getCls("Columnist").getDirectInstances();
> Log.getLogger().info(CollectionUtilities.toString(list));
>
> _______________________________________________
> 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