You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by en...@apache.org on 2011/04/01 14:47:56 UTC
svn commit: r1087688 [10/19] - in /incubator/stanbol/trunk/rules: ./ base/
base/.settings/ base/src/ base/src/main/ base/src/main/java/
base/src/main/java/org/ base/src/main/java/org/apache/
base/src/main/java/org/apache/stanbol/ base/src/main/java/org...
Added: incubator/stanbol/trunk/rules/web/.classpath
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/web/.classpath?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/web/.classpath (added)
+++ incubator/stanbol/trunk/rules/web/.classpath Fri Apr 1 12:47:48 2011
@@ -0,0 +1,174 @@
+<classpath>
+ <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+ <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+ <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar" sourcepath="M2_REPO/javax/activation/activation/1.1/activation-1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/asm/asm/3.1/asm-3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-discovery/commons-discovery/0.4/commons-discovery-0.4.jar" sourcepath="M2_REPO/commons-discovery/commons-discovery/0.4/commons-discovery-0.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.4/commons-io-1.4.jar" sourcepath="M2_REPO/commons-io/commons-io/1.4/commons-io-1.4-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/freemarker/freemarker/2.3.9/freemarker-2.3.9.jar" sourcepath="M2_REPO/org/freemarker/freemarker/2.3.9/freemarker-2.3.9-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/hermit/hermit/1.2.4/hermit-1.2.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.0/httpcore-4.0.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpcore/4.0/httpcore-4.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/ibm/icu/icu4j/3.4.4/icu4j-3.4.4.jar" sourcepath="M2_REPO/com/ibm/icu/icu4j/3.4.4/icu4j-3.4.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/hp/hpl/jena/iri/0.7/iri-0.7.jar" sourcepath="M2_REPO/com/hp/hpl/jena/iri/0.7/iri-0.7-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/com/hp/hpl/jena/iri/0.7/iri-0.7-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/jackson/jackson-core-asl/1.1.1/jackson-core-asl-1.1.1.jar" sourcepath="M2_REPO/org/codehaus/jackson/jackson-core-asl/1.1.1/jackson-core-asl-1.1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/hp/hpl/jena/jena/2.6.2/jena-2.6.2.jar" sourcepath="M2_REPO/com/hp/hpl/jena/jena/2.6.2/jena-2.6.2-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/com/hp/hpl/jena/jena/2.6.2/jena-2.6.2-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-client/1.1.5.1/jersey-client-1.1.5.1.jar" sourcepath="M2_REPO/com/sun/jersey/jersey-client/1.1.5.1/jersey-client-1.1.5.1-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/com/sun/jersey/jersey-client/1.1.5.1/jersey-client-1.1.5.1-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-core/1.1.5.1/jersey-core-1.1.5.1.jar" sourcepath="M2_REPO/com/sun/jersey/jersey-core/1.1.5.1/jersey-core-1.1.5.1-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/com/sun/jersey/jersey-core/1.1.5.1/jersey-core-1.1.5.1-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-json/1.1.5.1/jersey-json-1.1.5.1.jar" sourcepath="M2_REPO/com/sun/jersey/jersey-json/1.1.5.1/jersey-json-1.1.5.1-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/com/sun/jersey/jersey-json/1.1.5.1/jersey-json-1.1.5.1-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-server/1.1.5.1/jersey-server-1.1.5.1.jar" sourcepath="M2_REPO/com/sun/jersey/jersey-server/1.1.5.1/jersey-server-1.1.5.1-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/com/sun/jersey/jersey-server/1.1.5.1/jersey-server-1.1.5.1-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/jettison/jettison/1.2/jettison-1.2.jar" sourcepath="M2_REPO/org/codehaus/jettison/jettison/1.2/jettison-1.2-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/codehaus/jettison/jettison/1.2/jettison-1.2-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty/6.1.22/jetty-6.1.22.jar" sourcepath="M2_REPO/org/mortbay/jetty/jetty/6.1.22/jetty-6.1.22-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty-util/6.1.22/jetty-util-6.1.22.jar" sourcepath="M2_REPO/org/mortbay/jetty/jetty-util/6.1.22/jetty-util-6.1.22-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.jar" sourcepath="M2_REPO/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/4.7/junit-4.7.jar" sourcepath="M2_REPO/junit/junit/4.7/junit-4.7-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13.jar" sourcepath="M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mockito/mockito-all/1.6/mockito-all-1.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/base/ops4j-base-io/1.2.1/ops4j-base-io-1.2.1.jar" sourcepath="M2_REPO/org/ops4j/base/ops4j-base-io/1.2.1/ops4j-base-io-1.2.1-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/ops4j/base/ops4j-base-io/1.2.1/ops4j-base-io-1.2.1-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/base/ops4j-base-lang/1.2.1/ops4j-base-lang-1.2.1.jar" sourcepath="M2_REPO/org/ops4j/base/ops4j-base-lang/1.2.1/ops4j-base-lang-1.2.1-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/ops4j/base/ops4j-base-lang/1.2.1/ops4j-base-lang-1.2.1-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/base/ops4j-base-monitors/1.2.1/ops4j-base-monitors-1.2.1.jar" sourcepath="M2_REPO/org/ops4j/base/ops4j-base-monitors/1.2.1/ops4j-base-monitors-1.2.1-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/ops4j/base/ops4j-base-monitors/1.2.1/ops4j-base-monitors-1.2.1-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/base/ops4j-base-net/1.2.1/ops4j-base-net-1.2.1.jar" sourcepath="M2_REPO/org/ops4j/base/ops4j-base-net/1.2.1/ops4j-base-net-1.2.1-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/ops4j/base/ops4j-base-net/1.2.1/ops4j-base-net-1.2.1-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/base/ops4j-base-store/1.2.1/ops4j-base-store-1.2.1.jar" sourcepath="M2_REPO/org/ops4j/base/ops4j-base-store/1.2.1/ops4j-base-store-1.2.1-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/ops4j/base/ops4j-base-store/1.2.1/ops4j-base-store-1.2.1-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/apache/clerezza/org.apache.clerezza.jaxrs.rdf.providers/0.13-incubating-SNAPSHOT/org.apache.clerezza.jaxrs.rdf.providers-0.13-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/clerezza/org.apache.clerezza.jaxrs.rdf.providers/0.13-incubating-SNAPSHOT/org.apache.clerezza.jaxrs.rdf.providers-0.13-incubating-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.core/0.12-incubating-SNAPSHOT/org.apache.clerezza.rdf.core-0.12-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.core/0.12-incubating-SNAPSHOT/org.apache.clerezza.rdf.core-0.12-incubating-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.core.test/0.13-incubating-SNAPSHOT/org.apache.clerezza.rdf.core.test-0.13-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.core.test/0.13-incubating-SNAPSHOT/org.apache.clerezza.rdf.core.test-0.13-incubating-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.jena.commons/0.5-incubating-SNAPSHOT/org.apache.clerezza.rdf.jena.commons-0.5-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.jena.commons/0.5-incubating-SNAPSHOT/org.apache.clerezza.rdf.jena.commons-0.5-incubating-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.jena.facade/0.12-incubating-SNAPSHOT/org.apache.clerezza.rdf.jena.facade-0.12-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.jena.facade/0.12-incubating-SNAPSHOT/org.apache.clerezza.rdf.jena.facade-0.12-incubating-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.jena.serializer/0.9-incubating-SNAPSHOT/org.apache.clerezza.rdf.jena.serializer-0.9-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.jena.serializer/0.9-incubating-SNAPSHOT/org.apache.clerezza.rdf.jena.serializer-0.9-incubating-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.ontologies/0.11-incubating-SNAPSHOT/org.apache.clerezza.rdf.ontologies-0.11-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.ontologies/0.11-incubating-SNAPSHOT/org.apache.clerezza.rdf.ontologies-0.11-incubating-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.rdfjson/0.3-incubating-SNAPSHOT/org.apache.clerezza.rdf.rdfjson-0.3-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.rdfjson/0.3-incubating-SNAPSHOT/org.apache.clerezza.rdf.rdfjson-0.3-incubating-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.utils/0.13-incubating-SNAPSHOT/org.apache.clerezza.rdf.utils-0.13-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/clerezza/org.apache.clerezza.rdf.utils/0.13-incubating-SNAPSHOT/org.apache.clerezza.rdf.utils-0.13-incubating-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/clerezza/org.apache.clerezza.utils/0.1-incubating-SNAPSHOT/org.apache.clerezza.utils-0.1-incubating-SNAPSHOT.jar" sourcepath="M2_REPO/org/apache/clerezza/org.apache.clerezza.utils/0.1-incubating-SNAPSHOT/org.apache.clerezza.utils-0.1-incubating-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/felix/org.apache.felix.scr.annotations/1.2.0/org.apache.felix.scr.annotations-1.2.0.jar" sourcepath="M2_REPO/org/apache/felix/org.apache.felix.scr.annotations/1.2.0/org.apache.felix.scr.annotations-1.2.0-sources.jar"/>
+ <classpathentry kind="src" path="/org.apache.stanbol.kres.jersey"/>
+ <classpathentry kind="src" path="/org.apache.stanbol.ontologymanager.ontonet"/>
+ <classpathentry kind="src" path="/org.apache.stanbol.owlapi"/>
+ <classpathentry kind="src" path="/org.apache.stanbol.reasoners.base"/>
+ <classpathentry kind="src" path="/org.apache.stanbol.rules.base"/>
+ <classpathentry kind="src" path="/org.apache.stanbol.rules.manager"/>
+ <classpathentry kind="src" path="/org.apache.stanbol.rules.refactor"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/clerezza/ext/org.json.simple/0.3-incubating-SNAPSHOT/org.json.simple-0.3-incubating-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/osgi/org.osgi.compendium/4.1.0/org.osgi.compendium-4.1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/felix/org.osgi.core/1.4.0/org.osgi.core-1.4.0.jar" sourcepath="M2_REPO/org/apache/felix/org.osgi.core/1.4.0/org.osgi.core-1.4.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/osgi/org.osgi.core/4.1.0/org.osgi.core-4.1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/owl-link/owl-link/1.0.2/owl-link-1.0.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/owlapi/owlapi/3.0.0/owlapi-3.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/pax/exam/pax-exam/1.2.0/pax-exam-1.2.0.jar" sourcepath="M2_REPO/org/ops4j/pax/exam/pax-exam/1.2.0/pax-exam-1.2.0-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/ops4j/pax/exam/pax-exam/1.2.0/pax-exam-1.2.0-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/pax/exam/pax-exam-container-default/1.2.0/pax-exam-container-default-1.2.0.jar" sourcepath="M2_REPO/org/ops4j/pax/exam/pax-exam-container-default/1.2.0/pax-exam-container-default-1.2.0-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/ops4j/pax/exam/pax-exam-container-default/1.2.0/pax-exam-container-default-1.2.0-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/pax/exam/pax-exam-container-rbc/1.2.0/pax-exam-container-rbc-1.2.0.jar" sourcepath="M2_REPO/org/ops4j/pax/exam/pax-exam-container-rbc/1.2.0/pax-exam-container-rbc-1.2.0-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/ops4j/pax/exam/pax-exam-container-rbc/1.2.0/pax-exam-container-rbc-1.2.0-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/pax/exam/pax-exam-container-rbc-client/1.2.0/pax-exam-container-rbc-client-1.2.0.jar" sourcepath="M2_REPO/org/ops4j/pax/exam/pax-exam-container-rbc-client/1.2.0/pax-exam-container-rbc-client-1.2.0-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/ops4j/pax/exam/pax-exam-container-rbc-client/1.2.0/pax-exam-container-rbc-client-1.2.0-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/pax/exam/pax-exam-junit/1.2.0/pax-exam-junit-1.2.0.jar" sourcepath="M2_REPO/org/ops4j/pax/exam/pax-exam-junit/1.2.0/pax-exam-junit-1.2.0-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/ops4j/pax/exam/pax-exam-junit/1.2.0/pax-exam-junit-1.2.0-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/pax/exam/pax-exam-junit-extender/1.2.0/pax-exam-junit-extender-1.2.0.jar" sourcepath="M2_REPO/org/ops4j/pax/exam/pax-exam-junit-extender/1.2.0/pax-exam-junit-extender-1.2.0-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/ops4j/pax/exam/pax-exam-junit-extender/1.2.0/pax-exam-junit-extender-1.2.0-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/pax/exam/pax-exam-runtime/1.2.0/pax-exam-runtime-1.2.0.jar" sourcepath="M2_REPO/org/ops4j/pax/exam/pax-exam-runtime/1.2.0/pax-exam-runtime-1.2.0-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/ops4j/pax/exam/pax-exam-runtime/1.2.0/pax-exam-runtime-1.2.0-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/pax/exam/pax-exam-spi/1.2.0/pax-exam-spi-1.2.0.jar" sourcepath="M2_REPO/org/ops4j/pax/exam/pax-exam-spi/1.2.0/pax-exam-spi-1.2.0-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/ops4j/pax/exam/pax-exam-spi/1.2.0/pax-exam-spi-1.2.0-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/ops4j/pax/runner/pax-runner-no-jcl/1.3.0/pax-runner-no-jcl-1.3.0.jar" sourcepath="M2_REPO/org/ops4j/pax/runner/pax-runner-no-jcl/1.3.0/pax-runner-no-jcl-1.3.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211.jar" sourcepath="M2_REPO/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211-sources.jar">
+ <attributes>
+ <attribute value="jar:file:/home/x-marley/.m2/repository/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211-javadoc.jar!/" name="javadoc_location"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.5.2/slf4j-api-1.5.2.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.5.2/slf4j-api-1.5.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-simple/1.5.2/slf4j-simple-1.5.2.jar" sourcepath="M2_REPO/org/slf4j/slf4j-simple/1.5.2/slf4j-simple-1.5.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/wymiwyg/wymiwyg-commons-core/0.7.5/wymiwyg-commons-core-0.7.5.jar" sourcepath="M2_REPO/org/wymiwyg/wymiwyg-commons-core/0.7.5/wymiwyg-commons-core-0.7.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.7.1/xercesImpl-2.7.1.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+</classpath>
\ No newline at end of file
Added: incubator/stanbol/trunk/rules/web/.project
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/web/.project?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/web/.project (added)
+++ incubator/stanbol/trunk/rules/web/.project Fri Apr 1 12:47:48 2011
@@ -0,0 +1,26 @@
+<projectDescription>
+ <name>org.apache.stanbol.rules.web</name>
+ <comment>Set of rst service to deal with rules and recipes. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <projects>
+ <project>org.apache.stanbol.kres.jersey</project>
+ <project>org.apache.stanbol.ontologymanager.ontonet</project>
+ <project>org.apache.stanbol.owlapi</project>
+ <project>org.apache.stanbol.reasoners.base</project>
+ <project>org.apache.stanbol.rules.base</project>
+ <project>org.apache.stanbol.rules.manager</project>
+ <project>org.apache.stanbol.rules.refactor</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Propchange: incubator/stanbol/trunk/rules/web/.settings/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr 1 12:47:48 2011
@@ -0,0 +1 @@
+target
Added: incubator/stanbol/trunk/rules/web/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/web/.settings/org.eclipse.jdt.core.prefs?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/web/.settings/org.eclipse.jdt.core.prefs (added)
+++ incubator/stanbol/trunk/rules/web/.settings/org.eclipse.jdt.core.prefs Fri Apr 1 12:47:48 2011
@@ -0,0 +1,6 @@
+#Wed Mar 23 17:40:21 GMT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6
Added: incubator/stanbol/trunk/rules/web/.settings/org.eclipse.m2e.core.prefs
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/web/.settings/org.eclipse.m2e.core.prefs?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/web/.settings/org.eclipse.m2e.core.prefs (added)
+++ incubator/stanbol/trunk/rules/web/.settings/org.eclipse.m2e.core.prefs Fri Apr 1 12:47:48 2011
@@ -0,0 +1,5 @@
+#Wed Mar 23 17:37:42 GMT 2011
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
Propchange: incubator/stanbol/trunk/rules/web/KReSConf/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr 1 12:47:48 2011
@@ -0,0 +1 @@
+target
Added: incubator/stanbol/trunk/rules/web/KReSConf/rmi_config.owl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/web/KReSConf/rmi_config.owl?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/web/KReSConf/rmi_config.owl (added)
+++ incubator/stanbol/trunk/rules/web/KReSConf/rmi_config.owl Fri Apr 1 12:47:48 2011
@@ -0,0 +1,174 @@
+<?xml version="1.0"?>
+<rdf:RDF xmlns="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#"
+ xml:base="http://kres.iks-project.eu/ontology/meta/rmi_config.owl"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:sequence="http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#"
+ xmlns:owl="http://www.w3.org/2002/07/owl#"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rmi="http://kres.iks-project.eu/ontology/meta/rmi.owl#">
+ <owl:Ontology rdf:about="http://kres.iks-project.eu/ontology/meta/rmi_config.owl">
+ <owl:imports rdf:resource="http://ontologydesignpatterns.org/ont/iks/kres/rmi.owl"/>
+ </owl:Ontology>
+
+
+
+ <!--
+ ///////////////////////////////////////////////////////////////////////////////////////
+ //
+ // Object Properties
+ //
+ ///////////////////////////////////////////////////////////////////////////////////////
+ -->
+
+
+
+
+ <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#endWith -->
+
+ <owl:ObjectProperty rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#endWith"/>
+
+
+
+ <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#hasRule -->
+
+ <owl:ObjectProperty rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#hasRule"/>
+
+
+
+ <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#startWith -->
+
+ <owl:ObjectProperty rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#startWith"/>
+
+
+
+ <!-- http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#directlyPrecedes -->
+
+ <owl:ObjectProperty rdf:about="http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#directlyPrecedes"/>
+
+
+
+ <!--
+ ///////////////////////////////////////////////////////////////////////////////////////
+ //
+ // Data properties
+ //
+ ///////////////////////////////////////////////////////////////////////////////////////
+ -->
+
+
+
+
+ <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#hasBodyAndHead -->
+
+ <owl:DatatypeProperty rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#hasBodyAndHead"/>
+
+
+
+ <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#hasDescription -->
+
+ <owl:DatatypeProperty rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#hasDescription"/>
+
+
+
+ <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#hasSequence -->
+
+ <owl:DatatypeProperty rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#hasSequence"/>
+
+
+
+ <!--
+ ///////////////////////////////////////////////////////////////////////////////////////
+ //
+ // Classes
+ //
+ ///////////////////////////////////////////////////////////////////////////////////////
+ -->
+
+
+
+
+ <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#KReSRule -->
+
+ <owl:Class rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#KReSRule"/>
+
+
+
+ <!-- http://kres.iks-project.eu/ontology/meta/rmi.owl#Recipe -->
+
+ <owl:Class rdf:about="http://kres.iks-project.eu/ontology/meta/rmi.owl#Recipe"/>
+
+
+
+ <!--
+ ///////////////////////////////////////////////////////////////////////////////////////
+ //
+ // Individuals
+ //
+ ///////////////////////////////////////////////////////////////////////////////////////
+ -->
+
+
+
+
+ <!-- http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRecipeA -->
+
+ <owl:NamedIndividual rdf:about="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRecipeA">
+ <rdf:type rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi.owl#Recipe"/>
+ <rmi:hasDescription rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Some description here</rmi:hasDescription>
+ <rmi:hasSequence rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleB, http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleA</rmi:hasSequence>
+ <rmi:hasRule rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleA"/>
+ <rmi:endWith rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleA"/>
+ <rmi:hasRule rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleB"/>
+ <rmi:startWith rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleB"/>
+ </owl:NamedIndividual>
+
+
+
+ <!-- http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleA -->
+
+ <owl:NamedIndividual rdf:about="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleA">
+ <rdf:type rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi.owl#KReSRule"/>
+ <rmi:hasDescription rdf:datatype="http://www.w3.org/2001/XMLSchema#string">An example of description for my rule A</rmi:hasDescription>
+ <rmi:hasBodyAndHead rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BodyA -> BodyB</rmi:hasBodyAndHead>
+ </owl:NamedIndividual>
+
+
+
+ <!-- http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleB -->
+
+ <owl:NamedIndividual rdf:about="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleB">
+ <rdf:type rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi.owl#KReSRule"/>
+ <rmi:hasDescription rdf:datatype="http://www.w3.org/2001/XMLSchema#string">An example of description..for my rule B</rmi:hasDescription>
+ <rmi:hasBodyAndHead rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BodyB -> HeadB</rmi:hasBodyAndHead>
+ <sequence:directlyPrecedes rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#MyRuleA"/>
+ </owl:NamedIndividual>
+
+
+
+ <!-- http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRecipe -->
+
+ <owl:NamedIndividual rdf:about="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRecipe">
+ <rdf:type rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi.owl#Recipe"/>
+ <rmi:hasDescription rdf:datatype="http://www.w3.org/2001/XMLSchema#string">A single rule recipe.</rmi:hasDescription>
+ <rmi:hasSequence rdf:datatype="http://www.w3.org/2001/XMLSchema#string">http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRule</rmi:hasSequence>
+ <rmi:endWith rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRule"/>
+ <rmi:hasRule rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRule"/>
+ <rmi:startWith rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRule"/>
+ </owl:NamedIndividual>
+
+
+
+ <!-- http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRule -->
+
+ <owl:NamedIndividual rdf:about="http://kres.iks-project.eu/ontology/meta/rmi_config.owl#ProvaParentRule">
+ <rdf:type rdf:resource="http://kres.iks-project.eu/ontology/meta/rmi.owl#KReSRule"/>
+ <rmi:hasDescription rdf:datatype="http://www.w3.org/2001/XMLSchema#string">A rule to inference if a person has an uncle.</rmi:hasDescription>
+ <rmi:hasBodyAndHead rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ProvaParent = <http://www.semanticweb.org/ontologies/2010/6/ProvaParent.owl#> . rule1[ has(ProvaParent:hasParent, ?x, ?y) . has(ProvaParent:hasBrother, ?y, ?z) -> has(ProvaParent:hasUncle, ?x, ?z) ]</rmi:hasBodyAndHead>
+ </owl:NamedIndividual>
+</rdf:RDF>
+
+
+
+<!-- Generated by the OWL API (version [Not Released]) http://owlapi.sourceforge.net -->
+
Added: incubator/stanbol/trunk/rules/web/pom.xml
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/web/pom.xml?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/web/pom.xml (added)
+++ incubator/stanbol/trunk/rules/web/pom.xml Fri Apr 1 12:47:48 2011
@@ -0,0 +1,337 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<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>
+
+ <parent>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>stanbol-parent</artifactId>
+ <version>${stanbol-version}</version>
+ <relativePath>../../parent</relativePath>
+ </parent>
+
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.rules.web</artifactId>
+ <version>${stanbol-version}</version>
+ <packaging>bundle</packaging>
+
+ <name>Apache Stanbol Rules Web</name>
+ <description>Set of rst service to deal with rules and recipes</description>
+
+ <dependencies>
+
+ <!-- dependencies on other IKS modules -->
+ <dependency>
+ <groupId>org.apache.clerezza</groupId>
+ <artifactId>org.apache.clerezza.rdf.core</artifactId>
+ <version>0.12-incubating-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.clerezza</groupId>
+ <artifactId>org.apache.clerezza.rdf.rdfjson</artifactId>
+ <version>0.3-incubating-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.clerezza</groupId>
+ <artifactId>org.apache.clerezza.jaxrs.rdf.providers</artifactId>
+ <version>0.13-incubating-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.clerezza</groupId>
+ <artifactId>org.apache.clerezza.rdf.jena.serializer</artifactId>
+ <version>0.9-incubating-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.clerezza</groupId>
+ <artifactId>org.apache.clerezza.rdf.rdfjson</artifactId>
+ <version>0.3-incubating-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- specific deps for this project -->
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-server</artifactId>
+ <version>${jersey-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ <version>${jersey-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-json</artifactId>
+ <version>${jersey-version}</version>
+ <exclusions>
+ <!-- jaxb is now part of java 6 -->
+ <exclusion>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <!--
+ <dependency> <groupId>com.sun.jersey.contribs</groupId>
+ <artifactId>jersey-multipart</artifactId> <version>1.4</version>
+ </dependency>
+ -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>freemarker</groupId>
+ <artifactId>freemarker</artifactId>
+ <version>2.3.9</version>
+ </dependency>
+ <!-- indirect dependency for freemarker -->
+ <dependency>
+ <groupId>org.codehaus.jettison</groupId>
+ <artifactId>jettison</artifactId>
+ <version>1.2</version>
+ </dependency>
+
+ <!-- servlet container, most useful for the tests -->
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.22</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- generic tax -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.4</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- OSGi tax -->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>4.1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <version>4.1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.scr.annotations</artifactId>
+ <version>1.2.0</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- for tests -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.5.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.7</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>1.6</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-client</artifactId>
+ <version>${jersey-version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam</artifactId>
+ <version>${pax-exam-version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-junit</artifactId>
+ <version>${pax-exam-version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-container-default</artifactId>
+ <version>${pax-exam-version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- Stanbol deps -->
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.kres.jersey</artifactId>
+ <version>${stanbol-version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.ontologymanager.ontonet</artifactId>
+ <version>${stanbol-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.rules.manager</artifactId>
+ <version>${stanbol-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.rules.refactor</artifactId>
+ <version>${stanbol-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.rules.base</artifactId>
+ <version>${stanbol-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.stanbol</groupId>
+ <artifactId>org.apache.stanbol.owl</artifactId>
+ <version>${stanbol-version}</version>
+ </dependency>
+
+ <!-- OWL deps -->
+ <dependency>
+ <groupId>com.hp.hpl.jena</groupId>
+ <artifactId>jena</artifactId>
+ <version>2.6.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>owlapi</groupId>
+ <artifactId>owlapi</artifactId>
+ <version>3.0.0</version>
+ </dependency>
+
+ </dependencies>
+
+
+
+
+
+ <repositories>
+ <!-- needed for jersey -->
+ <repository>
+ <id>maven2-repository.dev.java.net</id>
+ <name>Java.net Repository for Maven</name>
+ <url>http://download.java.net/maven/2/</url>
+ </repository>
+ <repository>
+ <id>repository-codehaus</id>
+ <name>Codehaus maven repository</name>
+ <url>http://repository.codehaus.org</url>
+ </repository>
+
+ <!-- needed for clerezza SNAPSHOT only -->
+ <repository>
+ <id>apache repository - snapshot repo</id>
+ <name>apache repository</name>
+ <url>https://repository.apache.org/content/repositories/snapshots</url>
+ </repository>
+ </repositories>
+
+ <build>
+ <!-- make it an OSGi bundle -->
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Export-Package>
+ org.apache.stanbol.rules.web.*;version=${stanbol-version}
+ </Export-Package>
+ <Embed-Dependency>*;scope=compile|runtime;inline=false;artifactId=jersey-json|jettison|jackson-core-asl</Embed-Dependency>
+ <Embed-Transitive>true</Embed-Transitive>
+ <Import-Package>
+ org.semanticweb.owlapi.*,
+ !javax.servlet.jsp.*,
+ !org.apache.tools.*,
+ !org.mortbay.*,
+ !org.apache.xpath.*,
+ !org.jdom.*,
+ !org.jaxen.*,
+ !org.apache.xml.*,
+ !org.mozilla.javascript.*,
+ !org.python.*,
+ !org.dom4j.*,
+ !org.apache.log.*,
+ *
+ </Import-Package>
+ <Embed-Dependency>freemarker</Embed-Dependency>
+ <_nouses>true</_nouses>
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-scr-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: incubator/stanbol/trunk/rules/web/src/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr 1 12:47:48 2011
@@ -0,0 +1 @@
+target
Propchange: incubator/stanbol/trunk/rules/web/src/main/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr 1 12:47:48 2011
@@ -0,0 +1 @@
+target
Propchange: incubator/stanbol/trunk/rules/web/src/main/java/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr 1 12:47:48 2011
@@ -0,0 +1 @@
+target
Propchange: incubator/stanbol/trunk/rules/web/src/main/java/org/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr 1 12:47:48 2011
@@ -0,0 +1 @@
+target
Propchange: incubator/stanbol/trunk/rules/web/src/main/java/org/apache/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr 1 12:47:48 2011
@@ -0,0 +1 @@
+target
Propchange: incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr 1 12:47:48 2011
@@ -0,0 +1 @@
+target
Propchange: incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr 1 12:47:48 2011
@@ -0,0 +1 @@
+target
Propchange: incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Apr 1 12:47:48 2011
@@ -0,0 +1 @@
+target
Added: incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/JerseyEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/JerseyEndpoint.java?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/JerseyEndpoint.java (added)
+++ incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/JerseyEndpoint.java Fri Apr 1 12:47:48 2011
@@ -0,0 +1,159 @@
+package org.apache.stanbol.rules.web;
+
+import java.io.IOException;
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.stanbol.rules.base.api.RuleStore;
+import org.apache.stanbol.rules.refactor.api.Refactorer;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.http.HttpService;
+import org.osgi.service.http.NamespaceException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.sun.jersey.spi.container.servlet.ServletContainer;
+
+import org.apache.stanbol.kres.jersey.processors.ViewProcessorImpl;
+
+/**
+ * Jersey-based RESTful endpoint for KReS.
+ *
+ * This OSGi component serves as a bridge between the OSGi context and the
+ * Servlet context available to JAX-RS resources.
+ *
+ * @author andrea.nuzzolese
+ */
+
+@Component(immediate = true, metatype = true)
+public class JerseyEndpoint {
+
+ private final Logger log = LoggerFactory.getLogger(getClass());
+
+ @Property(value = "/kres/rules")
+ public static final String ALIAS_PROPERTY = "org.apache.stanbol.rules.web.alias";
+
+ @Property(value = "/kres/rules/static")
+ public static final String STATIC_RESOURCES_URL_ROOT_PROPERTY = "org.apache.stanbol.rules.web.static.url";
+
+ @Property(value = "/META-INF/static")
+ public static final String STATIC_RESOURCES_CLASSPATH_PROPERTY = "org.apache.stanbol.rules.web.static.classpath";
+
+ @Property(value = "/META-INF/templates")
+ public static final String FREEMARKER_TEMPLATE_CLASSPATH_PROPERTY = "org.apache.stanbol.rules.web.templates.classpath";
+
+ @Reference
+ HttpService httpService;
+
+ @Reference
+ Refactorer semionRefactorer;
+
+// @Reference
+// OntologyStoreProvider ontologyStoreProvider;
+
+// @Reference
+// OntologyStorage ontologyStorage;
+
+ @Reference
+ RuleStore ruleStore;
+
+ protected ServletContext servletContext;
+
+ public Dictionary<String, String> getInitParams() {
+ // pass configuration for Jersey resource
+ // TODO: make the list of enabled JAX-RS resources and providers
+ // configurable using an OSGi service
+ Dictionary<String, String> initParams = new Hashtable<String, String>();
+ initParams.put("javax.ws.rs.Application",
+ JerseyEndpointApplication.class.getName());
+
+ // make jersey automatically turn resources into Viewable models and
+ // hence lookup matching freemarker templates
+ initParams.put("com.sun.jersey.config.feature.ImplicitViewables",
+ "true");
+ return initParams;
+ }
+
+ protected void activate(ComponentContext ctx) throws IOException,
+ ServletException, NamespaceException {
+
+ // register the JAX-RS resources as a servlet under configurable alias
+ ServletContainer container = new ServletContainer();
+ String alias = (String) ctx.getProperties().get(ALIAS_PROPERTY);
+ String staticUrlRoot = (String) ctx.getProperties().get(
+ STATIC_RESOURCES_URL_ROOT_PROPERTY);
+ String staticClasspath = (String) ctx.getProperties().get(
+ STATIC_RESOURCES_CLASSPATH_PROPERTY);
+ String freemakerTemplates = (String) ctx.getProperties().get(
+ FREEMARKER_TEMPLATE_CLASSPATH_PROPERTY);
+
+ log.info("Registering servlets with HTTP service "
+ + httpService.toString());
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(
+ getClass().getClassLoader());
+ try {
+ httpService.registerServlet(alias, container, getInitParams(), null);
+ httpService.registerResources(staticUrlRoot, staticClasspath, null);
+ } finally {
+ Thread.currentThread().setContextClassLoader(classLoader);
+ }
+
+ // forward the main KReS OSGi components to the servlet context so that
+ // they can be looked up by the JAX-RS resources
+ servletContext = container.getServletContext();
+ servletContext.setAttribute(BundleContext.class.getName(),
+ ctx.getBundleContext());
+ //servletContext.setAttribute(Serializer.class.getName(), serializer);
+ //servletContext.setAttribute(SemionReengineer.class.getName(),
+ // semionReengineer);
+ servletContext.setAttribute(Refactorer.class.getName(),
+ semionRefactorer);
+// servletContext.setAttribute(LinkDiscovery.class.getName(),
+// linkDiscovery);
+ //servletContext.setAttribute(SemionManager.class.getName(),
+ // reengineeringManager);
+ //servletContext.setAttribute(TcManager.class.getName(), tcManager);
+
+ // servletContext.setAttribute(KReSONManager.class.getName(), onm);
+
+// servletContext.setAttribute(OntologyStoreProvider.class.getName(), ontologyStoreProvider);
+// servletContext.setAttribute(OntologyStorage.class.getName(), ontologyStorage);
+
+ servletContext.setAttribute(STATIC_RESOURCES_URL_ROOT_PROPERTY,
+ staticUrlRoot);
+ servletContext.setAttribute(
+ ViewProcessorImpl.FREEMARKER_TEMPLATE_PATH_INIT_PARAM,
+ freemakerTemplates);
+
+ //Rule manager
+ servletContext.setAttribute(RuleStore.class.getName(),
+ ruleStore);
+
+ log.info("Jersey servlet registered at {}", alias);
+ }
+
+ protected void deactivate(ComponentContext ctx) {
+ log.info("Deactivating jersey bundle");
+ String alias = (String) ctx.getProperties().get(ALIAS_PROPERTY);
+ httpService.unregister(alias);
+ servletContext = null;
+ }
+
+
+ protected void bindHttpService(HttpService httpService) {
+ this.httpService = httpService;
+ }
+
+ protected void unbindHttpService(HttpService httpService) {
+ this.httpService = null;
+ }
+
+}
Added: incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/JerseyEndpointApplication.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/JerseyEndpointApplication.java?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/JerseyEndpointApplication.java (added)
+++ incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/JerseyEndpointApplication.java Fri Apr 1 12:47:48 2011
@@ -0,0 +1,54 @@
+package org.apache.stanbol.rules.web;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.ws.rs.core.Application;
+
+import org.apache.stanbol.kres.jersey.processors.ViewProcessorImpl;
+import org.apache.stanbol.kres.jersey.writers.GraphWriter;
+import org.apache.stanbol.owl.web.OWLOntologyWriter;
+import org.apache.stanbol.kres.jersey.writers.ResultSetWriter;
+
+/**
+ * Statically define the list of available resources and providers to be used by the KReS JAX-RS Endpoint.
+ *
+ * The jersey auto-scan mechanism does not seem to work when deployed through OSGi's HttpService
+ * initialization.
+ *
+ * In the future this class might get refactored as an OSGi service to allow for dynamic configuration and
+ * deployment of additional JAX-RS resources and providers.
+ *
+ * @author andrea.nuzzolese
+ */
+
+public class JerseyEndpointApplication extends Application {
+
+ @Override
+ public Set<Class<?>> getClasses() {
+ Set<Class<?>> classes = new HashSet<Class<?>>();
+
+ // Rules manager
+ classes.add(RuleStoreResource.class);
+ classes.add(RestRecipe.class);
+ classes.add(RestRule.class);
+ classes.add(RefactorerResource.class);
+ //classes.add(OntologyStorageResource.class);
+
+ // message body writers
+ classes.add(GraphWriter.class);
+ classes.add(ResultSetWriter.class);
+ // classes.add(OwlModelWriter.class);
+ classes.add(OWLOntologyWriter.class);
+ return classes;
+ }
+
+ @Override
+ public Set<Object> getSingletons() {
+ Set<Object> singletons = new HashSet<Object>();
+ // view processors
+ singletons.add(new ViewProcessorImpl());
+ return singletons;
+ }
+
+}
Added: incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/JettyServer.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/JettyServer.java?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/JettyServer.java (added)
+++ incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/JettyServer.java Fri Apr 1 12:47:48 2011
@@ -0,0 +1,96 @@
+package org.apache.stanbol.rules.web;
+
+import java.net.URI;
+import java.util.Dictionary;
+import java.util.Enumeration;
+
+import org.mortbay.jetty.Server;
+import org.mortbay.jetty.servlet.Context;
+import org.mortbay.jetty.servlet.ServletHolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.sun.jersey.spi.container.servlet.ServletContainer;
+
+/**
+ * Standalone (OSGi independent) Jetty-based server with the KReS Jersey
+ * endpoint. The OSGi component need be injected manually to the ServletContext
+ * to make them available to the resources.
+ *
+ * This class is mainly useful for testing the JAX-RS resources without faking a
+ * complete OSGI runtime.
+ *
+ * For seamless OSGi deployments the JerseyEndpoint component should be
+ * automatically registered in the container and registers the JAXRS resources
+ * automatically.
+ *
+ * @author andrea.nuzzolese
+ */
+public class JettyServer {
+
+ private final Logger log = LoggerFactory.getLogger(getClass());
+
+ public static String DEFAUL_BASE_URI = "http://localhost:9998/";
+
+ protected Server server = new Server();
+
+ private Context context;
+
+ public void start(String baseUri) throws Exception {
+ log.info("starting the Jetty / Jersey endpoint");
+ ServletHolder servletHolder = new ServletHolder(ServletContainer.class);
+ Dictionary<String, String> initParams = new JerseyEndpoint().getInitParams();
+ Enumeration<String> keys = initParams.keys();
+ while (keys.hasMoreElements()) {
+ String key = keys.nextElement();
+ servletHolder.setInitParameter(key, initParams.get(key));
+ }
+
+ URI uri = new URI(baseUri);
+ // restart any previous server instance while keeping the previous
+ // attribute settings
+ if (server.isRunning()) {
+ server.stop();
+ }
+ server = new Server(uri.getPort());
+ context = new Context(server, "/", Context.SESSIONS);
+ context.addServlet(servletHolder, "/*");
+ server.start();
+ }
+
+ public void stop() throws Exception {
+ log.info("stopping the Jetty / Jersey endpoint");
+ server.stop();
+ }
+
+ public void setAttribute(String name, Object value) {
+ if (context != null) {
+ context.getServletContext().setAttribute(name, value);
+ }
+ }
+
+ public Object getAttribute(String name) {
+ if (context != null) {
+ return context.getServletContext().getAttribute(name);
+ }
+ return null;
+ }
+
+ public void removeAttribute(String name) {
+ if (context != null) {
+ context.getServletContext().removeAttribute(name);
+ }
+ }
+
+ /**
+ * For starting manually.
+ */
+ public static void main(String[] args) throws Exception {
+ JettyServer server = new JettyServer();
+ server.start(DEFAUL_BASE_URI);
+ System.out.println("Hit enter to stop it...");
+ System.in.read();
+ server.stop();
+ }
+
+}
\ No newline at end of file
Added: incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/RefactorerResource.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/RefactorerResource.java?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/RefactorerResource.java (added)
+++ incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/RefactorerResource.java Fri Apr 1 12:47:48 2011
@@ -0,0 +1,124 @@
+package org.apache.stanbol.rules.web;
+
+import java.io.InputStream;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.stanbol.kres.jersey.format.KRFormat;
+import org.apache.stanbol.kres.jersey.resource.NavigationMixin;
+import org.apache.stanbol.ontologymanager.ontonet.api.ONManager;
+import org.apache.stanbol.rules.base.api.NoSuchRecipeException;
+import org.apache.stanbol.rules.refactor.api.Refactorer;
+import org.apache.stanbol.rules.refactor.api.RefactoringException;
+import org.semanticweb.owlapi.apibinding.OWLManager;
+import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLOntology;
+import org.semanticweb.owlapi.model.OWLOntologyCreationException;
+import org.semanticweb.owlapi.model.OWLOntologyManager;
+
+import com.sun.jersey.api.view.ImplicitProduces;
+
+/**
+ *
+ * @author andrea.nuzzolese
+ *
+ */
+
+@Path("/refactorer")
+@ImplicitProduces(MediaType.TEXT_HTML + ";qs=2")
+public class RefactorerResource extends NavigationMixin {
+
+ protected ONManager onManager;
+ protected Refactorer semionRefactorer;
+ // protected SemionManager semionManager;
+ protected TcManager tcManager;
+
+ public RefactorerResource(@Context ServletContext servletContext) {
+ semionRefactorer = (Refactorer) (servletContext.getAttribute(Refactorer.class.getName()));
+
+ onManager = (ONManager) (servletContext.getAttribute(ONManager.class.getName()));
+
+ tcManager = (TcManager) (servletContext.getAttribute(TcManager.class.getName()));
+ if (semionRefactorer == null) {
+ throw new IllegalStateException("SemionRefactorer missing in ServletContext");
+ }
+
+ }
+
+ public String getNamespace() {
+ return onManager.getKReSNamespace();
+ }
+
+ @POST
+ @Path("/lazy")
+ @Consumes(MediaType.MULTIPART_FORM_DATA)
+ @Produces(value = {KRFormat.TURTLE, KRFormat.FUNCTIONAL_OWL, KRFormat.MANCHESTER_OWL, KRFormat.RDF_XML,
+ KRFormat.OWL_XML, KRFormat.RDF_JSON})
+ public Response performRefactoring(@FormParam("recipe") String recipe,
+ @FormParam("input") InputStream input) {
+
+ // Refactorer semionRefactorer = semionManager.getRegisteredRefactorer();
+
+ IRI recipeIRI = IRI.create(recipe);
+
+ OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
+ OWLOntology inputOntology;
+ try {
+ inputOntology = manager.loadOntologyFromOntologyDocument(input);
+
+ OWLOntology outputOntology;
+ try {
+ outputOntology = semionRefactorer.ontologyRefactoring(inputOntology, recipeIRI);
+ } catch (RefactoringException e) {
+ e.printStackTrace();
+ return Response.status(500).build();
+ } catch (NoSuchRecipeException e) {
+ return Response.status(204).build();
+ }
+
+ return Response.ok(outputOntology).build();
+ } catch (OWLOntologyCreationException e) {
+ e.printStackTrace();
+ return Response.status(404).build();
+ }
+
+ }
+
+ @GET
+ @Path("/lazy")
+ public Response performRefactoringLazyCreateGraph(@QueryParam("recipe") String recipe,
+ @QueryParam("input-graph") String inputGraph,
+ @QueryParam("output-graph") String outputGraph) {
+
+ System.out.println("recipe: " + recipe);
+ System.out.println("input-graph: " + inputGraph);
+ System.out.println("output-graph: " + outputGraph);
+ IRI recipeIRI = IRI.create(recipe);
+ IRI inputGraphIRI = IRI.create(inputGraph);
+ IRI outputGraphIRI = IRI.create(outputGraph);
+
+ // Refactorer semionRefactorer = semionManager.getRegisteredRefactorer();
+
+ try {
+ semionRefactorer.ontologyRefactoring(outputGraphIRI, inputGraphIRI, recipeIRI);
+ return Response.ok().build();
+ } catch (RefactoringException e) {
+ return Response.status(500).build();
+ } catch (NoSuchRecipeException e) {
+ return Response.status(204).build();
+ }
+
+ }
+
+}
Added: incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/RestRecipe.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/RestRecipe.java?rev=1087688&view=auto
==============================================================================
--- incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/RestRecipe.java (added)
+++ incubator/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/RestRecipe.java Fri Apr 1 12:47:48 2011
@@ -0,0 +1,335 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.apache.stanbol.rules.web;
+
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+import java.util.Vector;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+
+import org.apache.clerezza.rdf.core.access.TcManager;
+import org.apache.stanbol.ontologymanager.ontonet.api.ONManager;
+import org.apache.stanbol.ontologymanager.ontonet.impl.ONManagerImpl;
+import org.apache.stanbol.ontologymanager.ontonet.impl.io.ClerezzaOntologyStorage;
+import org.apache.stanbol.rules.base.api.RuleStore;
+import org.apache.stanbol.rules.manager.changes.AddRecipe;
+import org.apache.stanbol.rules.manager.changes.GetRecipe;
+import org.apache.stanbol.rules.manager.changes.RemoveRecipe;
+import org.apache.stanbol.rules.manager.changes.RuleStoreImpl;
+import org.semanticweb.owlapi.apibinding.OWLManager;
+import org.semanticweb.owlapi.model.AddImport;
+import org.semanticweb.owlapi.model.IRI;
+import org.semanticweb.owlapi.model.OWLDataFactory;
+import org.semanticweb.owlapi.model.OWLIndividual;
+import org.semanticweb.owlapi.model.OWLIndividualAxiom;
+import org.semanticweb.owlapi.model.OWLNamedIndividual;
+import org.semanticweb.owlapi.model.OWLObjectProperty;
+import org.semanticweb.owlapi.model.OWLOntology;
+import org.semanticweb.owlapi.model.OWLOntologyChange;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.stanbol.kres.jersey.format.KRFormat;
+import org.apache.stanbol.kres.jersey.resource.NavigationMixin;
+
+/**
+ *
+ * @author elvio
+ */
+@Path("/recipe")
+// /{uri:.+}")
+// @ImplicitProduces(MediaType.TEXT_HTML + ";qs=2")
+public class RestRecipe extends NavigationMixin {
+
+ protected ONManager onm;
+
+ private Logger log = LoggerFactory.getLogger(getClass());
+
+ private RuleStore kresRuleStore;
+ private ClerezzaOntologyStorage storage;
+
+ /**
+ * To get the RuleStoreImpl where are stored the rules and the recipes
+ *
+ * @param servletContext
+ * {To get the context where the REST service is running.}
+ */
+ public RestRecipe(@Context ServletContext servletContext) {
+ this.kresRuleStore = (RuleStore) servletContext.getAttribute(RuleStore.class.getName());
+ this.onm = (ONManager) servletContext.getAttribute(ONManager.class.getName());
+// this.storage = (OntologyStorage) servletContext
+// .getAttribute(OntologyStorage.class.getName());
+// Contingency code for missing components follows.
+/*
+ * FIXME! The following code is required only for the tests. This should
+ * be removed and the test should work without this code.
+ */
+if (onm == null) {
+ log
+ .warn("No KReSONManager in servlet context. Instantiating manually...");
+ onm = new ONManagerImpl(new TcManager(), null,
+ new Hashtable<String, Object>());
+}
+this.storage = onm.getOntologyStore();
+if (storage == null) {
+ log.warn("No OntologyStorage in servlet context. Instantiating manually...");
+ storage = new ClerezzaOntologyStorage(new TcManager(),null);
+}
+ if (kresRuleStore == null) {
+ log
+ .warn("No KReSRuleStore with stored rules and recipes found in servlet context. Instantiating manually with default values...");
+// String iri = "http://www.ontologydesignpatterns.org/ont/iks/kres/rmi_config.owl";
+// OWLOntology o;
+// try {
+// o = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(IRI.create(iri));
+// this.kresRuleStore = new RuleStoreImpl(onm, new Hashtable<String,Object>(), "");
+// log.debug("PATH TO OWL FILE LOADED: " + kresRuleStore.getFilePath());
+// } catch (OWLOntologyCreationException e) {
+//
+// }
+
+ this.kresRuleStore = new RuleStoreImpl(onm, new Hashtable<String,Object>(), "");
+
+ }
+ }
+
+ /**
+ * Get a recipe with its rules from the rule base (that is the ontology that contains the rules and the
+ * recipe).
+ *
+ * @param uri
+ * {A string contains the IRI full name of the recipe.}
+ * @return Return: <br/>
+ * 200 The recipe is retrieved (import declarations point to KReS Services) <br/>
+ * 404 The recipe does not exists in the manager <br/>
+ * 500 Some error occurred
+ *
+ */
+ @GET
+ @Path("/{uri:.+}")
+ @Produces(value = {KRFormat.RDF_XML, KRFormat.TURTLE, KRFormat.OWL_XML, KRFormat.FUNCTIONAL_OWL,
+ KRFormat.MANCHESTER_OWL, KRFormat.RDF_JSON})
+ public Response getRecipe(@PathParam("uri") String uri) {
+ try {
+
+ GetRecipe rule = new GetRecipe(kresRuleStore);
+
+ // String ID =
+ // kresRuleStore.getOntology().getOntologyID().toString().replace(">","").replace("<","")+"#";
+
+ if (uri.equals("all")) {
+
+ Vector<IRI> recipe = rule.getGeneralRecipes();
+
+ if (recipe == null) {
+ // The recipe does not exists in the manager
+ return Response.status(Status.NOT_FOUND).build();
+ } else {
+
+ // The recipe is retrieved (import declarations point to
+ // KReS Services)
+ OWLOntology onto = kresRuleStore.getOntology();
+ OWLOntology newmodel = OWLManager.createOWLOntologyManager().createOntology(
+ onto.getOntologyID());
+ OWLDataFactory factory = onto.getOWLOntologyManager().getOWLDataFactory();
+
+ Iterator<OWLOntology> importedonto = onto.getDirectImports().iterator();
+ List<OWLOntologyChange> additions = new LinkedList<OWLOntologyChange>();
+ OWLDataFactory auxfactory = onto.getOWLOntologyManager().getOWLDataFactory();
+
+ while (importedonto.hasNext()) {
+ OWLOntology auxonto = importedonto.next();
+ additions.add(new AddImport(newmodel, auxfactory.getOWLImportsDeclaration(auxonto
+ .getOWLOntologyManager().getOntologyDocumentIRI(auxonto))));
+ }
+
+ if (!additions.isEmpty()) newmodel.getOWLOntologyManager().applyChanges(additions);
+
+ for (int i = 0; i < recipe.size(); i++) {
+ OWLNamedIndividual ind = factory.getOWLNamedIndividual(recipe.get(i));
+ Set<OWLIndividualAxiom> ax = onto.getAxioms(ind);
+ newmodel.getOWLOntologyManager().addAxioms(newmodel, ax);
+
+ }
+
+ // try {
+ // OWLManager.createOWLOntologyManager().saveOntology(
+ // newmodel,
+ // newmodel.getOWLOntologyManager()
+ // .getOntologyFormat(newmodel),
+ // System.out);
+ // } catch (OWLOntologyStorageException e) {
+ // // TODO Auto-generated catch block
+ // e.printStackTrace();
+ // }
+
+ return Response.ok(newmodel).build();
+ }
+
+ } else {
+
+ HashMap<IRI,String> recipe = rule.getRecipe(IRI.create(uri));
+
+ if (recipe == null) {
+ // The recipe deos not exists in the manager
+ return Response.status(Status.NOT_FOUND).build();
+ } else {
+ // The recipe is retrieved (import declarations point to
+ // KReS Services)
+ OWLOntology onto = kresRuleStore.getOntology();
+
+ OWLDataFactory factory = onto.getOWLOntologyManager().getOWLDataFactory();
+ OWLObjectProperty prop = factory.getOWLObjectProperty(IRI
+ .create("http://kres.iks-project.eu/ontology/meta/rmi.owl#hasRule"));
+ OWLNamedIndividual ind = factory.getOWLNamedIndividual(IRI.create(uri));
+ Set<OWLIndividual> value = ind.getObjectPropertyValues(prop, onto);
+ Set<OWLIndividualAxiom> ax = onto.getAxioms(ind);
+
+ Iterator<OWLIndividual> iter = value.iterator();
+
+ OWLOntology newmodel = OWLManager.createOWLOntologyManager().createOntology(
+ onto.getOntologyID());
+
+ Iterator<OWLOntology> importedonto = onto.getDirectImports().iterator();
+ List<OWLOntologyChange> additions = new LinkedList<OWLOntologyChange>();
+ OWLDataFactory auxfactory = onto.getOWLOntologyManager().getOWLDataFactory();
+
+ while (importedonto.hasNext()) {
+ OWLOntology auxonto = importedonto.next();
+ additions.add(new AddImport(newmodel, auxfactory.getOWLImportsDeclaration(auxonto
+ .getOWLOntologyManager().getOntologyDocumentIRI(auxonto))));
+ }
+
+ if (!additions.isEmpty()) newmodel.getOWLOntologyManager().applyChanges(additions);
+
+ newmodel.getOWLOntologyManager().addAxioms(newmodel, ax);
+
+ while (iter.hasNext()) {
+
+ ind = (OWLNamedIndividual) iter.next();
+ ax = onto.getAxioms(ind);
+
+ newmodel.getOWLOntologyManager().addAxioms(newmodel, ax);
+ }
+
+ // try {
+ // OWLManager.createOWLOntologyManager().saveOntology(
+ // newmodel,
+ // newmodel.getOWLOntologyManager()
+ // .getOntologyFormat(newmodel),
+ // System.out);
+ // } catch (OWLOntologyStorageException e) {
+ // // TODO Auto-generated catch block
+ // e.printStackTrace();
+ // }
+
+ return Response.ok(newmodel).build();
+ }
+ }
+ } catch (Exception e) {
+ // Some error occurred
+ throw new WebApplicationException(e, Status.INTERNAL_SERVER_ERROR);
+ }
+
+ }
+
+ /**
+ * To add a recipe without rules.
+ *
+ * @param recipe
+ * {A string contains the IRI of the recipe to be added}
+ * @param description
+ * {A string contains a description of the rule}
+ * @return Return: <br/>
+ * 200 The recipe has been added<br/>
+ * 409 The recipe has not been added<br/>
+ * 500 Some error occurred
+ */
+ @POST
+ @Consumes(MediaType.MULTIPART_FORM_DATA)
+ @Produces(value = {KRFormat.RDF_XML, KRFormat.TURTLE, KRFormat.OWL_XML, KRFormat.FUNCTIONAL_OWL,
+ KRFormat.MANCHESTER_OWL, KRFormat.RDF_JSON})
+ public Response addRecipe(@FormParam(value = "recipe") String recipe,
+ @FormParam(value = "description") String description) {
+
+ try {
+
+ AddRecipe instance = new AddRecipe(kresRuleStore);
+
+ // String ID =
+ // kresRuleStore.getOntology().getOntologyID().toString().replace(">","").replace("<","")+"#";
+
+ boolean ok = instance.addSimpleRecipe(IRI.create(recipe), description);
+
+ if (!ok) {
+
+ return Response.status(Status.CONFLICT).build();
+
+ } else {
+ kresRuleStore.saveOntology();
+ return Response.status(Status.OK).build();
+ }
+
+ } catch (Exception e) {
+ throw new WebApplicationException(e, Status.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ /**
+ * To delete a recipe
+ *
+ * @param recipe
+ * {A tring contains an IRI of the recipe}
+ * @return 200 The recipe has been deleted<br/>
+ * 409 The recipe has not been deleted<br/>
+ * 500 Some error occurred
+ */
+ @DELETE
+ // @Consumes(MediaType.TEXT_PLAIN)
+ @Produces("text/plain")
+ public Response removeRecipe(@QueryParam(value = "recipe") String recipe) {
+
+ try {
+
+ RemoveRecipe instance = new RemoveRecipe(kresRuleStore);
+
+ // String ID =
+ // kresRuleStore.getOntology().getOntologyID().toString().replace(">","").replace("<","")+"#";
+
+ boolean ok = instance.removeRecipe(IRI.create(recipe));
+
+ if (!ok) {
+ return Response.status(Status.CONFLICT).build();
+ } else {
+ kresRuleStore.saveOntology();
+ return Response.ok().build();
+ }
+
+ } catch (Exception e) {
+ throw new WebApplicationException(e, Status.INTERNAL_SERVER_ERROR);
+ }
+ }
+
+}