Commit 2e5c87de authored by R.W.Majeed's avatar R.W.Majeed

Standalone executable main method for processing import descriptors

parent 889e117c
package de.sekmi.histream.etl;
import java.nio.file.Paths;
import de.sekmi.histream.impl.Meta;
import de.sekmi.histream.io.GroupedXMLWriter;
import de.sekmi.histream.io.Streams;
/**
*
* Read and process a specified import descriptor and output the HIStream XML format
*
* @author R.W.Majeed
*
*/
public class XMLExport {
/**
* Read and process a specified import descriptor and output the HIStream XML format
* @param args single argument with file name
* @throws Exception error
*/
public static void main(String[] args) throws Exception{
if( args.length != 1 ){
System.err.println("Usage: XMLExport <import-descriptor-file>");
System.exit(-1);
}
ETLObservationSupplier suppl = ETLObservationSupplier.load(Paths.get(args[0]).toUri().toURL());
GroupedXMLWriter writer = new GroupedXMLWriter(System.out);
Meta.transfer(suppl, writer);
Streams.transfer(suppl, writer);
suppl.close();
writer.close();
}
}
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