Commit 0db381fb authored by R.W.Majeed's avatar R.W.Majeed

extractor interface

parent c9aaf763
package org.aktin.dwh;
import java.io.IOException;
import java.nio.file.Path;
import java.sql.SQLException;
import java.time.Instant;
import javax.xml.transform.Source;
/**
* Extract data from the data warehouse
*
* @author R.W.Majeed
*
*/
public interface DataExtractor {
/**
* Extracts data to a directory. After return, the directory
* will contain the following files:
* <ul>
* <li>patients.txt</li>
* <li>encounters.txt</li>
* <li>[table_name].txt for each additional table
* </ul>
* <p>
* In case of a checked exception, it is guaranteed that no files and
* directories are created.
* <p>
* @param fromTimestamp start timestamp for the data to extract
* @param endTimestamp end timestamp for the data to extract
* @param exportDescriptor descriptor what data to extract
* @return File names of the created files
*
* @throws IOException error writing files
* @throws SQLException error while extracting data
*/
public String[] extractData(Instant fromTimestamp, Instant endTimestamp, Source exportDescriptor, Path destinationDir) throws IOException, SQLException;
}
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