Commit a90b0f1d authored by rwm's avatar rwm
Browse files

javadoc

parent 2221723e
...@@ -20,32 +20,56 @@ package de.sekmi.histream; ...@@ -20,32 +20,56 @@ package de.sekmi.histream;
* #L% * #L%
*/ */
import java.util.function.Supplier; import java.util.function.Supplier;
/** /**
* Supplier of observations. * Supplier of observations.
* *
* Also provides meta informaiton via {@link #getMeta(String)} * Also provides meta informaiton via {@link #getMeta(String)}
* <p> * <p>
* When an instance is constructed, meta information should be read from * When an instance is constructed, meta information should be read from
* the file (e.g. etl strategy and other instructions) * the file (e.g. etl strategy and other instructions)
* <p> * <p>
* TODO shouldn't this interface extend Closable? * TODO shouldn't this interface extend Closable?
* TODO maybe add error handler * TODO maybe add error handler
* @author Raphael * @author Raphael
* *
*/ */
public interface ObservationSupplier extends Supplier<Observation>, AutoCloseable{ public interface ObservationSupplier extends Supplier<Observation>, AutoCloseable{
/** /**
* Retrieve meta information for this supply of observations. * Retrieve meta information for this supply of observations.
* <p> * <p>
* Possible keys are source.id, source.timestamp, etl.strategy * Possible keys are source.id, source.timestamp, etl.strategy, order.grouped, order.sorted
* @param key meta key * <dl>
* @return value for the meta key * <dt>source.id</dt>
*/ * <dd>ID for the source which provides the observations
*
* <dt>source.timestamp</dt>
* <dd>Timestamp when the source data was extracted/downloaded/queried</dd>
*
* <dt>etl.strategy</dt>
* <dd>Strategy how to handle imported data.
* {@code replace-source} will drop any previous imports
* with the same {@code source.id}, {@code replace-visit} will
* delete any previous data with the same patient+visit combination.
* </dd>
*
* <dt>order.grouped</dt>
* <dd>If set to true, guarantees that all facts belonging to the same
* patient+visit combination are provided en bloc.
* </dd>
*
* <dt>order.sorted</dt>
* <dd>If set to true, guarantees that all facts within the same
* patient+visit combination occur in ascending order of start timestamp.
* </dd>
* </dl>
* @param key meta key
* @return value for the meta key
*/
String getMeta(String key); String getMeta(String key);
void close() throws Exception; void close() throws Exception;
} }
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