Author: reto
Date: Fri May 17 15:17:45 2013
New Revision: 1483855
URL: http://svn.apache.org/r1483855
Log:
STANBOL-1073: As a work-around till Clerezza/Jena is updated make sure the
pasrer get's first invoked as privileged
Modified:
stanbol/trunk/commons/web/base.jersey/src/main/java/org/apache/stanbol/commons/web/base/jersey/JerseyEndpoint.java
Modified:
stanbol/trunk/commons/web/base.jersey/src/main/java/org/apache/stanbol/commons/web/base/jersey/JerseyEndpoint.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/commons/web/base.jersey/src/main/java/org/apache/stanbol/commons/web/base/jersey/JerseyEndpoint.java?rev=1483855&r1=1483854&r2=1483855&view=diff
==============================================================================
---
stanbol/trunk/commons/web/base.jersey/src/main/java/org/apache/stanbol/commons/web/base/jersey/JerseyEndpoint.java
(original)
+++
stanbol/trunk/commons/web/base.jersey/src/main/java/org/apache/stanbol/commons/web/base/jersey/JerseyEndpoint.java
Fri May 17 15:17:45 2013
@@ -47,7 +47,10 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.sun.jersey.spi.container.servlet.ServletContainer;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
import java.util.Collection;
+import org.apache.clerezza.rdf.core.serializedform.Parser;
import org.apache.felix.scr.annotations.References;
import org.apache.stanbol.commons.web.base.DefaultApplication;
import org.apache.stanbol.commons.web.base.LinkResource;
@@ -83,6 +86,9 @@ public class JerseyEndpoint {
@Property(value = "/static")
public static final String STATIC_RESOURCES_URL_ROOT_PROPERTY =
"org.apache.stanbol.commons.web.static.url";
+
+ @Reference
+ private Parser parser;
/**
* The origins allowed for multi-host requests
@@ -166,7 +172,11 @@ public class JerseyEndpoint {
/** Initialize the Jersey subsystem */
private synchronized void initJersey() throws NamespaceException,
ServletException {
-
+ //temporary workaround for STANBOL-1073
+ InputStream in = new ByteArrayInputStream(
+ "<http://example.org/me> <http://xmlns.com/foaf/0.1/name>
\"Jane Doe\" .".getBytes());
+ parser.parse(in, "text/turtle");
+ //end of STANBOL-1073 work around
if (componentContext == null) {
log.debug(" ... can not init Jersey Endpoint - Component not yet
activated!");
//throw new IllegalStateException("Null ComponentContext, not
activated?");