Commit dbeaa19e authored by rwm's avatar rwm
Browse files

fixed compile warnings

parent ff4434e3
......@@ -40,7 +40,6 @@ import de.sekmi.histream.Observation;
import de.sekmi.histream.ObservationException;
import de.sekmi.histream.ObservationFactory;
import de.sekmi.histream.ObservationHandler;
import de.sekmi.histream.ObservationProvider;
import de.sekmi.histream.ObservationSupplier;
import de.sekmi.histream.Plugin;
import de.sekmi.histream.conf.Configuration;
......
......@@ -24,13 +24,7 @@ package de.sekmi.histream.io;
import java.time.Instant;
import java.util.Hashtable;
import java.util.Map;
import java.util.Spliterator;
import java.util.function.Consumer;
import java.util.function.Supplier;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import de.sekmi.histream.Observation;
import de.sekmi.histream.ObservationFactory;
import de.sekmi.histream.ext.ExternalSourceType;
......
......@@ -24,6 +24,7 @@ package de.sekmi.histream.io;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import javax.xml.bind.JAXBException;
......@@ -46,9 +47,11 @@ public class GroupedXMLProvider implements FileObservationSupplierFactory, Plugi
@Override
public ObservationSupplier forFile(File file, ObservationFactory factory) throws IOException {
InputStream in = new FileInputStream(file);
try {
return new GroupedXMLReader(factory, new FileInputStream(file));
return new GroupedXMLReader(factory, in);
} catch (JAXBException | XMLStreamException | FactoryConfigurationError e) {
in.close();
throw new IOException(e);
}
}
......
......@@ -35,6 +35,7 @@ import de.sekmi.histream.Observation;
import de.sekmi.histream.ObservationFactory;
import de.sekmi.histream.ObservationSupplier;
@Deprecated
public class XMLObservationSupplier extends XMLObservationParser implements ObservationSupplier{
//private static final String namespaceURI = "http://sekmi.de/histream/dwh-eav";
protected XMLStreamReader reader;
......
......@@ -24,6 +24,7 @@ package de.sekmi.histream.io;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import javax.xml.stream.FactoryConfigurationError;
......@@ -33,6 +34,7 @@ import de.sekmi.histream.ObservationFactory;
import de.sekmi.histream.ObservationSupplier;
import de.sekmi.histream.Plugin;
@Deprecated
public class XMLProviderFactory implements FileObservationSupplierFactory, Plugin{
public XMLProviderFactory(Map<String,String> props) {
......@@ -45,9 +47,11 @@ public class XMLProviderFactory implements FileObservationSupplierFactory, Plugi
@Override
public ObservationSupplier forFile(File file, ObservationFactory factory) throws IOException {
InputStream in = new FileInputStream(file);
try {
return new XMLObservationSupplier(factory, new FileInputStream(file));
return new XMLObservationSupplier(factory, in);
} catch (XMLStreamException | FactoryConfigurationError e) {
in.close();
throw new IOException(e);
}
}
......
......@@ -42,8 +42,9 @@ public abstract class Column<T> {
String constantValue;
/**
* Replace the input value with the specified string or regular expression group from {@link #regexMatch}.
* Replace the input value with the specified string or regular expression group.
* If not specified, the full input string is used (regardless of match region).
* TODO remove?
*/
@XmlAttribute(name="regex-replace")
String regexReplace;
......
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