Class DocumentMessageBodyWriter
- java.lang.Object
-
- org.openprovenance.prov.service.core.DocumentMessageBodyWriter
-
- 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"}) public class DocumentMessageBodyWriter extends Object implements javax.ws.rs.ext.MessageBodyWriter<Document>
-
-
Constructor Summary
Constructors Constructor Description DocumentMessageBodyWriter(ProvSerialiser serializer)
-
Method Summary
Modifier and Type Method Description longgetSize(Document t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)StringtrimCharSet(javax.ws.rs.core.MediaType mediaType)voidwriteTo(Document doc, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
-
-
-
Constructor Detail
-
DocumentMessageBodyWriter
public DocumentMessageBodyWriter(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:
isWriteablein interfacejavax.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:
getSizein interfacejavax.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:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<Document>- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-
-