// Path: feeder/src/main/java/org/n52/sos/importer/feeder/csv/WrappedCSVReader.java
// public class WrappedCSVReader implements CsvParser {
// 
// 	private CSVReader csvReader;
// 
// 	@Override
// 	public String[] readNext() throws IOException {
// 		return csvReader.readNext();
// 	}
// 
// 	@Override
// 	public void init(final BufferedReader bufferedReader,
// 			final Configuration configuration) {
// 		final int flwd = configuration.getFirstLineWithData();
// 		final char separator = configuration.getCsvSeparator(),
// 				quotechar = configuration.getCsvQuoteChar(),
// 				escape = configuration.getCsvEscape();
// 		csvReader = new CSVReader(bufferedReader, separator, quotechar, escape, flwd);
// 	}
// 
// 	@Override
// 	public int getSkipLimit() {
// 		return 1;
// 	}
// 
// }


import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.MessageFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.regex.Pattern;
import javax.xml.namespace.QName;
import org.apache.xmlbeans.XmlError;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlOptions;
import org.n52.sos.importer.feeder.csv.WrappedCSVReader;
import org.n52.sos.importer.feeder.model.Offering;
import org.n52.sos.importer.feeder.model.Position;
import org.n52.sos.importer.feeder.model.Sensor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.x52North.sensorweb.sos.importer.x04.AdditionalMetadataDocument.AdditionalMetadata.FOIPosition;
import org.x52North.sensorweb.sos.importer.x04.ColumnDocument.Column;
import org.x52North.sensorweb.sos.importer.x04.FeatureOfInterestType;
import org.x52North.sensorweb.sos.importer.x04.KeyDocument.Key;
import org.x52North.sensorweb.sos.importer.x04.MetadataDocument.Metadata;
import org.x52North.sensorweb.sos.importer.x04.ObservedPropertyType;
import org.x52North.sensorweb.sos.importer.x04.RelatedFOIDocument.RelatedFOI;
import org.x52North.sensorweb.sos.importer.x04.RelatedSensorDocument.RelatedSensor;
import org.x52North.sensorweb.sos.importer.x04.SensorType;
import org.x52North.sensorweb.sos.importer.x04.SosImportConfigurationDocument;
import org.x52North.sensorweb.sos.importer.x04.SosImportConfigurationDocument.SosImportConfiguration;
import org.x52North.sensorweb.sos.importer.x04.TypeDocument.Type;
import org.x52North.sensorweb.sos.importer.x04.TypeDocument.Type.Enum;
import org.x52North.sensorweb.sos.importer.x04.UnitOfMeasurementType;
			if (regEx != null && !regEx.isEmpty()) {
				patterns.add(Pattern.compile(regEx));
			}
		}
		return patterns.toArray(new Pattern[patterns.size()]);
	}

	public boolean isInsertSweArrayObservationTimeoutBufferSet() {
		return importConf.getSosMetadata().isSetInsertSweArrayObservationTimeoutBuffer();
	}

	public int getInsertSweArrayObservationTimeoutBuffer() {
		if (isInsertSweArrayObservationTimeoutBufferSet()) {
			return importConf.getSosMetadata().getInsertSweArrayObservationTimeoutBuffer();
		}
		throw new IllegalArgumentException("Attribute 'insertSweArrayObservationTimeoutBuffer' of <SosMetadata> not set.");
	}

	public int getSampleSizeDivisor() {
		if (isSamplingFile() && importConf.getDataFile().isSetSampleSizeDivisor()) {
			return importConf.getDataFile().getSampleSizeDivisor();
		}
		return 1;
	}

	public boolean isCsvParserDefined() {
		return importConf.getCsvMetadata().isSetCsvParserClass();
	}

	public String getCsvParser() {
// Path: feeder/src/main/java/org/n52/sos/importer/feeder/csv/WrappedCSVReader.java
// public class WrappedCSVReader implements CsvParser {
// 
// 	private CSVReader csvReader;
// 
// 	@Override
// 	public String[] readNext() throws IOException {
// 		return csvReader.readNext();
// 	}
// 
// 	@Override
// 	public void init(final BufferedReader bufferedReader,
// 			final Configuration configuration) {
// 		final int flwd = configuration.getFirstLineWithData();
// 		final char separator = configuration.getCsvSeparator(),
// 				quotechar = configuration.getCsvQuoteChar(),
// 				escape = configuration.getCsvEscape();
// 		csvReader = new CSVReader(bufferedReader, separator, quotechar, escape, flwd);
// 	}
// 
// 	@Override
// 	public int getSkipLimit() {
// 		return 1;
// 	}
// 
// }


// Path: feeder/src/main/java/org/n52/sos/importer/feeder/Configuration.java
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.MessageFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.regex.Pattern;
import javax.xml.namespace.QName;
import org.apache.xmlbeans.XmlError;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlOptions;
import org.n52.sos.importer.feeder.csv.WrappedCSVReader;
import org.n52.sos.importer.feeder.model.Offering;
import org.n52.sos.importer.feeder.model.Position;
import org.n52.sos.importer.feeder.model.Sensor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.x52North.sensorweb.sos.importer.x04.AdditionalMetadataDocument.AdditionalMetadata.FOIPosition;
import org.x52North.sensorweb.sos.importer.x04.ColumnDocument.Column;
import org.x52North.sensorweb.sos.importer.x04.FeatureOfInterestType;
import org.x52North.sensorweb.sos.importer.x04.KeyDocument.Key;
import org.x52North.sensorweb.sos.importer.x04.MetadataDocument.Metadata;
import org.x52North.sensorweb.sos.importer.x04.ObservedPropertyType;
import org.x52North.sensorweb.sos.importer.x04.RelatedFOIDocument.RelatedFOI;
import org.x52North.sensorweb.sos.importer.x04.RelatedSensorDocument.RelatedSensor;
import org.x52North.sensorweb.sos.importer.x04.SensorType;
import org.x52North.sensorweb.sos.importer.x04.SosImportConfigurationDocument;
import org.x52North.sensorweb.sos.importer.x04.SosImportConfigurationDocument.SosImportConfiguration;
import org.x52North.sensorweb.sos.importer.x04.TypeDocument.Type;
import org.x52North.sensorweb.sos.importer.x04.TypeDocument.Type.Enum;
import org.x52North.sensorweb.sos.importer.x04.UnitOfMeasurementType;

			if (regEx != null && !regEx.isEmpty()) {
				patterns.add(Pattern.compile(regEx));
			}
		}
		return patterns.toArray(new Pattern[patterns.size()]);
	}

	public boolean isInsertSweArrayObservationTimeoutBufferSet() {
		return importConf.getSosMetadata().isSetInsertSweArrayObservationTimeoutBuffer();
	}

	public int getInsertSweArrayObservationTimeoutBuffer() {
		if (isInsertSweArrayObservationTimeoutBufferSet()) {
			return importConf.getSosMetadata().getInsertSweArrayObservationTimeoutBuffer();
		}
		throw new IllegalArgumentException("Attribute 'insertSweArrayObservationTimeoutBuffer' of <SosMetadata> not set.");
	}

	public int getSampleSizeDivisor() {
		if (isSamplingFile() && importConf.getDataFile().isSetSampleSizeDivisor()) {
			return importConf.getDataFile().getSampleSizeDivisor();
		}
		return 1;
	}

	public boolean isCsvParserDefined() {
		return importConf.getCsvMetadata().isSetCsvParserClass();
	}

	public String getCsvParser() {
		return isCsvParserDefined()?importConf.getCsvMetadata().getCsvParserClass():WrappedCSVReader.class.getName();