Getting the Project Path

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting the Project Path

Neury at Work
Hello,

How can I get the relative or absolute project path?

I need this path to save the XML file with the information from my Plugin in
the same place as the project's files.

Thank you all in advance.

Sincerely,

Neury Freitas

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Getting the Project Path

Jennifer Vendetti
Administrator

Please look in the model package for these methods (such as
getProjectURI, etc.):

http://protege.stanford.edu/download/prerelease_javadoc/edu/stanford/smi/protege/model/Project.html

Jennifer

Neury at Work wrote:

>Hello,
>
>How can I get the relative or absolute project path?
>
>I need this path to save the XML file with the information from my Plugin in
>the same place as the project's files.
>
>Thank you all in advance.
>
>Sincerely,
>
>Neury Freitas
>
>-------------------------------------------------------------------------
>To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>  
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Getting the Project Path

Mauro Jansen

Jennifer Vendetti <vendetti <at> stanford.edu> writes:

>
> Please look in the model package for these methods (such as
> getProjectURI, etc.):
>
http://protege.stanford.edu/download/prerelease_javadoc/edu/stanford/smi/protege
/model/Project.html
>
> Jennifer
>
> Neury at Work wrote:
>
> >Hello,
> >
> >How can I get the relative or absolute project path?
> >

Hello. I was looking for the same thing. I'm not expert in Java and (in my
case) the documentation didn't helped so much because it don't have examples
(where can we find examples?). After some trials and looking other's plugins
codes, i found this soluction, adding this code into the plugin initialize
method, using two methods of the Project class that return a string:

// --- Gets the path and name of the project in use
Project project = getProject();
String vprjfile = project.getProjectFilePath()+"\\"+project.getProjectName()
+".pprj";

Mauro Jansen

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: Getting the Project Path

sirisha k
I would be glad to know the website address for any reusable software components ontology implemented in RDFS/OWL
   
  shirisha

Mauro Jansen <[hidden email]> wrote:
 
Jennifer Vendetti stanford.edu> writes:

>
> Please look in the model package for these methods (such as
> getProjectURI, etc.):
>
http://protege.stanford.edu/download/prerelease_javadoc/edu/stanford/smi/protege
/model/Project.html
>
> Jennifer
>
> Neury at Work wrote:
>
> >Hello,
> >
> >How can I get the relative or absolute project path?
> >

Hello. I was looking for the same thing. I'm not expert in Java and (in my
case) the documentation didn't helped so much because it don't have examples
(where can we find examples?). After some trials and looking other's plugins
codes, i found this soluction, adding this code into the plugin initialize
method, using two methods of the Project class that return a string:

// --- Gets the path and name of the project in use
Project project = getProject();
String vprjfile = project.getProjectFilePath()+"\\"+project.getProjectName()
+".pprj";

Mauro Jansen

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

 


                       
---------------------------------
 Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html