Class VanillaDocumentMessageBodyWriter

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyWriter<Document>

    @Provider
    @Produces({"text/turtle","text/provenance-notation","application/provenance+xml","application/trig","application/rdf+xml","application/json","image/svg+xml","application/pdf","image/jpeg","image/png","application/ld+json"})
    public class VanillaDocumentMessageBodyWriter
    extends Object
    implements javax.ws.rs.ext.MessageBodyWriter<Document>
    • Constructor Detail

      • VanillaDocumentMessageBodyWriter

        public VanillaDocumentMessageBodyWriter​(ProvSerialiser serializer)
    • Method Detail

      • trimCharSet

        public String trimCharSet​(javax.ws.rs.core.MediaType mediaType)
      • isWriteable

        public boolean isWriteable​(Class<?> type,
                                   Type genericType,
                                   Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<Document>
      • getSize

        public long getSize​(Document t,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType)
        Specified by:
        getSize in interface javax.ws.rs.ext.MessageBodyWriter<Document>
      • writeTo

        public void writeTo​(Document doc,
                            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<Document>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException