-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 935a81d
Showing
9 changed files
with
242 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Maven | ||
target/ | ||
|
||
# Eclipse | ||
.classpath | ||
.project | ||
.settings/ | ||
META-INF/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# swrltab-plugin | ||
|
||
This repository contains the OWLAPI-based SWRLTab plugin for the Protege Desktop ontology | ||
editor (*versions 5.0 and higher*). | ||
|
||
The Maven POM file in the top-level directory packages the plug-in code into the required OSGi bundle format | ||
using the [Maven Bundle Plugin](http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html). | ||
|
||
#### Prerequisites | ||
|
||
To build and run this plugin, you must have the following items installed: | ||
|
||
+ Apache's [Maven](http://maven.apache.org/index.html). | ||
+ A tool for checking out a [Git](http://git-scm.com/) repository. | ||
+ A Protege distribution (5.0 beta or higher) [Protege 5.0.0 beta SNAPSHOT builds](http://protege.stanford.edu/download/protege/5.0/snapshots/). | ||
|
||
#### Build and install the SWRLTab plug-in | ||
|
||
1. Get a copy of the example code: | ||
|
||
git clone https://github.com/protegeproject/swrltab-plugin.git swrltab-plugin | ||
|
||
2. Change into the swrltab-plugin directory. | ||
|
||
3. Type mvn clean package. On build completion, the "target" directory will contain a swrltab-plugin-${version}.jar file. | ||
|
||
4. Copy the JAR file from the target directory to the "plugins" subdirectory of your Protege distribution (e.g., | ||
/Applications/Protege_5.0_beta/plugins/) | ||
|
||
#### View the Plugin in Protege | ||
|
||
Launch your Protege distribution. Select About Protege from the Protege menu to verify successful installation: | ||
|
||
The bundle contains: | ||
|
||
+ Two custom tabs - "SWRLTab" and "SQWRLTab". Enable either tab via the Window | Tabs menu. | ||
|
||
#### Example plug-in screenshots | ||
|
||
SWRLTab: | ||
|
||
 | ||
|
||
SQWRLTab: | ||
|
||
 | ||
|
||
#### Questions | ||
|
||
If you have questions about this plug-in, please navigate to the main | ||
Protege website and subscribe to the [Protege Developer Support | ||
mailing list](http://protege.stanford.edu/support.php#mailingListSupport). | ||
After subscribing, send messages to protege-dev at lists.stanford.edu. | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<?eclipse version="3.0"?> | ||
|
||
<plugin> | ||
|
||
<extension id="SWRLTab" point="org.protege.editor.core.application.WorkspaceTab"> | ||
<label value="SWRLTab"/> | ||
<class value="org.swrltab.ui.SWRLTab"/> | ||
<index value="X"/> | ||
<editorKitId value="OWLEditorKit"/> | ||
</extension> | ||
|
||
<extension id="SQWRLTab" point="org.protege.editor.core.application.WorkspaceTab"> | ||
<label value="SQWRLTab"/> | ||
<class value="org.swrltab.ui.SQWRLTab"/> | ||
<index value="Y"/> | ||
<editorKitId value="OWLEditorKit"/> | ||
</extension> | ||
|
||
</plugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.swrltab</groupId> | ||
<artifactId>swrltab-plugin</artifactId> | ||
<version>1.0</version> | ||
<name>SWRLTab Plugin</name> | ||
<description>SWRLTab Plugin for Desktop Protege, 5.0 and later</description> | ||
<packaging>bundle</packaging> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>net.sourceforge.owlapi</groupId> | ||
<artifactId>owlapi-distribution</artifactId> | ||
<version>3.5.0</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>edu.stanford.protege</groupId> | ||
<artifactId>org.protege.editor.owl</artifactId> | ||
<version>4.3.0</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.1</version> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<version>2.4.0</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<instructions> | ||
<Bundle-Activator>org.protege.editor.owl.ProtegeOWL</Bundle-Activator> | ||
<Bundle-ClassPath>.</Bundle-ClassPath> | ||
<Bundle-SymbolicName>${project.artifactId};singleton:=true</Bundle-SymbolicName> | ||
<Bundle-Vendor>The Protege Development Team</Bundle-Vendor> | ||
<Import-Package> | ||
org.apache.log4j.*;version="[1.2,2)", | ||
org.protege.editor.owl.*;version="5.0", <!-- equivalent to [5.0,infinity) --> | ||
* | ||
</Import-Package> | ||
<Include-Resource>plugin.xml, {maven-resources}</Include-Resource> | ||
</instructions> | ||
<executions> | ||
<execution> | ||
<id>bundle-manifest</id> | ||
<phase>install</phase> | ||
<goals> | ||
<goal>manifest</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-eclipse-plugin</artifactId> | ||
<version>2.9</version> | ||
<configuration> | ||
<pde>true</pde> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
|
||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | ||
|
||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> | ||
|
||
<appender name="console" class="org.apache.log4j.ConsoleAppender"> | ||
<param name="Target" value="System.out" /> | ||
<layout class="org.apache.log4j.PatternLayout"> | ||
<param name="ConversionPattern" value="%-5p %c{1} - %m%n" /> | ||
</layout> | ||
</appender> | ||
|
||
<root> | ||
<priority value ="info" /> | ||
<appender-ref ref="console" /> | ||
</root> | ||
|
||
</log4j:configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.swrltab.ui; | ||
|
||
import org.apache.log4j.Logger; | ||
import org.protege.editor.owl.ui.OWLWorkspaceViewsTab; | ||
|
||
public class SQWRLTab extends OWLWorkspaceViewsTab | ||
{ | ||
private static final Logger log = Logger.getLogger(SQWRLTab.class); | ||
private static final long serialVersionUID = 1L; | ||
|
||
public SQWRLTab() | ||
{ | ||
setToolTipText("SQWRLTab"); | ||
} | ||
|
||
@Override | ||
public void initialise() | ||
{ | ||
super.initialise(); | ||
log.info("SQWRLTab initialized"); | ||
} | ||
|
||
@Override | ||
public void dispose() | ||
{ | ||
super.dispose(); | ||
log.info("SQWRLTab disposed"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.swrltab.ui; | ||
|
||
import org.apache.log4j.Logger; | ||
import org.protege.editor.owl.ui.OWLWorkspaceViewsTab; | ||
|
||
public class SWRLTab extends OWLWorkspaceViewsTab | ||
{ | ||
private static final Logger log = Logger.getLogger(SWRLTab.class); | ||
private static final long serialVersionUID = 1L; | ||
|
||
public SWRLTab() | ||
{ | ||
setToolTipText("SWRLTab"); | ||
} | ||
|
||
@Override | ||
public void initialise() | ||
{ | ||
super.initialise(); | ||
log.info("SWRLTab initialized"); | ||
} | ||
|
||
@Override | ||
public void dispose() | ||
{ | ||
super.dispose(); | ||
log.info("SWRLTab disposed"); | ||
} | ||
} |