Difference between revisions of "Protege5DevDocs"

From Protege Wiki
Jump to: navigation, search
(added link to documentation of the server design)
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__TOC__<br />
+
<div class="orangeBox">
== Protege Desktop 5.x Developer Documentation ==
+
<span class="orangeBoxTitle">Protege 5 Developer Documentation</span><br /><br />
 +
This page is a top-level entry point for all '''developer documentation''' related to the Protege Desktop application, versions 5.0 and above.
 +
</div><br /><br />
  
This page is a top-level entry point for all developer documentation related to the Protege Desktop application, versions 5.0 and above.
+
__TOC__
  
 +
 +
== Building ==
 +
 +
=== Accessing the source code ===
 +
Protege Desktop is open source and the code is freely [http://github.com/protegeproject/protege available] on GitHub.  Use the following Git command to get a local copy:
 +
 +
<pre>
 +
git clone https://github.com/protegeproject/protege.git protege
 +
</pre>
 +
 +
The source code for many Protege Desktop plug-ins has also been made available on GitHub under the [https://github.com/protegeproject Protege Project organization].
  
 
=== Building from source  ===
 
=== Building from source  ===
Details the steps necessary to download the Protege Desktop source code, and build a distribution from those sources.
+
The instructions for building from source are available on [https://github.com/protegeproject/protege/wiki/Building-from-Source GitHub].
  
To follow this step-by-step guide, you must have [http://maven.apache.org/ Maven] and [http://git-scm.com/ Git] installed.
+
=== Building with Eclipse and other IDEs ===
 +
We would welcome contributions from the community for setting up development environments other than Eclipse.
  
* Checkout the Protege Desktop source code, i.e., "git clone https://github.com/protegeproject/protege.git protege".
+
* [https://github.com/protegeproject/protege/wiki/Setup-in-Eclipse Building with Eclipse]
* Change into the protege directory.
 
* Type mvn clean install.
 
  
Once the build completes, a usable Protege Desktop installation will have been created in:
 
  
protege/protege-distribution/target/protege-distribution-${version}-bin/Protege
+
== Protege APIs ==
  
Use the run.bat or run.sh scripts to launch Protege Desktop.
+
The [[P4APIOverview|Protege API]] gives access to the ontology model and offers various utilities.  
  
 +
The Protege core and the OWL editor kit both provide a large number of [[P4UiComponentSummary|reuseable UI components]] and utilities for generating user interfaces for ontologies.
 +
 +
 +
== Developing a plugin ==
 +
 +
Protege has been written specifically to be modular. It uses the [http://www.osgi.org/About/Technology OSGi framework] as a plugin infrastructure.
 +
 +
When developing a plugin:
 +
 +
First, you should consider which type of plugin you want to build. The [[PluginTypes|plugin types page]] provides a list of plugin types that can be implemented in Protege.
 +
 +
Second, take a look and reuse the [https://github.com/protegeproject/protege-plugin-examples/ plugin examples] available on GitHub. The GitHub page also has documentation (see the readme file). Clone the project, and then adapt the plugin example that you would like to implement.
 +
 +
You may also look at the [[PluginAnatomy|Anatomy of a Plugin page]], which gives a quick start to writing a plugin for Protege. Although it was created for Protege 4 plugins, most things still apply to Protege 5 plugins.  The page starts with a guide to writing the empty (trivial) plugin in five minutes. Then it describes how some additional content can be added to the plugin. 
 +
 +
Once you have written a plugin you want people to use it. Some very simple steps allow you to advertise your plugin and [[EnablePluginAutoUpdate|enable auto-update]].
  
=== Building with Eclipse and other IDEs ===
 
We would welcome contributions from the community for setting up development environments other than Eclipse.
 
  
* [[CompileProtege5InEclipseWithMaven|Building with Eclipse]]
+
==Embedded OSGi==
  
 +
For people embedding Protege services inside a non-OSGi based applications, [[Embedding OSGi|here]] is a short example showing how this can work.
  
=== Client-server ===
+
== Client-server ==
 
* [[Protege_5_Development_Environment|Setting up a development environment for the OWL Ontology Server]]
 
* [[Protege_5_Development_Environment|Setting up a development environment for the OWL Ontology Server]]
 
* [[Protege_Server_design|OWL Ontology Server design]]
 
* [[Protege_Server_design|OWL Ontology Server design]]
 +
 +
== Troubleshooting ==
 +
* [[SolvingClassLoaderProblems|Troubleshooting class loader issues]]
 +
 +
== Contributing ==
 +
 +
'''Please share.'''
 +
It is surprising how many people have written plugins for Protege that we just don't hear about.<br />
 +
If you wish to publish to the community, please see our notes on [[Protege4Contributing|code contributions]].
 +
 +
== Getting help==
 +
 +
If you need additional support, please contact us via the [http://protege.stanford.edu/support.php protege-dev] mailing list. You need to be [https://mailman.stanford.edu/mailman/listinfo/protege-dev subscribed] in order to post to the list. In your post, please provide a detailed description of the problem, the steps to reproduce it, and any exception traces or logs that are relevant.

Latest revision as of 22:19, May 23, 2016

Protege 5 Developer Documentation

This page is a top-level entry point for all developer documentation related to the Protege Desktop application, versions 5.0 and above.




Building

Accessing the source code

Protege Desktop is open source and the code is freely available on GitHub. Use the following Git command to get a local copy:

git clone https://github.com/protegeproject/protege.git protege

The source code for many Protege Desktop plug-ins has also been made available on GitHub under the Protege Project organization.

Building from source

The instructions for building from source are available on GitHub.

Building with Eclipse and other IDEs

We would welcome contributions from the community for setting up development environments other than Eclipse.


Protege APIs

The Protege API gives access to the ontology model and offers various utilities.

The Protege core and the OWL editor kit both provide a large number of reuseable UI components and utilities for generating user interfaces for ontologies.


Developing a plugin

Protege has been written specifically to be modular. It uses the OSGi framework as a plugin infrastructure.

When developing a plugin:

First, you should consider which type of plugin you want to build. The plugin types page provides a list of plugin types that can be implemented in Protege.

Second, take a look and reuse the plugin examples available on GitHub. The GitHub page also has documentation (see the readme file). Clone the project, and then adapt the plugin example that you would like to implement.

You may also look at the Anatomy of a Plugin page, which gives a quick start to writing a plugin for Protege. Although it was created for Protege 4 plugins, most things still apply to Protege 5 plugins. The page starts with a guide to writing the empty (trivial) plugin in five minutes. Then it describes how some additional content can be added to the plugin.

Once you have written a plugin you want people to use it. Some very simple steps allow you to advertise your plugin and enable auto-update.


Embedded OSGi

For people embedding Protege services inside a non-OSGi based applications, here is a short example showing how this can work.

Client-server

Troubleshooting

Contributing

Please share. It is surprising how many people have written plugins for Protege that we just don't hear about.
If you wish to publish to the community, please see our notes on code contributions.

Getting help

If you need additional support, please contact us via the protege-dev mailing list. You need to be subscribed in order to post to the list. In your post, please provide a detailed description of the problem, the steps to reproduce it, and any exception traces or logs that are relevant.