Class 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>
    • Constructor Detail

      • FHIRProvider

        public FHIRProvider​(javax.ws.rs.RuntimeType runtimeType)
    • Method Detail

      • isReadable

        public boolean isReadable​(Class<?> type,
                                  Type genericType,
                                  Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<Resource>
      • isWriteable

        public boolean isWriteable​(Class<?> type,
                                   Type genericType,
                                   Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface javax.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 interface javax.ws.rs.ext.MessageBodyWriter<Resource>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException
      • isPretty

        protected static 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 interface javax.ws.rs.ext.MessageBodyWriter<Resource>