-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
8 changed files
with
446 additions
and
2 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
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,238 @@ | ||
<?xml version = "1.0" encoding = "utf-8"?> | ||
|
||
<project name = "Protege OWL Diff Plugin" default = "install" basedir = "."> | ||
|
||
<!-- | ||
To run this build file set the environment variable | ||
PROTEGE_HOME to point to a protege distribution and type ant | ||
install or jar. | ||
--> | ||
|
||
<property environment="env"/> | ||
<property name = "protege.home" location="${env.PROTEGE_HOME}"/> | ||
<property file="${protege.home}/build.properties"/> | ||
<property file="local.properties"/> | ||
|
||
<property file="version.properties"/> | ||
<property name="major.version" value="1"/> | ||
<property name="minor.version" value="0"/> | ||
<property name="micro.version" value="0"/> | ||
|
||
<property name = "plugin" value = "org.protege.editor.owl.diff"/> | ||
|
||
|
||
<!-- | ||
these properties probably don't need changing | ||
--> | ||
<property name = "src" location = "./src"/> | ||
<property name = "build" location = "./build"/> | ||
<property name = "classes" location = "${build}/classes"/> | ||
<property name = "lib" location = "./lib"/> | ||
<property name = "genlib" location = "${build}/lib"/> | ||
<property name = "manifest" location = "${build}/manifest.mf"/> | ||
|
||
<property name = "protege.common" location="${protege.home}/bundles"/> | ||
<property name = "protege.plugins" location="${protege.home}/plugins"/> | ||
|
||
<property name="equinox.common" | ||
location="${protege.common}/org.eclipse.equinox.common.jar"/> | ||
<property name="equinox.registry" | ||
location="${protege.common}/org.eclipse.equinox.registry.jar"/> | ||
<property name="protege.lib" | ||
location="${protege.common}/org.protege.editor.core.application.jar"/> | ||
<property name="common.lib" | ||
location="${protege.common}/org.protege.common.jar"/> | ||
|
||
<property name="owl.lib" | ||
location="${protege.plugins}/org.semanticweb.owl.owlapi.jar"/> | ||
|
||
<property name="owl.editor.jar" | ||
location="${protege.plugins}/org.protege.editor.owl.jar"/> | ||
|
||
<property name="owl.diff.lib" | ||
location="${protege.plugins}/org.protege.owl.diff.jar"/> | ||
|
||
<target name = "init"> | ||
<tstamp> | ||
<format property="build.time" pattern="yyyy_MM_dd_hhmm"/> | ||
</tstamp> | ||
<property name="bundle.version" | ||
value="${major.version}.${minor.version}.${micro.version}.${build.time}"/> | ||
<mkdir dir = "${build}"/> | ||
<mkdir dir = "${classes}"/> | ||
<mkdir dir = "${classes}/lib"/> | ||
<mkdir dir = "${genlib}"/> | ||
</target> | ||
|
||
<!-- ============================================================= --> | ||
<!-- Configuring the Compile Classpath --> | ||
<!-- ============================================================= --> | ||
|
||
|
||
<target name="checkProtegeLibsAndReport" depends="checkProtegeLibs" | ||
unless="libs.found"> | ||
<echo message="Missing protege libraries. You need to set "/> | ||
<echo message="the PROTEGE_HOME environment variable to a"/> | ||
<echo message="protege installation directory where the"/> | ||
<echo message="appropriate plugins have been installed."/> | ||
<echo message="Alternatively set the jar libs in local.properties (protege.lib=...)"/> | ||
<echo message="Use the -v option to ant to see what jars are missing."/> | ||
<fail message = "missing protege libraries"/> | ||
</target> | ||
|
||
<target name = "checkProtegeLibs" depends="init"> | ||
<echo message="**********************************************************"/> | ||
<echo message="Using Protege Home = ${protege.home}"/> | ||
<echo message="Using Java Version = ${ant.java.version}" /> | ||
<echo message="**********************************************************"/> | ||
<condition property="libs.found"> | ||
<and> | ||
<available file="${protege.osgi}" type="file"/> | ||
<available file="${equinox.common}" type = "file"/> | ||
<available file="${equinox.registry}" type = "file"/> | ||
<available file="${owl.editor.jar}" type = "file"/> | ||
<available file="${owl.lib}" type="file"/> | ||
<available file="${owl.diff.lib}" type="file"/> | ||
</and> | ||
</condition> | ||
<path id = "project.classpath"> | ||
<pathelement location="${protege.osgi}"/> | ||
<pathelement location="${protege.lib}"/> | ||
<pathelement location="${equinox.common}"/> | ||
<pathelement location="${equinox.registry}"/> | ||
<pathelement location="${owl.editor.jar}"/> | ||
<pathelement location="${owl.lib}"/> | ||
<pathelement location="${owl.diff.lib}"/> | ||
<fileset dir="${genlib}"/> | ||
</path> | ||
</target> | ||
|
||
<target name = "buildlibs" depends="checkProtegeLibsAndReport"> | ||
<unjar dest="${build}" | ||
src="${common.lib}"> | ||
<patternset> | ||
<include name = "**/log4j.jar"/> | ||
<include name = "**/looks.jar"/> | ||
</patternset> | ||
</unjar> | ||
</target> | ||
|
||
|
||
<target name="build.manifest"> | ||
<copy tofile="${manifest}" | ||
file="META-INF/MANIFEST.MF" overwrite="true"/> | ||
<manifest file="${manifest}" | ||
mode = "update"> | ||
<attribute name="Built-By" value = "${user.name}"/> | ||
<attribute name="Bundle-Version" value="${bundle.version}"/> | ||
</manifest> | ||
</target> | ||
|
||
<target name="copy.resources" depends="build.manifest"> | ||
<copy todir="${classes}"> | ||
<fileset dir="${src}"> | ||
<include name="**/*"/> | ||
<exclude name="**/*.java"/> | ||
<exclude name="**/MANIFEST.MF"/> | ||
<exclude name="**/manifest.mf"/> | ||
</fileset> | ||
</copy> | ||
<copy todir="${classes}"> | ||
<fileset dir="." includes="*.xml"> | ||
<exclude name="build.xml"/> | ||
</fileset> | ||
</copy> | ||
<!-- the manifest doesn't belong here but this is good for IDE's --> | ||
<mkdir dir="${classes}/META-INF"/> | ||
<copy todir="${classes}/META-INF" | ||
file = "${manifest}"/> | ||
</target> | ||
|
||
<target name = "create.update.properties" depends="init"> | ||
<property name="update.properties.file" | ||
location="${build}/update.properties"/> | ||
<echo file="${update.properties.file}" append="false"> | ||
id=${plugin} | ||
version=${bundle.version} | ||
download=http://smi-protege.stanford.edu/protege4/plugins/4.1/${plugin}.jar | ||
name=Protege OWL Diff Plugin | ||
readme=http://smi-protege.stanford.edu/protege4/plugins/4.1/owldiff-plugin-readme.html | ||
license=http://www.gnu.org/licenses/lgpl.html | ||
author=The Protege Development Team | ||
</echo> | ||
</target> | ||
|
||
<target name = "compile" depends = "buildlibs, checkProtegeLibsAndReport"> | ||
<javac srcdir = "${src}" | ||
destdir = "${classes}" | ||
debug="on" | ||
includeAntRuntime="false"> | ||
<classpath refid = "project.classpath"/> | ||
</javac> | ||
</target> | ||
|
||
<target name = "jar" depends = "compile, copy.resources, create.update.properties"> | ||
<jar jarfile = "${build}/${plugin}.jar" | ||
basedir = "${classes}" | ||
manifest = "${build}/manifest.mf"/> | ||
</target> | ||
|
||
<target name = "install" depends = "jar"> | ||
<!-- flush cache --> | ||
<delete dir = "${protege.home}/configuration/org.eclipse.core.runtime"/> | ||
<delete dir = "${protege.home}/configuration/org.eclipse.osgi"/> | ||
<copy file="${build}/${plugin}.jar" | ||
todir = "${protege.plugins}" | ||
overwrite = "true"/> | ||
</target> | ||
|
||
<!-- =================================================================== --> | ||
<!-- RUN --> | ||
<!-- =================================================================== --> | ||
<target name = "run" depends="init"> | ||
<java fork = "true" dir = "${protege.home}" | ||
classname = "org.protege.osgi.framework.Launcher"> | ||
<jvmarg value = "-Dlog4j.configuration=file:log4j.xml"/> | ||
<jvmarg value = "-Xmx1500M"/> | ||
<classpath> | ||
<pathelement path="${protege.osgi}"/> | ||
<pathelement path="${protege.launcher}"/> | ||
</classpath> | ||
</java> | ||
</target> | ||
|
||
<!-- =================================================================== --> | ||
<!-- DEBUG --> | ||
<!-- =================================================================== --> | ||
<target name = "debug" depends="init"> | ||
<java fork = "true" dir = "${protege.home}" | ||
classname = "org.protege.osgi.framework.Launcher"> | ||
<jvmarg value = "-Dlog4j.configuration=file:log4j.xml"/> | ||
<jvmarg value = "-agentlib:jdwp=transport=dt_socket,address=8500,server=y,suspend=y"/> | ||
<jvmarg value = "-Xmx1500M"/> | ||
<classpath> | ||
<pathelement path="${protege.osgi}"/> | ||
<pathelement path="${protege.launcher}"/> | ||
</classpath> | ||
</java> | ||
</target> | ||
|
||
|
||
<target name = "clean"> | ||
<delete dir = "${build}"/> | ||
</target> | ||
|
||
|
||
<target name = "usage"> | ||
<echo message = "To run this script set the PROTEGE_HOME environment"/> | ||
<echo message = "variable and use one of the following targets"/> | ||
<echo message = "jar - builds the jar (bundle) file for this project"/> | ||
<echo message = "install - installs the bundle into the Protege distribution"/> | ||
<echo message = "copy.resources - copyies resources into the classes directory"/> | ||
<echo message = " this can be useful for ide developers - see the wiki"/> | ||
<echo message = "run - runs Protege (requires that Protege has been installed)"/> | ||
<echo message = "debug - starts Protege with the debugger using port 8500"/> | ||
</target> | ||
|
||
|
||
</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
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,102 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<!-- Schema file written by PDE --> | ||
<schema targetNamespace="org.protege.editor.owl.diff" xmlns="http://www.w3.org/2001/XMLSchema"> | ||
<annotation> | ||
<appInfo> | ||
<meta.schema plugin="org.protege.editor.owl.diff" id="analysis_algorithm" name="analysis_algorithm"/> | ||
</appInfo> | ||
<documentation> | ||
[Enter description of this extension point.] | ||
</documentation> | ||
</annotation> | ||
|
||
<element name="extension"> | ||
<annotation> | ||
<appInfo> | ||
<meta.element /> | ||
</appInfo> | ||
</annotation> | ||
<complexType> | ||
<sequence> | ||
<element ref="class"/> | ||
</sequence> | ||
<attribute name="point" type="string" use="required"> | ||
<annotation> | ||
<documentation> | ||
|
||
</documentation> | ||
</annotation> | ||
</attribute> | ||
<attribute name="id" type="string"> | ||
<annotation> | ||
<documentation> | ||
|
||
</documentation> | ||
</annotation> | ||
</attribute> | ||
<attribute name="name" type="string"> | ||
<annotation> | ||
<documentation> | ||
|
||
</documentation> | ||
<appInfo> | ||
<meta.attribute translatable="true"/> | ||
</appInfo> | ||
</annotation> | ||
</attribute> | ||
</complexType> | ||
</element> | ||
|
||
<element name="class"> | ||
<complexType> | ||
<attribute name="value" type="string" use="required"> | ||
<annotation> | ||
<documentation> | ||
|
||
</documentation> | ||
<appInfo> | ||
<meta.attribute kind="java" basedOn=":org.protege.owl.diff.analyzer.AnalyzerAlgorithm"/> | ||
</appInfo> | ||
</annotation> | ||
</attribute> | ||
</complexType> | ||
</element> | ||
|
||
<annotation> | ||
<appInfo> | ||
<meta.section type="since"/> | ||
</appInfo> | ||
<documentation> | ||
[Enter the first release in which this extension point appears.] | ||
</documentation> | ||
</annotation> | ||
|
||
<annotation> | ||
<appInfo> | ||
<meta.section type="examples"/> | ||
</appInfo> | ||
<documentation> | ||
[Enter extension point usage example here.] | ||
</documentation> | ||
</annotation> | ||
|
||
<annotation> | ||
<appInfo> | ||
<meta.section type="apiinfo"/> | ||
</appInfo> | ||
<documentation> | ||
[Enter API information here.] | ||
</documentation> | ||
</annotation> | ||
|
||
<annotation> | ||
<appInfo> | ||
<meta.section type="implementation"/> | ||
</appInfo> | ||
<documentation> | ||
[Enter information about supplied implementation of this extension point.] | ||
</documentation> | ||
</annotation> | ||
|
||
|
||
</schema> |
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
Oops, something went wrong.