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-owl] How do you create a new project from an existing OWL file and display it?

John Finnson john.finnson at gmail.com
Tue May 27 08:48:41 PDT 2008


Can anyone please help me with this?

On Mon, May 26, 2008 at 4:31 PM, John Finnson <john.finnson at gmail.com> wrote:
> Hi, I was wondering what are the sequence of Java statements needed to
> Create a new Project from an existing OWL file and then display it in
> the currently running Protege program. (all done through a tab)
>
> So far this is the code I have, and I am having problems with it
> because of my use of protege and protegex methods. What it does right
> now is load up the project into protege with the OWL file, but it
> seems like it is in Clips format.
>
> OWLMenuProjectPlugin currOWLMenuProjectPlugin = new OWLMenuProjectPlugin();
>                                        ProjectManager currProjectManager =
> ProjectManager.getProjectManager();
>
>
>                                        Collection errors = new ArrayList();
>
>
>                                        File readFile = new File("D:\\Program
> Files\\Protege_3.3.1\\TutorualSWDB.rdf-xml.owl");
>
>                                        InputStream inStream = new FileInputStream(readFile);
>
>                                        OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromInputStream(inStream);
>
>
>
>                                        Project newProject = Project.createBuildProject(owlModel, errors);
>
>                                        currOWLMenuProjectPlugin.afterCreate(newProject);
>
>                                        currProjectManager.setCurrentProject(newProject,false);
>
>                                        ProjectView currProtegeView =
> ProtegeUI.getProjectView(currProjectManager.getCurrentProject());
>                                        ProjectToolBar currProjectToolBar =
> (ProjectToolBar)currProjectManager.getCurrentProjectMainToolBar();
>                                        ProjectMenuBar currProjectMenuBar =
> (ProjectMenuBar)currProjectManager.getCurrentProjectMenuBar();
>
>                                        currOWLMenuProjectPlugin.afterShow(currProtegeView,
> currProjectToolBar, currProjectMenuBar);
>
> Thanks in advance for any help provided.
>



More information about the protege-owl mailing list