Search in sources :

Example 1 with DataHandlerToByteArrayConverter

use of org.openehealth.ipf.platform.camel.ihe.continua.hrn.converters.DataHandlerToByteArrayConverter in project ipf by oehf.

the class DocumentTest method setUp.

@BeforeEach
public void setUp() throws Exception {
    var somePatientID = new Identifiable("id1", new AssigningAuthority("1.3"));
    someData = SampleData.createDataHandler();
    docEntry = SampleData.createDocumentEntry(somePatientID);
    var conversionService = new GenericConversionService();
    conversionService.addConverter(new DataHandlerToByteArrayConverter());
    conversionService.addConverter(new ByteArrayToStringConverter());
    conversionService.addConverter(new ByteArrayToClinicalDocumentConverter());
    conversionService.addConverter(new ByteArrayToDomConverter());
    Document.setConversionService(new SpringTypeConverter(conversionService));
}
Also used : ByteArrayToStringConverter(org.openehealth.ipf.platform.camel.ihe.continua.hrn.converters.ByteArrayToStringConverter) ByteArrayToDomConverter(org.openehealth.ipf.platform.camel.ihe.continua.hrn.converters.ByteArrayToDomConverter) DataHandlerToByteArrayConverter(org.openehealth.ipf.platform.camel.ihe.continua.hrn.converters.DataHandlerToByteArrayConverter) AssigningAuthority(org.openehealth.ipf.commons.ihe.xds.core.metadata.AssigningAuthority) SpringTypeConverter(org.openehealth.ipf.commons.spring.core.config.SpringTypeConverter) GenericConversionService(org.springframework.core.convert.support.GenericConversionService) ByteArrayToClinicalDocumentConverter(org.openehealth.ipf.platform.camel.ihe.continua.hrn.converters.ByteArrayToClinicalDocumentConverter) Identifiable(org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

BeforeEach (org.junit.jupiter.api.BeforeEach)1 AssigningAuthority (org.openehealth.ipf.commons.ihe.xds.core.metadata.AssigningAuthority)1 Identifiable (org.openehealth.ipf.commons.ihe.xds.core.metadata.Identifiable)1 SpringTypeConverter (org.openehealth.ipf.commons.spring.core.config.SpringTypeConverter)1 ByteArrayToClinicalDocumentConverter (org.openehealth.ipf.platform.camel.ihe.continua.hrn.converters.ByteArrayToClinicalDocumentConverter)1 ByteArrayToDomConverter (org.openehealth.ipf.platform.camel.ihe.continua.hrn.converters.ByteArrayToDomConverter)1 ByteArrayToStringConverter (org.openehealth.ipf.platform.camel.ihe.continua.hrn.converters.ByteArrayToStringConverter)1 DataHandlerToByteArrayConverter (org.openehealth.ipf.platform.camel.ihe.continua.hrn.converters.DataHandlerToByteArrayConverter)1 GenericConversionService (org.springframework.core.convert.support.GenericConversionService)1