@Provider @Produces(value={"text/turtle","text/rdf+n3","text/n3","application/rdf+xml","application/n-triples","application/xml","text/plain","application/x-turtle","application/ld+json"}) public class RdfStreamProvider extends Object implements javax.ws.rs.ext.MessageBodyWriter<RdfNamespacedStream>
Modifier and Type | Class and Description |
---|---|
static class |
RdfStreamProvider.NTriplesWithCorrectMimeType
OpenRDF uses the wrong mimeType for n-triples, so we offer the correct
one as well.
|
Constructor and Description |
---|
RdfStreamProvider() |
Modifier and Type | Method and Description |
---|---|
long |
getSize(RdfNamespacedStream t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
void |
registerMimeTypes()
Add the correct mimeType for n-triples.
|
void |
writeTo(RdfNamespacedStream nsStream,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
public RdfStreamProvider()
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<RdfNamespacedStream>
public long getSize(RdfNamespacedStream t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<RdfNamespacedStream>
public void writeTo(RdfNamespacedStream nsStream, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<RdfNamespacedStream>
@PostConstruct public void registerMimeTypes()
Copyright © 2013–2016 DuraSpace, Inc.. All rights reserved.