Package org.linuxforhealth.fhir.provider
Class FHIRProvider
- java.lang.Object
-
- org.linuxforhealth.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 java.lang.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, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.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(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
boolean
isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
Resource
readFrom(java.lang.Class<Resource> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream)
void
writeTo(Resource t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)
-
-
-
Method Detail
-
isReadable
public boolean isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isReadable
in interfacejavax.ws.rs.ext.MessageBodyReader<Resource>
-
readFrom
public Resource readFrom(java.lang.Class<Resource> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream) throws java.io.IOException, javax.ws.rs.WebApplicationException
- Specified by:
readFrom
in interfacejavax.ws.rs.ext.MessageBodyReader<Resource>
- Throws:
java.io.IOException
javax.ws.rs.WebApplicationException
-
isWriteable
public boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter<Resource>
-
writeTo
public void writeTo(Resource t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream) throws java.io.IOException, javax.ws.rs.WebApplicationException
- Specified by:
writeTo
in interfacejavax.ws.rs.ext.MessageBodyWriter<Resource>
- Throws:
java.io.IOException
javax.ws.rs.WebApplicationException
-
isPretty
protected boolean isPretty(javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.core.UriInfo uriInfo)
-
-