Package com.ibm.fhir.provider
Class FHIRProvider
- java.lang.Object
-
- com.ibm.fhir.provider.FHIRProvider
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<Resource>
,javax.ws.rs.ext.MessageBodyWriter<Resource>
@Consumes({"application/fhir+json","application/json","application/fhir+xml","application/xml"}) @Produces({"application/fhir+json","application/json","application/fhir+xml","application/xml"}) public class FHIRProvider extends Object implements javax.ws.rs.ext.MessageBodyReader<Resource>, javax.ws.rs.ext.MessageBodyWriter<Resource>
Maps entity streams to/from fhir-model objects
-
-
Constructor Summary
Constructors Constructor Description FHIRProvider(javax.ws.rs.RuntimeType runtimeType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getSize(Resource t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
protected boolean
isPretty(javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.core.UriInfo uriInfo)
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)
Resource
readFrom(Class<Resource> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)
void
writeTo(Resource t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
-
-
-
Method Detail
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isReadable
in interfacejavax.ws.rs.ext.MessageBodyReader<Resource>
-
readFrom
public Resource readFrom(Class<Resource> 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
- Specified by:
readFrom
in interfacejavax.ws.rs.ext.MessageBodyReader<Resource>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter<Resource>
-
writeTo
public void writeTo(Resource 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 interfacejavax.ws.rs.ext.MessageBodyWriter<Resource>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-
isPretty
protected boolean isPretty(javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.core.UriInfo uriInfo)
-
getSize
public long getSize(Resource t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
getSize
in interfacejavax.ws.rs.ext.MessageBodyWriter<Resource>
-
-