Package dev.dsf.fhir.adapter
Class HtmlFhirAdapter
java.lang.Object
dev.dsf.fhir.adapter.AbstractAdapter
dev.dsf.fhir.adapter.HtmlFhirAdapter
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<org.hl7.fhir.r4.model.Resource>
@Provider
@Produces("text/html")
public class HtmlFhirAdapter
extends AbstractAdapter
implements jakarta.ws.rs.ext.MessageBodyWriter<org.hl7.fhir.r4.model.Resource>
-
Field Summary
Fields inherited from class dev.dsf.fhir.adapter.AbstractAdapter
PRETTY, SUMMARY -
Constructor Summary
ConstructorsConstructorDescriptionHtmlFhirAdapter(ca.uhn.fhir.context.FhirContext fhirContext, Supplier<String> serverBaseProvider, Collection<? extends HtmlGenerator<?>> htmlGenerators) -
Method Summary
Modifier and TypeMethodDescriptionprotected ca.uhn.fhir.context.FhirContextprotected ca.uhn.fhir.parser.IParserbooleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) voidwriteTo(org.hl7.fhir.r4.model.Resource resource, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.ws.rs.ext.MessageBodyWriter
getSize
-
Constructor Details
-
HtmlFhirAdapter
public HtmlFhirAdapter(ca.uhn.fhir.context.FhirContext fhirContext, Supplier<String> serverBaseProvider, Collection<? extends HtmlGenerator<?>> htmlGenerators)
-
-
Method Details
-
getFhirContext
protected ca.uhn.fhir.context.FhirContext getFhirContext() -
getParser
protected ca.uhn.fhir.parser.IParser getParser(jakarta.ws.rs.core.MediaType mediaType, Supplier<ca.uhn.fhir.parser.IParser> parser) - Overrides:
getParserin classAbstractAdapter
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
isWriteablein interfacejakarta.ws.rs.ext.MessageBodyWriter<org.hl7.fhir.r4.model.Resource>
-
writeTo
public void writeTo(org.hl7.fhir.r4.model.Resource resource, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, jakarta.ws.rs.WebApplicationException- Specified by:
writeToin interfacejakarta.ws.rs.ext.MessageBodyWriter<org.hl7.fhir.r4.model.Resource>- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-