@Provider public class TableProvider extends Object implements javax.ws.rs.ext.MessageBodyWriter<Table>, javax.ws.rs.ext.MessageBodyReader<Table>, JsonMessageBodyHandler
TODO: Handle CSV headers
mapper
Constructor and Description |
---|
TableProvider() |
Modifier and Type | Method and Description |
---|---|
long |
getSize(Table table,
Class<?> aClass,
Type type,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isReadable(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) |
Table |
readFrom(Class<Table> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream) |
void |
writeTo(Table table,
Class<?> aClass,
Type type,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream outputStream) |
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<Table>
public long getSize(Table table, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<Table>
public void writeTo(Table table, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream outputStream) throws IOException, javax.ws.rs.WebApplicationException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<Table>
IOException
javax.ws.rs.WebApplicationException
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<Table>
public Table readFrom(Class<Table> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<Table>
IOException
javax.ws.rs.WebApplicationException
Copyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.