You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by re...@apache.org on 2013/10/30 17:09:16 UTC

svn commit: r1537152 - /stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/writers/GraphWriter.java

Author: reto
Date: Wed Oct 30 16:09:16 2013
New Revision: 1537152

URL: http://svn.apache.org/r1537152
Log:
STANBOL-1127: made GraphWriter a service

Modified:
    stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/writers/GraphWriter.java

Modified: stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/writers/GraphWriter.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/writers/GraphWriter.java?rev=1537152&r1=1537151&r2=1537152&view=diff
==============================================================================
--- stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/writers/GraphWriter.java (original)
+++ stanbol/trunk/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/writers/GraphWriter.java Wed Oct 30 16:09:16 2013
@@ -42,12 +42,17 @@ import javax.ws.rs.ext.Provider;
 
 import org.apache.clerezza.rdf.core.TripleCollection;
 import org.apache.clerezza.rdf.core.serializedform.Serializer;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 //TODO check if clerezza rdf.jaxrs prvoder fits the purpose?
-//TODO make it a service/component
+@Component
+@Service(Object.class)
+@Property(name="javax.ws.rs", boolValue=true)
 @Provider
 // @Produces({TEXT_PLAIN, N3, N_TRIPLE, RDF_XML, TURTLE, X_TURTLE, RDF_JSON, APPLICATION_JSON})
 public class GraphWriter implements MessageBodyWriter<TripleCollection> {