Commit 5d0a6f76 authored by R.W.M's avatar R.W.M
Browse files

documentation, test metadata from etl supplier

parent 1815c883
......@@ -45,7 +45,11 @@ public interface ObservationSupplier extends Supplier<Observation>, AutoCloseabl
* Timestamp when the source data was extracted/downloaded/queried
public static final String META_SOURCE_TIMESTAMP = "source.timestamp";
* Timestamp when the data has been uploaded
public static final String META_UPLOAD_TIMESTAMP = "upload.timestamp";
* Strategy how to handle imported data.
* {@code replace-source} will drop any previous imports
......@@ -58,6 +58,8 @@ public class GroupedXMLWriter extends GroupedObservationHandler{
* Constructor to write XML to an {@link OutputStream}.
* Calling {@link #close()} will NOT close the specified output stream.
* The stream must be closed separately.
* @param output output stream
* @throws XMLStreamException initialisation error
Validate exceptions
test for specific errors in data files,
e.g. missing visit start timestamps in rows.
To do so, add data files with errors to test/resources
......@@ -9,6 +9,7 @@ import org.junit.Test;
import de.sekmi.histream.DateTimeAccuracy;
import de.sekmi.histream.Observation;
import de.sekmi.histream.ObservationSupplier;
import de.sekmi.histream.ext.Patient;
import de.sekmi.histream.ext.Visit;
import de.sekmi.histream.impl.Meta;
......@@ -40,6 +41,11 @@ public class TestETLSupplier {
public void expectMetadataPresent(){
Assert.assertNotNull("Source id metadata required",os.getMeta(ObservationSupplier.META_SOURCE_ID));
//Assert.assertNotNull("Source timestamp metadata required",os.getMeta(ObservationSupplier.META_SOURCE_TIMESTAMP));
public void testXMLConversion() throws Exception{
GroupedXMLWriter w = new GroupedXMLWriter(System.out);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment