Class MyGraphWriter

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyWriter<org.apache.clerezza.commons.rdf.Graph>

    @Provider
    @Produces({"application/rdf+xml; qs=0.5","text/turtle; qs=0.6","text/rdf+n3; qs=0.4","application/n-triples; qs=0.5","application/ld+json; qs=0.4"})
    @Priority(100)
    public class MyGraphWriter
    extends org.apache.clerezza.jaxrs.rdf.providers.GraphWriter
    This class is necessary, because org.apache.clerezza.jaxrs.rdf.providers.GraphWriter expects to have a serializer service injected
    • Constructor Detail

      • MyGraphWriter

        public MyGraphWriter()
    • Method Detail

      • writeTo

        public void writeTo​(org.apache.clerezza.commons.rdf.Graph t,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                            OutputStream entityStream)
                     throws IOException,
                            javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<org.apache.clerezza.commons.rdf.Graph>
        Overrides:
        writeTo in class org.apache.clerezza.jaxrs.rdf.providers.GraphWriter
        Throws:
        IOException
        javax.ws.rs.WebApplicationException