use of org.hisp.dhis.dxf2.dataset.streaming.StreamingXmlCompleteDataSetRegistrations in project dhis2-core by dhis2.
the class DefaultCompleteDataSetRegistrationExchangeService method saveCompleteDataSetRegistrationsXml.
@Override
public ImportSummary saveCompleteDataSetRegistrationsXml(InputStream in, ImportOptions importOptions, TaskId taskId) {
try {
in = StreamUtils.wrapAndCheckCompressionFormat(in);
CompleteDataSetRegistrations completeDataSetRegistrations = new StreamingXmlCompleteDataSetRegistrations(XMLFactory.getXMLReader(in));
return saveCompleteDataSetRegistrations(importOptions, taskId, completeDataSetRegistrations);
} catch (Exception ex) {
return handleImportError(taskId, ex);
}
}
use of org.hisp.dhis.dxf2.dataset.streaming.StreamingXmlCompleteDataSetRegistrations in project dhis2-core by dhis2.
the class JdbcCompleteDataSetRegistrationExchangeStore method writeCompleteDataSetRegistrationsXml.
//--------------------------------------------------------------------------
// CompleteDataSetRegistrationStore implementation
//--------------------------------------------------------------------------
@Override
public void writeCompleteDataSetRegistrationsXml(ExportParams params, OutputStream outputStream) {
CompleteDataSetRegistrations cdsr = new StreamingXmlCompleteDataSetRegistrations(XMLFactory.getXMLWriter(outputStream));
write(params, cdsr);
IOUtils.closeQuietly(outputStream);
}
Aggregations