How-to: connect to protégé server from your app

I couldn't find any documentation on how exactly to do this, so here's a sample code:

        ArrayList<String> errors = new ArrayList<String>(); 
 
        Project project = RemoteProjectManager.getInstance().getProject(kbHost, 
                          kbUserName, kbPassword, kbName, true); 
        if (errors.size() > 0) { 
            for (String s : errors) { 
                log.error(s); 
            } 
            throw new InitException("Failed to connect to the Knowledge Base"); 
        } 
        knowledgeBase = project.getKnowledgeBase(); 

[They didn't provide documentation, but you can still digg their unit tests…]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s