Commit 82805973 authored by R.W.Majeed's avatar R.W.Majeed

constructor with file

parent 9229f91f
package de.sekmi.histream.etl;
import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.xml.bind.JAXB;
import de.sekmi.histream.Observation;
import de.sekmi.histream.ObservationFactory;
import de.sekmi.histream.ObservationSupplier;
......@@ -64,6 +67,9 @@ public class ETLObservationSupplier implements ObservationSupplier{
private DataSource ds;
public ETLObservationSupplier(File configuration, ObservationFactory factory) throws IOException, ParseException{
this(JAXB.unmarshal(configuration, DataSource.class), factory);
}
public ETLObservationSupplier(DataSource ds, ObservationFactory factory) throws IOException, ParseException {
this.ds = ds;
......
Markdown is supported
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