...
A product can be labelled with an area id and a source id.
It is possible to define individual files which possbile to archive products in the following ways:
- By defining which files should be archived
...
- . In this option it is possible to use wildcards and it is also possible to
...
- zip some files
...
Table 4.8 Delft-FEWS export configuration for archiving database snap shots
...
Element
...
Format
...
Description
...
general ComplexType
...
...
...
archiveFolder
...
ExportProductActivityComplexType
...
...
...
areaId
...
string
...
Id of the area to which this product belongs
...
- into a zipfile
- By defining an import folder in combination with a file pattern. Only the files which are found in this import folder and comply to this file pattern will be archived. The pattern will also be used to identify the creation time of the product.
In the sections below both options will be explained in more detail
Archiving files by defining which files should be archived
It is possible to define individual files which
...
should be archived as part of the product. But it is also possible to archive files based on a wild card.
Table 4.8 Delft-FEWS export configuration for archiving database snap shots
Element | Format | Description | |||
general ComplexType | |||||
moveFile | boolean | If this option is set to true the source file will be deleted after it has been archived. | |||
|
| ||||
archiveFolder | boolean | if this option is set to true the files will | sources/sourceFiles | ||
ExportProductActivityComplexType |
| string
| sources/relativePath|||
areaId | string | Id of the area to which this product belongs | |||
sourceId | string | Id of the source to which this product belongs | |||
sourceFile | string | File which should be archived as part of the productthe files identified by the tag sourceFiles will be exported to folder with the configurewithin the main folder of the data set identfied | |||
moveFile | boolean | If this option is set to true then the source file will be deleted after the file it has been copied to the archivearchived. | |||
An configuration example is given below.
sources/zipProduct | boolean | if this option is set to true the files will |
sources/sourceFiles | string | |
sources/relativePath | string | the files identified by the tag sourceFiles will be exported to folder with the configurewithin the main folder of the data set identfied |
moveFile | boolean | If this option is set to true then the source file will be deleted after the file has been copied to the archive |
An configuration example is given below.
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?>
<exportArchiveModule
xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/exportArchiveModule.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews">
<exportProducts>
<general>
<archiveFolder>$ARCHIVE_DIR$</archiveFolder>
</general>
<activities>
<exportProduct>
<areaId>area</areaId>
<sourceId>source</sourceId>
<sourceFile>$INPUT_FOLDER$/sourceA</sourceFile>
<sourceFile>$INPUT_FOLDER$/sourceB</sourceFile>
<moveFile>true</moveFile>
</exportProduct>
</activities>
</exportProducts>
</exportArchiveModule> |
An configuration example is given below.
Code Block | ||
---|---|---|
<?xml | ||
Code Block | ||
| ||
<?xml version="1.0" encoding="UTF-8"?> <exportArchiveModule xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/exportArchiveModule.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews"> <exportProducts> <general> <archiveFolder>$ARCHIVE_DIR$</archiveFolder> </general> <activities> <exportProduct> <areaId>area<<areaId>areaTest</areaId> <sourceId>source</sourceId> <sourceId>sourceTest</sourceId> <sources> <zipProduct>true</zipProduct> <sourceFile>$INPUT<sourceFiles>$INPUT_FOLDER$/sourceA</sourceFile>testdata/exportandmoveandzip/source?</sourceFiles> <sourceFile>$INPUT_FOLDER$/sourceB</sourceFile> <relativePath>aa</relativePath> <moveFile>true<</moveFile>sources> </exportProduct> <moveFile>true</moveFile> </activities> </exportProducts> </exportArchiveModule> |
An configuration example is given below.
</exportProduct>
</activities>
</exportProducts>
</exportArchiveModule> |
Archiving products by defining an import folder and a date/time pattern
It is possible to archive products from an import folder. The import folder should contain the files which should be exported to the archive.
After the files are archived they will be deleted from the import folder. Each file will be archived as a separate data set in the archive.
The creation time of the product will be derived from the file name by using a file pattern. If a file doesn''t comply to the configured file pattern then the file will not be archived.
An configuration example is given below
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?>
<exportArchiveModule
xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/exportArchiveModule.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews">
<exportProducts>
<general>
<archiveFolder>$ARCHIVE_DIR$</archiveFolder>
</general> | ||
Code Block | ||
<?xml version="1.0" encoding="UTF-8"?> <exportArchiveModule xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/exportArchiveModule.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews"> <exportProducts> <general> <archiveFolder>$ARCHIVE_DIR$</archiveFolder> </general> <activities> <exportProduct> <areaId>areaTest</areaId> <sourceId>sourceTest</sourceId> <sources> <activities> <zipProduct>true</zipProduct><exportProduct> <sourceFiles>$INPUT_FOLDER$/testdata/exportandmoveandzip/source?</sourceFiles><areaId>areaTest</areaId> <relativePath>aa</relativePath><sourceId>sourceTest</sourceId> <<importFolder>$IMPORT_DIR$</sources>importFolder> <moveFile>true</moveFile><fileNameProductDateTimePattern>yyyyMMdd'.nc'</fileNameProductDateTimePattern> </exportProduct> </activities> </exportProducts> </exportArchiveModule> |
...