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] Create a new project using the API

John Finnson john.finnson at gmail.com
Fri May 23 12:37:31 PDT 2008


With reference to the code I posted before hand, i found why the KB
was wrong so this is the new code I'm working with:

Project newProject = Project.createBuildProject(owlModel, errors);
currProjectManager.loadProject(newProject.getProjectURI());
									
However this is still not working, because there is no comments this
is proving very difficult for what should be a simple task. From
looking at these methods (and a few not shown above), it should: load
an ontology from a file (not shown above but i know it works), create
a new project with the loaded ontology as its KB, and then load this
new project into an active Protege. This will all be done through a
button you click on a simple user created tab in Protege.

I have looked at the javadocs and source code alot and I cant seem to
get what I want. There are alot of create and build project methods
but because there is no documentation its very hard to discern how
they are different and which I need.

Help would be very much appreciated.

On Fri, May 23, 2008 at 3:18 PM, Jonathan Carter
<jonathan.carter at e-asolutions.com> wrote:
> Have a quick look at the source code in the Subversion repository and see
> what the UI calls when you create a New Project using the standard GUI.
> http://smi-protege.stanford.edu/svn/
> http://smi-protege.stanford.edu/svn/protege-core/trunk/src/edu/stanford/smi/protege/ui/ProjectManager.java?rev=9944&view=log
> According to the code for the ProjectManager class have a look at the
> private createNewProject() method, you should be called
> createNewProject(KnowledgeBaseFactory, errors)
> So, create a KB factory, not an empty KB.
> Hope this helps
> Jonathan
> __________________________________________
> Jonathan Carter - Head of Technical Architecture
> Enterprise Architecture Solutions Ltd
>
> __________________________________________
>
> Assess your EA maturity at:
> www.enterprise-architecture.com/EAvaluator
> __________________________________________
>
> On 23 May 2008, at 17:02, John Finnson wrote:
>
> Hi, I was wondering what was the command to create a brand new project
> from nothing. I have been trying some methods like:
>
> Project newProject = Project.createNewProject((KnowledgeBaseFactory)
> SystemUtilities.newInstance("newKB"), errors);
>
> but then it says that it cant find the KB "newKB". I would appreciate
> it if somone gave me a line of code which completly creates a new
> project.
>
> If some how my reasoning is wrong this is the reason why I want to do
> this: I want to create a project with a blank slate and then
> initialize an ontology to it. So that when a person presses a certain
> button in my new Tab I am creating a new project will open up with an
> ontology that I have in a certain file.
>
> Thanks in advance for any help provided.
> _______________________________________________
> 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