Class FhirParser

java.lang.Object
de.gematik.test.erezept.fhir.parser.FhirParser

public class FhirParser extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends org.hl7.fhir.r4.model.Resource>
    T
    decode(Class<T> expectedClass, String content)
     
    <T extends org.hl7.fhir.r4.model.Resource>
    T
    decode(Class<T> expectedClass, String content, de.gematik.bbriccs.fhir.EncodingType encoding)
     
    org.hl7.fhir.r4.model.Resource
    decode(String content)
     
    org.hl7.fhir.r4.model.Resource
    decode(String content, de.gematik.bbriccs.fhir.EncodingType encoding)
     
    encode(org.hl7.fhir.instance.model.api.IBaseResource resource, de.gematik.bbriccs.fhir.EncodingType encoding)
     
    encode(org.hl7.fhir.instance.model.api.IBaseResource resource, de.gematik.bbriccs.fhir.EncodingType encoding, boolean prettyPrint)
     
    boolean
    isValid(String content)
     
    ca.uhn.fhir.validation.ValidationResult
    validate(String content)
    Check beforehand if the given content is valid

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FhirParser

      public FhirParser()
  • Method Details

    • validate

      public ca.uhn.fhir.validation.ValidationResult validate(String content)
      Check beforehand if the given content is valid
      Parameters:
      content - to be validated
      Returns:
      successful ValidationResult if content represents a valid FHIR-Resource and a unsuccessful ValidationResult otherwise
    • isValid

      public boolean isValid(String content)
    • decode

      public <T extends org.hl7.fhir.r4.model.Resource> T decode(Class<T> expectedClass, String content)
    • decode

      public <T extends org.hl7.fhir.r4.model.Resource> T decode(Class<T> expectedClass, String content, de.gematik.bbriccs.fhir.EncodingType encoding)
    • decode

      public org.hl7.fhir.r4.model.Resource decode(String content)
    • decode

      public org.hl7.fhir.r4.model.Resource decode(String content, de.gematik.bbriccs.fhir.EncodingType encoding)
    • encode

      public String encode(org.hl7.fhir.instance.model.api.IBaseResource resource, de.gematik.bbriccs.fhir.EncodingType encoding)
    • encode

      public String encode(org.hl7.fhir.instance.model.api.IBaseResource resource, de.gematik.bbriccs.fhir.EncodingType encoding, boolean prettyPrint)