Modified: stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/SiteManagerRootResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/SiteManagerRootResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/SiteManagerRootResource.java (original) +++ stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/SiteManagerRootResource.java Wed Nov 21 10:50:05 2012 @@ -86,7 +86,7 @@ import org.slf4j.LoggerFactory; import at.newmedialab.ldpath.exception.LDPathParseException; import at.newmedialab.ldpath.model.programs.Program; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; /** * Resource to provide a REST API for the {@link SiteManager}.
Modified: stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/reconcile/BaseGoogleRefineReconcileResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/reconcile/BaseGoogleRefineReconcileResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/reconcile/BaseGoogleRefineReconcileResource.java (original) +++ stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/resource/reconcile/BaseGoogleRefineReconcileResource.java Wed Nov 21 10:50:05 2012 @@ -74,7 +74,7 @@ import org.codehaus.jettison.json.JSONOb import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; /** * Implementation of the <a href="http://code.google.com/p/google-refine/wiki/ReconciliationServiceApi"> Modified: stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/utils/LDPathHelper.java URL: http://svn.apache.org/viewvc/stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/utils/LDPathHelper.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/utils/LDPathHelper.java (original) +++ stanbol/trunk/entityhub/jersey/src/main/java/org/apache/stanbol/entityhub/jersey/utils/LDPathHelper.java Wed Nov 21 10:50:05 2012 @@ -65,7 +65,7 @@ import at.newmedialab.ldpath.model.progr import at.newmedialab.ldpath.model.selectors.PropertySelector; import at.newmedialab.ldpath.model.transformers.DoubleTransformer; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; public class LDPathHelper { private static final Logger log = LoggerFactory.getLogger(LDPathHelper.class); Modified: stanbol/trunk/factstore/factstore/pom.xml URL: http://svn.apache.org/viewvc/stanbol/trunk/factstore/factstore/pom.xml?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/factstore/factstore/pom.xml (original) +++ stanbol/trunk/factstore/factstore/pom.xml Wed Nov 21 10:50:05 2012 @@ -132,12 +132,9 @@ </dependency> <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-server</artifactId> - </dependency> - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-core</artifactId> + <groupId>org.apache.stanbol</groupId> + <artifactId>org.apache.stanbol.commons.ldviewable</artifactId> + <version>0.10.0-SNAPSHOT</version> </dependency> <dependency> Modified: stanbol/trunk/factstore/factstore/src/main/java/org/apache/stanbol/factstore/web/resource/FactStoreRootResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/factstore/factstore/src/main/java/org/apache/stanbol/factstore/web/resource/FactStoreRootResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/factstore/factstore/src/main/java/org/apache/stanbol/factstore/web/resource/FactStoreRootResource.java (original) +++ stanbol/trunk/factstore/factstore/src/main/java/org/apache/stanbol/factstore/web/resource/FactStoreRootResource.java Wed Nov 21 10:50:05 2012 @@ -23,10 +23,10 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.Response; +import org.apache.stanbol.commons.ldviewable.Viewable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.sun.jersey.api.view.Viewable; @Path("/factstore") public class FactStoreRootResource extends BaseFactStoreResource { Modified: stanbol/trunk/factstore/factstore/src/main/java/org/apache/stanbol/factstore/web/resource/FactsResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/factstore/factstore/src/main/java/org/apache/stanbol/factstore/web/resource/FactsResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/factstore/factstore/src/main/java/org/apache/stanbol/factstore/web/resource/FactsResource.java (original) +++ stanbol/trunk/factstore/factstore/src/main/java/org/apache/stanbol/factstore/web/resource/FactsResource.java Wed Nov 21 10:50:05 2012 @@ -54,7 +54,7 @@ import org.apache.stanbol.factstore.mode import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; @Path("/factstore/facts") public class FactsResource extends BaseFactStoreResource { Added: stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactStoreRootResource/index.ftl URL: http://svn.apache.org/viewvc/stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactStoreRootResource/index.ftl?rev=1412052&view=auto ============================================================================== --- stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactStoreRootResource/index.ftl (added) +++ stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactStoreRootResource/index.ftl Wed Nov 21 10:50:05 2012 @@ -0,0 +1,150 @@ +<#-- + 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. +--> +<#import "/imports/common.ftl" as common> +<#escape x as x?html> +<@common.page title="FactStore" hasrestapi=true> + +<div class="panel" id="webview"> + +<h3>What is the FactStore?</h3> + +<p>The FactStore is a Stanbol service to store facts about entities. We interpret the relation between +N entities as a fact. Each entity of such a relation is identified by its URI. For example, the relation that +a person works for a company can be stored as a fact. This is done by relating the entity URI of the person +to the entity URI of the organization and naming this relation 'WorksFor'.</p> + +<p>The FactStore allows you to store relations with an arbitrary number of participants. We call this +N-ary facts. For example, the fact that a person sent a letter to another person is a (person x mail x +person) relation and could be named 'PersonWritesToPerson'. What kind of facts you want to store depends +on your use case.</p> + +<p>Each participant of a fact is stored by its URI. On a technical level you relate URIs to URIs. On a +semantic level you relate entities represented by their URIs. In consequence, the FactStore is not designed +for storing properties of entities. The FactStore assumes that you already have stored your entities and +that you are able to resolve these entities by their URIs.</p> + +<h4>FactStore and EntityHub</h4> + +<p>To store and manage entities you should use the <a href="${it.publicBaseUri}entityhub">Stanbol EntityHub.</a> +This service allows you to create entities with their properties. For example, the entity of a person with +its name, date of birth, and address. The Stanbol EntityHub will assign an URI to each entity. This URI can +be used within the FactStore.</p> + +<p><em>Note</em>: At the moment the FactStore is not integrated with the EntityHub. But you can use both +services in combination through their RESTful API.</p> + +<h3>Specification</h3> + +<p>The FactStore specification proposal can be found online at the Apache Stanbol +<a href="http://incubator.apache.org/stanbol/docs/trunk/factstore/specification.html" target="_blank">web site</a>.</p> + +<h3>Implementation Status</h3> + +<p>The current implementation of the FactStore provides these features:</p> + +<ul> + <li><a href="${it.publicBaseUri}factstore/facts#Create_a_New_Fact_Schema">Creation of Fact Schemas</a></li> + <li><a href="${it.publicBaseUri}factstore/facts#Store_Facts">Storing of Facts</a></li> + <li><a href="${it.publicBaseUri}factstore/facts#Query_for_Facts_of_a_Certain_Type">Querying for Single Facts</a></li> +</ul> + +<p>The following features are planned but not yet implemented:</p> + +<ul> + <li>Querying for Combination of Facts (Simple Reasoning)</li> + <li>Integration with EntityHub to resolve entities</li> +</ul> + +<h3>Example</h3> + +<p>Imagine you want to store the fact that the person named John Doe works for +the company Winzigweich. John Doe is represented by the URI +http://www.doe.com/john and the company by http://www.winzigweich.de. This +fact is stored as a relation between the entity http://www.doe.com/john and +http://www.winzigweich.de.</p> + +<p>For this, we first need to create a so called fact schema that tells the +FactStore what we would like to store. A fact schema has a unique name (often +an URI is used) to identify it. To specify what kinds of entities we would +like to store, we specify the type of the entities. Each type has an URI and +should be defined by some ontology. For example, we can use the ontology +specified by <a href="http://schema.org/">http://schema.org/</a>.</p> + +<p>According to http://schema.org/ a person is of type http://schema.org/Person +and an organization is of type http://schema.org/Organization. We will use +these type information to specify the fact schema +http://factschema.org/worksFor. The specification of a fact schema is written +in JSON-LD, like this:</p> + +<pre>{ + "@context" : { + "#types" : { + "person" : "http://schema.org/Person", + "organization" : "http://schema.org/Organization" + } + } +}</pre> + +<p>To create this fact schema in the FactStore we have to store it in a *.json +file, e.g. worksFor.json, and PUT it into the FactStore. The path to put the +fact schema is `/factstore/facts/{factSchemaName}`. So for our example this +would be `/factstore/facts/http://factschema.org/worksFor`. Unfortunately, +this is not a valid URI so that we have to URL-encode the name of the fact +schema. This leads to +`/factstore/facts/http%3A%2F%2Ffactschema.org%2FworksFor`.</p> + +<p><em>Note</em>: If you want to avoid this URL-encoding step, you should chose another +name for your fact schema that is not an URI by itself. You are free to do so!</p> + +<p>Now to PUT the `worksFor` fact schema we can use this cURL command.</p> + +<pre>curl http://localhost:8080/factstore/facts/http%3A%2F%2Ffactschema.org%2FworksFor -T worksFor.json</pre> + +<p>After creating the fact schema we can store the fact that John Doe works for +Winzigweich by POSTing it to the FactStore. The fact is specified in JSON-LD +syntax. The `@profile` defines the fact schema where this fact belongs to.</p> + +<pre>{ + "@profile" : "http://factschema.org/worksFor", + "person" : { "@iri" : "http://www.doe.com/john" }, + "organization" : { "@iri" : "http://www.winzigweich.de"} +}</pre> + +<p>Now we can POST this fact, e.g. stored in fact.json, to the FactStore at +`/factstore/facts`. By using cURL it would be this command:</p> + +<pre>curl -d @fact.json -H "Content-Type: application/json" http://localhost:8080/factstore/facts</pre> + +<p>On success this will return a 201 (Created) and the URI of the newly created +fact in the location header of the response. To retrieve a fact you can GET it +from the returned URI.</p> + +</div> + +<div class="panel" id="restapi" style="display: none;"> +<h3>Service Endpoints</h3> + +<p>The FactStore supports the following service endpoints:</p> + +<ul> + <li>Store @ <a href="${it.publicBaseUri}factstore/facts">/factstore/facts</a></li> +</ul> + +</div> + +</@common.page> +</#escape> Added: stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactsResource/facts_common.ftl URL: http://svn.apache.org/viewvc/stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactsResource/facts_common.ftl?rev=1412052&view=auto ============================================================================== --- stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactsResource/facts_common.ftl (added) +++ stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactsResource/facts_common.ftl Wed Nov 21 10:50:05 2012 @@ -0,0 +1,31 @@ +<#-- + 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. +--> +<#macro page> +<#import "/imports/common.ftl" as common> +<#escape x as x?html> +<@common.page title="FactStore Facts" hasrestapi=false> + +<div class="panel" id="restapi"> +<h3>Service Endpoint <a href="${it.publicBaseUri}factstore/facts">/factstore/facts</a></h3> + +<#nested> + +</div> + +</@common.page> +</#escape> +</#macro> \ No newline at end of file Added: stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactsResource/factschema.ftl URL: http://svn.apache.org/viewvc/stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactsResource/factschema.ftl?rev=1412052&view=auto ============================================================================== --- stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactsResource/factschema.ftl (added) +++ stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactsResource/factschema.ftl Wed Nov 21 10:50:05 2012 @@ -0,0 +1,25 @@ +<#-- + 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. +--> +<#import "facts_common.ftl" as common> +<#escape x as x?html> +<@common.page> + +<h4>Fact Schema: ${factSchemaURN}</h4> +<pre>${factschema}</pre> + +</@common.page> +</#escape> Added: stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactsResource/index.ftl URL: http://svn.apache.org/viewvc/stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactsResource/index.ftl?rev=1412052&view=auto ============================================================================== --- stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactsResource/index.ftl (added) +++ stanbol/trunk/factstore/factstore/src/main/resources/templates/html/org/apache/stanbol/factstore/web/resource/FactsResource/index.ftl Wed Nov 21 10:50:05 2012 @@ -0,0 +1,453 @@ +<#-- + 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. +--> +<#import "facts_common.ftl" as common> +<#escape x as x?html> +<@common.page> + +<ul> + <li><a href="#Create_a_New_Fact_Schema">Create a New Fact Schema</a></li> + <li><a href="#Get_Fact_Schema">Get Fact Schema</a></li> + <li><a href="#Store_Facts">Store Facts</a></li> + <li><a href="#Query_for_Facts_of_a_Certain_Type">Query for Facts of a Certain Type</a></li> +</ul> + +<a name="Create_a_New_Fact_Schema" id="Create_a_New_Fact_Schema"></a><h4>Create a New Fact Schema</h4> +<table> + <tr> + <th valign="top">Description: </th> + <td>Allows clients to publish new fact schemata to the FactStore. Each fact is an n-tuple where each + element of that tuple defines a certain type of entity. A fact schema defines which types of entities + and their roles are part of instances of that fact.</td> + </tr> + <tr> + <th valign="top">Path: </th> + <td>/factstore/facts/{fact-schema-name}</td> + </tr> + <tr> + <th valign="top">Method:</th> + <td>PUT with data type application/json returns HTTP 201 (created) on success.</td> + </tr> + <tr> + <th valign="top">Consumes:</th> + <td>application/json</td> + </tr> + <tr> + <th valign="top">Produces:</th> + <td>text/plain on error messages</td> + </tr> + <tr> + <th valign="top">Data:</th> + <td>The fact schema is sent as the PUT payload in JSON-LD format as a JSON-LD profile. The name of the + fact is given by the URL. The elements of the schema are defined in the "@types" section of the + JSON-LD "#context". Each element is specified using a unique role name for that entity plus the entity + type specified by an URN.</td> + </tr> + <tr> + <th valign="top">Example 1:</th> + <td>PUT /factstore/facts/http%3A%2F%2Fiks-project.eu%2Font%2FemployeeOf<br> + with the following data +<pre>{ + "@context" : + { + "iks" : "http://iks-project.eu/ont/", + "@types" : + { + "person" : "iks:person", + "organization" : "iks:organization" + } + } +}</pre> + <p>will create the new fact schema for "employeeOf" at the given URL which is in decoded + representation: /factstore/facts/http://iks-project.eu/ont/employeeOf</p> + <p>Instead one can use the cURL tool for this. Store the fact schema in a JSON file and then use this + command.</p> +<pre>curl ${it.publicBaseUri}factstore/facts/http%3A%2F%2Fiks-project.eu%2Font%2FemployeeOf -T spec-example1.json</pre> + </td> + </tr> + <tr> + <th valign="top">Example 2:</th> + <td>PUT /factstore/facts/http%3A%2F%2Fwww.schema.org%2FEvent.attendees<br> + with the following data +<pre>{ + "@context" : + { + "sorg" : "http://www.schema.org/", + "@types" : + { + "event" : "sorg:Event", + "attendee" : ["sorg:Person","sorg:Organization"] + } + } +}</pre> + <p>will create the new fact schema for "attendees" at the given URL which is in decoded + representation: /factstore/facts/http://www.schema.org/Event.attendees.</p> + <p><i>Note</i>: That this fact schema uses the ability to define more than one possible type for + a role. The role 'attendee' can be of type http://www.schema.org/Person or + http://www.schema.org/Organization.</p> + </td> + </tr> +</table> + +<script language="javascript"> +function putNewFactSchema() { + $("#newFactSchemaResult").show(); + $.ajax({ + type: "PUT", + url: '${it.publicBaseUri}factstore/facts/' + encodeURIComponent($("#newFactSchemaName").val()), + dataType: "text/plain", + contentType: "application/json", + data: $("#newFactSchema").val(), + cache: false, + success: function(data, textStatus, jqXHR) { + $("#newFactSchemaResultText").text(textStatus + " (" + jqXHR.status + ")"); + }, + error: function(jqXHR, textStatus, errorThrown) { + $("#newFactSchemaResultText").text(("Error putting new fact schema.\n" + jqXHR.statusText + "\n" + jqXHR.responseText)); + } + }); +} +</script> + +<p>To test this feature you can put your own fact schema using the following form.</p> +<form name="newFactSchemaTestForm" id="newFactSchemaTestForm"> +<table> +<tr> + <th valign="top" width="10%">Enter JSON-LD profile that specifies a fact schema:</th> + <td> + <b>Fact Schema name:</b> + <input type="text" name="newFactSchemaName" id="newFactSchemaName" size="40" maxlength="96" /><br> + <b>Fact Schema definition:</b><br> + <textarea name="newFactSchema" id="newFactSchema" rows="10" cols="40"></textarea><br> + <input type="submit" name="putNewFactSchemaButton" value="Put" onclick="putNewFactSchema(); return false;" /> + </td> +</tr> +<tr> + <th valign="top">Result</th> + <td> + <div id="newFactSchemaResult" style="display: none"> + <p><a href="#" onclick="$('#newFactSchemaResult').hide(); return false;">Hide results</a> + <pre id="newFactSchemaResultText">... waiting for results ...</pre> + </div> + </td> +</tr> +</table> +</form> + +<a name="Get_Fact_Schema" id="Get_Fact_Schema"></a><h4>Get Fact Schema</h4> +<table> + <tr> + <th valign="top">Description: </th> + <td>Allows clients to get the definition of an existing fact schema.</td> + </tr> + <tr> + <th valign="top">Path: </th> + <td>/factstore/facts/{fact-schema-name}</td> + </tr> + <tr> + <th valign="top">Method:</th> + <td>GET with data type application/json returns HTTP 200 on success.</td> + </tr> + <tr> + <th valign="top">Produces:</th> + <td>application/json</td> + </tr> + <tr> + <th valign="top">Data:</th> + <td>The fact schema is returned as a JSON-LD profile.</td> + </tr> + <tr> + <th valign="top">Example:</th> + <td>GET /factstore/facts/http%3A%2F%2Fiks-project.eu%2Font%2FemployeeOf<br> + will return the following data: +<pre> { + "@context" : + { + "@types" : + { + "person" : "http://iks-project.eu/ont/person", + "organization" : "http://iks-project.eu/ont/organization" + } + } +}</pre> + </td> + </tr> +</table> + +<script language="javascript"> +function getFactSchema() { + $("#getFactSchemaResult").show(); + $.ajax({ + type: "GET", + url: '${it.publicBaseUri}factstore/facts/' + encodeURIComponent($("#factSchemaURN").val()), + dataType: "json", + cache: false, + success: function(data, textStatus, jqXHR) { + $("#getFactSchemaResultText").text(JSON.stringify(data, null, 2)); + }, + error: function(jqXHR, textStatus, errorThrown) { + $("#getFactSchemaResultText").text(("Error putting new fact schema.\n" + jqXHR.statusText + "\n" + jqXHR.responseText)); + } + }); +} +</script> + +<p>To test this feature you can get an existing fact schema by entering its name.</p> +<form name="getFactSchemaTestForm" id="getFactSchemaTestForm"> +<table> +<tr> + <th valign="top" width="10%">Enter fact schema name:</th> + <td> + <input type="text" name="factSchemaURN" id="factSchemaURN" size="40" maxlength="96" /><br> + <input type="submit" name="getFactSchemaButton" value="Get" onclick="getFactSchema(); return false;" /> + </td> +</tr> +<tr> + <th valign="top">Result</th> + <td> + <div id="getFactSchemaResult" style="display: none"> +<p><a href="#" onclick="$('#getFactSchemaResult').hide(); return false;">Hide results</a> +<pre id="getFactSchemaResultText">... waiting for results ...</pre> +</div> + </td> +</tr> +</table> +</form> + +<a name="Store_Facts" id="Store_Facts"></a><h4>Store Facts</h4> +<table> + <tr> + <th valign="top">Description: </th> + <td>Allows clients to store a new facts according to a defined fact schema that was previously + published to the FactStore. Each new fact is an n-tuple according to its schema where each tuple + element identifies an entity using its unique IRI.</td> + </tr> + <tr> + <th valign="top">Path: </th> + <td>/factstore/facts</td> + </tr> + <tr> + <th valign="top">Method:</th> + <td>POST with data type application/json returns HTTP 201 (created) on success.</td> + </tr> + <tr> + <th valign="top">Consumes:</th> + <td>application/json</td> + </tr> + <tr> + <th valign="top">Produces:</th> + <td>text/plain on error messages</td> + </tr> + <tr> + <th valign="top">Data:</th> + <td>The facts are sent as the POST payload in JSON-LD format referring to the defined JSON-LD profile. + The name of the fact is given by the "@profile" element of the JSON-LD object. + The JSON-LD object contains a list of facts under the attribute "facts" where each + element of that list is an n-tuple of entity instances according to the fact schema. The instance of + an entity can be specified either by its unique IRI or by specifying the instance by example.<br> + Using the instance by example variant requires the FactStore to resolve the entity in an EntityHub. + An entity by example is specified by defining attributes and required values of the searched entity. + A fact can only be stored if all entities can be uniquely identified either by their IRI or by + example.</td> + </tr> + <tr> + <th valign="top">Example 1:</th> + <td>POST /factstore/facts<br> + with the following data +<pre>{ + "@context" : { + "iks" : "http://iks-project.eu/ont/", + "upb" : "http://upb.de/persons/" + }, + "@profile" : "iks:employeeOf", + "person" : { "@iri" : "upb:bnagel" }, + "organization" : { "@iri" : "http://uni-paderborn.de"} +}</pre> + <p>creates a new fact of type http://iks-project.eu/ont/employeeof specifying that the person + http://upb.de/persons/bnagel is employee of the organization defined by the IRI + http://uni-paderborn.de.</p> + <p>You can store the facts in a JSON file and use the cURL tool like this:</p> +<pre> +curl -d @fact-example1.json -H "Content-Type: application/json" ${it.publicBaseUri}factstore/facts +</pre> + </td> + </tr> + <tr> + <th valign="top">Example 2:</th> + <td>POST /factstore/facts<br> + with the following data to create several facts of the same type at once +<pre>{ + "@context" : { + "iks" : "http://iks-project.eu/ont/", + "upb" : "http://upb.de/persons/" + }, + "@profile" : "iks:employeeOf", + "@subject" : [ + { "person" : { "@iri" : "upb:bnagel" }, + "organization" : { "@iri" : "http://uni-paderborn.de" } + }, + { "person" : { "@iri" : "upb:fchrist" }, + "organization" : { "@iri" : "http://uni-paderborn.de" } + } + ] +}</pre> + <p>creates two new facts of type http://iks-project.eu/ont/employeeof specifying that the persons + http://upb.de/persons/bnagel and http://upb.de/persons/fchrist are employees of the organization + defined by the IRI http://uni-paderborn.de.</p> + </td> + </tr> + <tr> + <th valign="top">Example 3:</th> + <td>POST /factstore/facts<br> + with the following data to create several facts of different type +<pre>{ + "@context" : { + "iks" : "http://iks-project.eu/ont/", + "upb" : "http://upb.de/persons/" + }, + "@subject" : [ + { "@profile" : "iks:employeeOf", + "person" : { "@iri" : "upb:bnagel" }, + "organization" : { "@iri" : "http://uni-paderborn.de" } + }, + { "@profile" : "iks:friendOf", + "person" : { "@iri" : "upb:bnagel" }, + "friend" : { "@iri" : "upb:fchrist" } + } + ] +}</pre> + <p>creates two new facts. The first one of type http://iks-project.eu/ont/employeeof specifying that + the person http://upb.de/persons/bnagel is employee of the organization defined by the IRI + http://uni-paderborn.de. The second of type http://iks-project.eu/ont/friendOf specifying that + http://upb.de/persons/fchrist is a friend of http://upb.de/persons/bnagel.</p> + </td> + </tr> +</table> + +<script language="javascript"> +function postNewFact() { + $("#newFactResult").show(); + $.ajax({ + type: "POST", + url: '${it.publicBaseUri}factstore/facts', + dataType: "text/plain", + contentType: "application/json", + data: $("#newFact").val(), + cache: false, + success: function(data, textStatus, jqXHR) { + $("#newFactResultText").text(textStatus + " (" + jqXHR.status + ")"); + }, + error: function(jqXHR, textStatus, errorThrown) { + $("#newFactResultText").text(("Error posting new facts.\n" + jqXHR.statusText + "\n" + jqXHR.responseText)); + } + }); +} +</script> + +<p>To test this feature you can publish your own fact using the following form. Note that the fact +schema must exist before one can publish a fact.</p> +<form name="newFactTestForm" id="newFactTestForm"> +<table> +<tr> + <th valign="top" width="10%">Enter JSON-LD that specifies facts:</th> + <td> + <textarea name="newFact" id="newFact" rows="10" cols="40"></textarea><br> + <input type="submit" name="postNewFactButton" value="Publish" onclick="postNewFact(); return false;" /> + </td> +</tr> +<tr> + <th valign="top">Result</th> + <td> + <div id="newFactResult" style="display: none"> + <p><a href="#" onclick="$('#newFactResult').hide(); return false;">Hide results</a> + <pre id="newFactResultText">... waiting for results ...</pre> + </div> + </td> +</tr> +</table> +</form> + +<a name="Query_for_Facts_of_a_Certain_Type" id="Query_for_Facts_of_a_Certain_Type"></a> +<h4>Query for Facts of a Certain Type</h4> +<table> + <tr> + <th valign="top">Description: </th> + <td>Allows clients to query stored facts of a specific type defined by the fact's schema. The clients + specify the desired fact plus an arbitrary number of entities that play some role in the fact. </td> + </tr> + <tr> + <th valign="top">Path: </th> + <td>/factstore/query</td> + </tr> + <tr> + <th valign="top">Method:</th> + <td>POST with data type application/json returns application/json.</td> + </tr> + <tr> + <th valign="top">Consumes:</th> + <td>application/json</td> + </tr> + <tr> + <th valign="top">Produces:</th> + <td>application/json</td> + </tr> + <tr> + <th valign="top">Data:</th> + <td>The query is specified by a JSON-LD object in the payload of the request. The query defines a + "select" to specify the desired type of result to be returned in the result set. The "from" part + specifies the fact type to query and the "where" clause specifies constraints to be fulfilled.<br /> + <br /> + <i>Note</i>: For the moment constraints only support the equals "=" relation. There may be more + relations like ">" in future versions of this specification. If there is more than one constraint all + constraints are concatenated by "AND".</td> + </tr> + <tr> + <th valign="top">Example 1:</th> + <td>POST /factstore/query<br> + with the following data +<pre>{ + "@context" : { + "iks" : "http://iks-project.eu/ont/" + }, + "select" : [ "person" ], + "from" : "iks:employeeOf", + "where" : [ + { + "=" : { + "organization" : { "@iri" : "http://uni-paderborn.de" } + } + } + ] +}</pre> + <p>returns the list of all persons participating in the fact of type + http://iks-project.eu/ont/employeeOf where the organization is http://uni-paderborn.de.</p> + <p>To send such a query via cURL, store the query in a JSON file and use this command:<p> +<pre>curl -d @query-spec-example1.json -H "Content-Type: application/json" http://localhost:8080/factstore/query</pre> + <p>The result is sent back in JSON-LD format with the result set specified by the select clause.</p> +<pre>{ + "resultset": [ + { "PERSON" : { "@iri" : "http://upb.de/persons/gengels" } }, + { "PERSON" : { "@iri" : "http://upb.de/persons/ssauer" } }, + { "PERSON" : { "@iri" : "http://upb.de/persons/bnagel" } }, + { "PERSON" : { "@iri" : "http://upb.de/persons/fchrist" } } + ] +}</pre> + </td> + </tr> +</table> + +</@common.page> +</#escape> Added: stanbol/trunk/factstore/factstore/src/main/resources/templates/imports/abstract.ftl URL: http://svn.apache.org/viewvc/stanbol/trunk/factstore/factstore/src/main/resources/templates/imports/abstract.ftl?rev=1412052&view=auto ============================================================================== --- stanbol/trunk/factstore/factstore/src/main/resources/templates/imports/abstract.ftl (added) +++ stanbol/trunk/factstore/factstore/src/main/resources/templates/imports/abstract.ftl Wed Nov 21 10:50:05 2012 @@ -0,0 +1,20 @@ +<#-- + 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. +--> +The FactStore is a <strong>stateful interface</strong> to store <strong>facts</strong>, +i.e. semantic relations between entities. An entity is identified by its URI. Each fact +is stored according to its custom <strong>fact schema</strong>. It defines the types +of participating entities and their semantic role in a fact. \ No newline at end of file Modified: stanbol/trunk/integration-tests/pom.xml URL: http://svn.apache.org/viewvc/stanbol/trunk/integration-tests/pom.xml?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/integration-tests/pom.xml (original) +++ stanbol/trunk/integration-tests/pom.xml Wed Nov 21 10:50:05 2012 @@ -184,6 +184,10 @@ <artifactId>junit</artifactId> </dependency> <dependency> + <groupId>org.apache.stanbol</groupId> + <artifactId>org.apache.stanbol.commons.ldviewable</artifactId> + </dependency> +<dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-server</artifactId> </dependency> Propchange: stanbol/trunk/launchers/bundlelists/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Wed Nov 21 10:50:05 2012 @@ -0,0 +1,3 @@ +.project +target +.settings Propchange: stanbol/trunk/ontologymanager/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Wed Nov 21 10:50:05 2012 @@ -1 +1,3 @@ +.project +.settings target Modified: stanbol/trunk/ontologymanager/web/pom.xml URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/web/pom.xml?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/ontologymanager/web/pom.xml (original) +++ stanbol/trunk/ontologymanager/web/pom.xml Wed Nov 21 10:50:05 2012 @@ -145,6 +145,10 @@ <!-- specific deps for this project --> <dependency> + <groupId>org.apache.stanbol</groupId> + <artifactId>org.apache.stanbol.commons.ldviewable</artifactId> + </dependency> +<dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-server</artifactId> </dependency> Modified: stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/OntoNetRootResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/OntoNetRootResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/OntoNetRootResource.java (original) +++ stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/OntoNetRootResource.java Wed Nov 21 10:50:05 2012 @@ -127,7 +127,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.sun.jersey.api.view.ImplicitProduces; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; import com.sun.jersey.multipart.BodyPart; import com.sun.jersey.multipart.FormDataBodyPart; import com.sun.jersey.multipart.FormDataMultiPart; Modified: stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/RegistryManagerResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/RegistryManagerResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/RegistryManagerResource.java (original) +++ stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/RegistryManagerResource.java Wed Nov 21 10:50:05 2012 @@ -41,7 +41,7 @@ import org.apache.stanbol.ontologymanage import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; @Path("/ontonet/registry") public class RegistryManagerResource extends BaseStanbolResource { Modified: stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/ScopeManagerResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/ScopeManagerResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/ScopeManagerResource.java (original) +++ stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/ScopeManagerResource.java Wed Nov 21 10:50:05 2012 @@ -57,7 +57,7 @@ import org.semanticweb.owlapi.model.OWLO import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; /** * The main Web resource of the KReS ontology manager. All the scopes, sessions and ontologies are accessible Modified: stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/ScopeResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/ScopeResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/ScopeResource.java (original) +++ stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/ScopeResource.java Wed Nov 21 10:50:05 2012 @@ -118,7 +118,7 @@ import org.semanticweb.owlapi.model.OWLO import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; import com.sun.jersey.multipart.BodyPart; import com.sun.jersey.multipart.FormDataBodyPart; import com.sun.jersey.multipart.FormDataMultiPart; Modified: stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/SessionManagerResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/SessionManagerResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/SessionManagerResource.java (original) +++ stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/SessionManagerResource.java Wed Nov 21 10:50:05 2012 @@ -67,7 +67,7 @@ import org.semanticweb.owlapi.model.OWLO import org.semanticweb.owlapi.model.OWLOntologyCreationException; import org.semanticweb.owlapi.model.OWLOntologyManager; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; @Path("/ontonet/session") public class SessionManagerResource extends BaseStanbolResource { Modified: stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/SessionResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/SessionResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/SessionResource.java (original) +++ stanbol/trunk/ontologymanager/web/src/main/java/org/apache/stanbol/ontologymanager/web/resources/SessionResource.java Wed Nov 21 10:50:05 2012 @@ -112,7 +112,7 @@ import org.semanticweb.owlapi.model.OWLO import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; import com.sun.jersey.multipart.BodyPart; import com.sun.jersey.multipart.FormDataBodyPart; import com.sun.jersey.multipart.FormDataMultiPart; Modified: stanbol/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/stanbol/trunk/parent/pom.xml?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/parent/pom.xml (original) +++ stanbol/trunk/parent/pom.xml Wed Nov 21 10:50:05 2012 @@ -810,6 +810,12 @@ <version>${jersey-version}</version> </dependency> + <!-- mFreemarker and LDPath Viewable --> + <dependency> + <groupId>org.apache.stanbol</groupId> + <artifactId>org.apache.stanbol.commons.ldviewable</artifactId> + <version>0.10.0-SNAPSHOT</version> + </dependency> <!-- JAX-RS JSR311 --> <!-- NOTE that JAX-RS is included and exported by jersey-core Modified: stanbol/trunk/reasoners/services-tests/pom.xml URL: http://svn.apache.org/viewvc/stanbol/trunk/reasoners/services-tests/pom.xml?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/reasoners/services-tests/pom.xml (original) +++ stanbol/trunk/reasoners/services-tests/pom.xml Wed Nov 21 10:50:05 2012 @@ -78,6 +78,10 @@ <artifactId>junit</artifactId> </dependency> <dependency> + <groupId>org.apache.stanbol</groupId> + <artifactId>org.apache.stanbol.commons.ldviewable</artifactId> + </dependency> +<dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-server</artifactId> </dependency> Modified: stanbol/trunk/reasoners/web/pom.xml URL: http://svn.apache.org/viewvc/stanbol/trunk/reasoners/web/pom.xml?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/reasoners/web/pom.xml (original) +++ stanbol/trunk/reasoners/web/pom.xml Wed Nov 21 10:50:05 2012 @@ -39,7 +39,7 @@ <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> - <configuration> + <!-- use defaults for now <configuration> <instructions> <Import-Package> javax.servlet.*, @@ -68,7 +68,7 @@ org.apache.stanbol.reasoners.owlapi.* </Import-Package> </instructions> - </configuration> + </configuration> --> </plugin> <plugin> <groupId>org.apache.rat</groupId> @@ -156,7 +156,10 @@ <groupId>org.apache.clerezza</groupId> <artifactId>rdf.jena.serializer</artifactId> </dependency> - + <dependency> + <groupId>org.apache.stanbol</groupId> + <artifactId>org.apache.stanbol.commons.ldviewable</artifactId> + </dependency> <!-- specific deps for this project --> <dependency> <groupId>com.sun.jersey</groupId> Modified: stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/resources/JobsResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/resources/JobsResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/resources/JobsResource.java (original) +++ stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/resources/JobsResource.java Wed Nov 21 10:50:05 2012 @@ -43,7 +43,7 @@ import org.apache.stanbol.reasoners.web. import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; /** * Return the result of a reasoners background job Modified: stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/resources/ReasoningServiceTaskResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/resources/ReasoningServiceTaskResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/resources/ReasoningServiceTaskResource.java (original) +++ stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/resources/ReasoningServiceTaskResource.java Wed Nov 21 10:50:05 2012 @@ -79,7 +79,7 @@ import org.slf4j.LoggerFactory; import com.sun.jersey.api.core.HttpContext; import com.sun.jersey.api.core.HttpRequestContext; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; import com.sun.jersey.multipart.BodyPart; import com.sun.jersey.multipart.FormDataBodyPart; import com.sun.jersey.multipart.FormDataMultiPart; Modified: stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/resources/ReasoningServicesResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/resources/ReasoningServicesResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/resources/ReasoningServicesResource.java (original) +++ stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/resources/ReasoningServicesResource.java Wed Nov 21 10:50:05 2012 @@ -46,7 +46,7 @@ import org.apache.stanbol.reasoners.serv import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; /** * Home page of the /reasoners module Modified: stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/utils/ResponseTaskBuilder.java URL: http://svn.apache.org/viewvc/stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/utils/ResponseTaskBuilder.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/utils/ResponseTaskBuilder.java (original) +++ stanbol/trunk/reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/utils/ResponseTaskBuilder.java Wed Nov 21 10:50:05 2012 @@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory; import uk.ac.manchester.cs.owl.owlapi.mansyntaxrenderer.ManchesterOWLSyntaxOntologyStorer; import com.hp.hpl.jena.rdf.model.Model; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; /** * Builds a response according to the reasoning output. Propchange: stanbol/trunk/rules/adapters/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Wed Nov 21 10:50:05 2012 @@ -0,0 +1,2 @@ +.project +.settings Modified: stanbol/trunk/rules/web/pom.xml URL: http://svn.apache.org/viewvc/stanbol/trunk/rules/web/pom.xml?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/rules/web/pom.xml (original) +++ stanbol/trunk/rules/web/pom.xml Wed Nov 21 10:50:05 2012 @@ -136,6 +136,10 @@ <!-- Jersey, servlet and freemarker --> <dependency> + <groupId>org.apache.stanbol</groupId> + <artifactId>org.apache.stanbol.commons.ldviewable</artifactId> + </dependency> +<dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-server</artifactId> </dependency> Modified: stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/resources/RulesResource.java URL: http://svn.apache.org/viewvc/stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/resources/RulesResource.java?rev=1412052&r1=1412051&r2=1412052&view=diff ============================================================================== --- stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/resources/RulesResource.java (original) +++ stanbol/trunk/rules/web/src/main/java/org/apache/stanbol/rules/web/resources/RulesResource.java Wed Nov 21 10:50:05 2012 @@ -75,7 +75,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.sun.jersey.api.view.ImplicitProduces; -import com.sun.jersey.api.view.Viewable; +import org.apache.stanbol.commons.ldviewable.Viewable; import com.sun.jersey.multipart.FormDataParam; /**
