Commit 5cd3b54c authored by rwm's avatar rwm

reporting API added

parent f549bbff
Pipeline #276 skipped
.settings/
.classpath
.project
target/
\ No newline at end of file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>AKTIN : DWH API</name>
<groupId>org.aktin</groupId>
<artifactId>dwh-api</artifactId>
<version>0.1-SNAPSHOT</version>
<parent>
<groupId>org.aktin</groupId>
<artifactId>aktin</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>
<build>
<!--
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
-->
<plugins>
</plugins>
</build>
<dependencies>
<!-- unit tests -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package org.aktin.report;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
/**
* Interface for reports.
* A report specifies (1) which data should be extracted, (2) one or more R scripts
* to execute with the extracted data and (3) transformation scripts to generate
* PDF or HTML reports.
*
* @author R.W.Majeed
*
*/
public interface Report {
/**
* Get the report name
* @return report name
*/
String getName();
/**
* Get concept names which are guaranteed to occur only once per encounter.
* These concepts will be included in the generated encounter data table.
* @return concept IDs
*/
String[] getEncounterConcepts();
/**
* Get concepts names which may repeat in a given encounter. For each
* of these concepts, a separate data table will be generated.
* @return concept IDs
*/
String[] getRepeatingConcepts();
/**
* Copies all scripts and resource needed for the Rscript invocation
* to the specified working directory. The file names of all copied
* resources are returned on exit.
*
* @param workingDirectory working directory for the R invocation.
* @return file names of the copied resources. The first element of the
* returned array is the main script that should be run to generate
* the report resource.
*
* @throws IOException IO error. No files were copied.
*/
String[] copyResourcesForR(Path workingDirectory)throws IOException;
/**
* Copies all transformation scripts needed for the XML-FO transformation
* to generate a PDF report to the specified working directory.
*
*
* @param workingDirectory for the Apache FOP invocation
* @return files names of copied resources. At least two files must
* be returned: First element the XML input file and second element
* is the XSL file.
*
* @throws IOException IO error. No files were copied.
*/
String[] copyResourcesForFOP(Path workingDirectory)throws IOException;
/**
* Read static resource for web reports. Static resources are independent
* of any generated report data. E.g. css, images, javascript files
* @param path to the static resource
* @return input stream or {@code null} if the resource is not available
*/
InputStream readStaticWebResource(String path);
}
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