Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is an import that makes use of the custom import mechanism described in Custom import formats. The WQ CSV is an extension of the UmAquo CSV import and makes use of the same text parser, UmAquoCsvTimeSeriesParser.java, and a bin directory containing all dependant library files (UmAquo.zip ).

For more information on the UmAquoCsvTimeSeriesParser.java please see the section UmAquoCsvImport.

...

The WQ CSV import format differs slightly from the CSV import format is described in the document SpecsImporterenCSV.doc. This format is not so strictly defined and it is also lacking the header information required by the UmAquoCsvTimeSeriesParser class.   Here follows an example CSV import file:

...

Validation of the values in the UmAquo import files is done against the Aquo schemas . Instead of validating over the web, validation is done locally by validating against the schemas present in the resource file UmAquo_schemas.jar\. This archive contains a subset of schemas from the Aquo schemas site. If the Aquo schemas are updated then a new version of the schemas jar must be distributed.

...

Here is an example import module configuration file:<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesImportRun xmlns="http://www.wldelft.nl/fews"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsdImage Removed">
    <!-- This is an example import configuration file for importing UmAquo CSV data from an import directory    -->
    <import>
        <general>
<!- - Class name of UmAquo CSV parser -->
            <parserClassName>nl.deltares.umaquo.timeseriesparsers.UmAquoCsvTimeSeriesParser</parserClassName>

<!-- Path to directory containing UmAquo libraries and schemas. If omitted then the content of the umaquo-bin
can be placed in the FEWS-bin dir -->
            <binDir>%REGION_HOME%/Modules/umaquo-bin</binDir>
            
<!- - Directory from which CSV files are to be imported -->
<folder>$IMPORT_FOLDER$/UmAquo/CSV</folder>
            <failedFolder>$IMPORT_FAILED_FOLDER$/UmAquo/CSV</failedFolder>
            <backupFolder>$IMPORT_BACKUP_FOLDER$/UmAquo/CSV</backupFolder>
            <idMapId>IdImportUmAquo</idMapId>
            <importTimeZone>
                <timeZoneOffset>+00:00</timeZoneOffset>
            </importTimeZone>
        </general>
<properties>
<!- - Optional: comment line prefix character. Default = # -->
<string key="COMMENT_PREFIX" value="#"/>
<!- - Optional: column separator character. Default = ; -->
<string key="COLUMN_SEPARATOR" value=";"/>
<!- - Optional: decimal character. Default = . - ->
<string key="DECIMAL_SEPARATOR" value="."/>
<!-- Optional: Regular expression for date value. Default = yyyy-MM-dd -->
<string key="CSV_DATEPATTERN" value=";"/>
<!- - Optional: Regular expression for time value. Default = HH:mm:ss -->
<string key="CSV_TIMEPATTERN" value="HH:mm:ss"/>
<!- - Optional: select UmAquo schema version 2009 or 2011. Default = 2009 -->
<int key="SCHEMA_VERSION" value="2009"/>
<!- - Optional: allow lenient validation. Default = false -->
<bool key="LENIENT" value="true"/>
</properties>
        <timeSeriesSet>
            <moduleInstanceId>ImportUmAquo</moduleInstanceId>
            <valueType>scalar</valueType>
            <parameterId>MyPar</parameterId>
            <locationSetId>MyLocSet</locationSetId>
            <timeSeriesType>external historical</timeSeriesType>
            <timeStep unit="nonequidistant"/>
            <readWriteMode>add originals</readWriteMode>
            <synchLevel>1</synchLevel>
        </timeSeriesSet>
    </import>
</timeSeriesImportRun>
Here is an example id-map file:<?xml version="1.0" encoding="UTF-8"?>
<idMap version="1.1" xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/idMap.xsdImage Removed">
    <!-- Parameter id mapping can be done in three ways - ->
    <!-- 1st: Concatentate GrootheidCode and ParameterCode with '.' in between -->
    <map internalLocation="LOC-001" internalParameter="PAR-001" externalLocation="Meetpunt"
         externalParameter="GrootheidCode.ParameterCode" externalQualifier="EenheidCode" externalQualifier1="HoedanigheidCode" externalQualifier2="CompartimentCode" />
    <!- - in the case of Biotaxon use ParameterName instead of ParameterCode-->
    <map internalLocation="LOC-001" internalParameter="PAR-001" externalLocation="Meetpunt"
     externalParameter="GrootheidCode.ParameterName" externalQualifier="EenheidCode" externalQualifier1="HoedanigheidCode" externalQualifier2="CompartimentCode" />
    <!- - 2st: If only GrootheidCode then use this as external parameter -->
    <map internalLocation="LOC-001" internalParameter="PAR-002" externalLocation="Meetpunt"
         externalParameter="GrootheidCode" externalQualifier="EenheidCode" externalQualifier1="HoedanigheidCode" externalQualifier2="CompartimentCode" />
    <!-- 3st: If only TyperingCode then use this as external parameter - ->
    <map internalLocation="LOC-001" internalParameter="PAR-003" externalLocation="Meetpunt"
         externalParameter="TyperingCode" externalQualifier="EenheidCode" externalQualifier1="HoedanigheidCode" externalQualifier2="CompartimentCode" />
 </idMap>
Id-Mapping goes as follows:

...

Here is an example flag conversion file:<?xml version="1.0" encoding="UTF-8"?>
<flagConversions xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/flagConversions.xsdImage Removed">
  <flagConversion>
    <inputFlag>     <value>0</value></inputFlag>
    <outputFlag>    <value>0</value></outputFlag>
  </flagConversion>
    <flagConversion>
      <inputFlag>     <value>3</value></inputFlag>
      <outputFlag>    <value>3</value></outputFlag>
    </flagConversion>
    <flagConversion>
      <inputFlag>     <value>4</value></inputFlag>
      <outputFlag>    <value>0</value></outputFlag>
    </flagConversion>
    <flagConversion>
      <inputFlag>     <value>5</value></inputFlag>
      <outputFlag>    <value>0</value></outputFlag>
    </flagConversion>
  <flagConversion>
    <inputFlag>     <value>6</value></inputFlag>
    <outputFlag>    <value>0</value></outputFlag>
  </flagConversion>
  <flagConversion>
    <inputFlag>     <value>7</value></inputFlag>
    <outputFlag>    <value>0</value></outputFlag>
  </flagConversion>
  <flagConversion>
    <inputFlag>     <value>10</value></inputFlag>
    <outputFlag>    <value>2</value></outputFlag>
  </flagConversion>
  <flagConversion>
    <inputFlag>     <value>20</value></inputFlag>
    <outputFlag>    <value>2</value></outputFlag>
  </flagConversion>
  <flagConversion>
    <inputFlag>     <value>25</value></inputFlag>
    <outputFlag>    <value>2</value></outputFlag>
  </flagConversion>
  <flagConversion>
    <inputFlag>     <value>30</value></inputFlag>
    <outputFlag>    <value>1</value></outputFlag>
  </flagConversion>
  <flagConversion>
    <inputFlag>     <value>50</value></inputFlag>
    <outputFlag>    <value>6</value></outputFlag>
  </flagConversion>
    <flagConversion>
      <inputFlag>     <value>98</value></inputFlag>
      <outputFlag>    <value>6</value></outputFlag>
    </flagConversion>
    <flagConversion>
      <inputFlag>     <value>99</value></inputFlag>
      <outputFlag>    <value>9</value></outputFlag>
    </flagConversion>
    <defaultOuputFlag><value>0</value></defaultOuputFlag>
   <missingValueFlag><value>9</value></missingValueFlag>
</flagConversions>