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 to create an annotations project

Tiago Gaspar tmg at uninova.pt
Mon Jul 26 11:50:18 PDT 2010


Hi again,

 

I’m back to this topic just to ask a new thing... I am able to create an
annotations ontology for my OWL project, I have added the folder projects to
my classes folder. I can change the data of this changes.pprj and then I
have my own ChAO template right? My problem is, in different steps of my
work I need to use 3 different ChAO templates and because they must be
inside the folder “projects” and have the name of “changes.pprj” I can’t
have these 3 but only one
 is there any kind of way that I can have 3 folder
called (for example) “projects_1”, “projects_2” and “projects_3” ? Or is
there other solution I can use?

 

Best regards

 

From: protege-owl-bounces at lists.stanford.edu
[mailto:protege-owl-bounces at lists.stanford.edu] On Behalf Of Jennifer
Vendetti
Sent: quinta-feira, 10 de Junho de 2010 19:49
To: User support for the Protege-OWL editor
Subject: Re: [protege-owl] How to create an annotations project

 

Tiago,

If adding the projects directory to your source path did not work, please
look at your output directory and verify that the required structure Tania
mentioned exists.  If it does not, you may have to manually copy the
projects directory to the correct location in your output directory.  For
example, I have a test Java application called "sandbox" that creates a
changes and annotations ontology, and my output directory is configured in
Eclipse as sandbox/build/classes/, i.e.:

sandbox/build/classes/edu/stanford/bmir/protegex/sandbox/Sandbox.class
sandbox/build/classes/projects/changes.pprj
sandbox/build/classes/projects/changes.rdf
sandbox/build/classes/projects/changes.rdfs

Notice that the projects directory has to exist at the same level as the
beginning of your package structure.

If you don't have a projects directory in the correct location in your
output path, you will get the error that you list below.  I can reproduce
this error by removing the projects directory from my output directory.  If
you are getting this error, you don't have the projects directory in the
correct place in your output path.

Jennifer


On 6/10/2010 10:01 AM, Tiago Gaspar wrote: 

Dear Tania,

 

I tried to do what you said but the results were the same
 I will try to
show better what I’m getting.

First of all let me tell you that I am working on protégé 3.4.4 examples
folder, so I think I don’t need to include the projects directory into my
source path (I tried to do this but it didn’t work). So when I am running my
project, it explodes on the line:

//create the ChAO KB

   KnowledgeBase changesKb = ChAOKbManager.createRDFFileChAOKb(owlModel,
ChAOKbManager.getChAOProjectURI(owlModel));

 

And what I get is:

 

WARNING: Could not find annotation/changes ontology in the plugins
directory. -- java.lang.NullPointerException
        at
edu.stanford.bmir.protegex.chao.ChAOKbManager.getChangesProject(Unknown
Source)
        at
edu.stanford.bmir.protegex.chao.ChAOKbManager.createRDFFileChAOKb(Unknown
Source)
        at
edu.stanford.bmir.protegex.chao.ChAOKbManager.createRDFFileChAOKb(Unknown
Source)
        at
edu.stanford.bmir.protegex.chao.ChAOKbManager.createRDFFileChAOKb(Unknown
Source)

 

What I want to do is give to the user a possibility to create a project. The
user has to insert the name of the project he wants, then my program creates
an OWL file and with this OWL file I create the pprj file. With this 3 files
created (project_name.pprj, project_name.owl and project_name.repository) I
want to create the annotations_ project_name.pprj and other corresponding
files
.

 

Best regards,

Tiago

 

From: protege-owl-bounces at lists.stanford.edu
[mailto:protege-owl-bounces at lists.stanford.edu] On Behalf Of Tania Tudorache
Sent: quarta-feira, 9 de Junho de 2010 20:40
To: User support for the Protege-OWL editor
Subject: Re: [protege-owl] How to create an annotations project

 

You need to include the projects directory from 
/plugins/edu.stanford.smi.protegex.changes/projects

into your source path. The projects directory contains the template ChAO
files (changes.pprj, changes.rdf and changes.rdfs) that are used to build a
new ChAO annotation ontology.

For example, if the output of your compiler is in a folder called "classes",
then you should have under this directory the projects directory. It should
look like:

classes
|_ projects
     |_ changes.pprj
     |_ changes.rdf
     |_ changes.rdfs


Tania

On 06/09/2010 11:03 AM, Tiago Gaspar wrote: 

Hi =)

 

well yes I’m using Protege 3.4.4. I have imported to my project the
change-management.jar and I find everything I need but when I run the
program I have an error. In the code:

 

private KnowledgeBase void createCHAOFileProject() {
   //load the project
   Project prj = Project.loadProjectFromFile("/tmp/pizza.pprj", new
ArrayList());
   OWLModel owlModel = (OWLModel) prj.getKnowledgeBase();
   //create the ChAO KB
   KnowledgeBase changesKb = ChAOKbManager.createRDFFileChAOKb(owlModel,
ChAOKbManager.getChAOProjectURI(owlModel));
   //save the ChAO
   ArrayList errors = new ArrayList();
   changesKb.getProject().save(errors);
   //optional to save also the main project. It helps if the ChAO project
does not have the default name
   prj.save(errors);
   return changesKb;

 

I have a problem on the line.

//create the ChAO KB
   KnowledgeBase changesKb = ChAOKbManager.createRDFFileChAOKb(owlModel,
ChAOKbManager.getChAOProjectURI(owlModel));

 

It says that cannot find the changes/annotation ontology


 

What should I do?

 

Thanks a lot for your help =)

 

Tiago

 

From: protege-owl-bounces at lists.stanford.edu
[mailto:protege-owl-bounces at lists.stanford.edu] On Behalf Of Jennifer
Vendetti
Sent: quarta-feira, 9 de Junho de 2010 18:34
To: User support for the Protege-OWL editor
Subject: Re: [protege-owl] How to create an annotations project

 

On 6/9/2010 9:19 AM, Tiago Gaspar wrote: 

It helped me a lot but I still have a small problem (I guess). In the wiki
page there’s a line that says:

“One of the most important classes is the
edu.stanford.bmir.protegex.chao.ChAOKbManager found in the change-model.jar
from the edu.stanford.smi.protegex.changes plugin folder.”

In this folder I just find the change-management.jar. So then I have
problems when I’m running my project. Do you know why I don’t find this jar
in the folder? Where can I find it?


Sorry - the documentation is out of date on this point.  The ChAOKbManager
class is in the change-management.jar file in the
edu.stanford.smi.protegex.changes folder (I'm assuming that you're using
Protege 3.4.4).

Jennifer

 
 
_______________________________________________
protege-owl mailing list
protege-owl at lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl
 
Instructions for unsubscribing:
http://protege.stanford.edu/doc/faq.html#01a.03
  

 

 
 
_______________________________________________
protege-owl mailing list
protege-owl at lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl
 
Instructions for unsubscribing:
http://protege.stanford.edu/doc/faq.html#01a.03
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20100726/828ae1d6/attachment.html>


More information about the protege-owl mailing list