Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
metamod:xml-format [2008-10-29 13:40:02] egils |
metamod:xml-format [2022-05-31 09:29:32] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== XML format for dataset descriptions ====== | ====== XML format for dataset descriptions ====== | ||
| - | See also [[minutes2008_10_23]] | + | The following describes the internal metadata description of metamod. It evolved from [[minutes2008_10_23]] |
| + | |||
| + | For each dataset we will need two XML files: | ||
| + | |||
| + | |||
| + | ===== Dataset XMD File ===== | ||
| + | |||
| + | In addition to an XML file containing the metadata (in one of several possible formats), we will need an XML file that describes identification etc. for the dataset. | ||
| + | |||
| + | Such XML files will be given an " | ||
| < | < | ||
| Line 7: | Line 16: | ||
| < | < | ||
| | | ||
| - | creationdate=" | + | creationDate=" |
| - | drpath=" | + | datestamp=" |
| - | (EMBEDDED PART - see below) | + | |
| + | name=" | ||
| + | < | ||
| + | ... | ||
| + | </ | ||
| </ | </ | ||
| </ | </ | ||
| - | The EMBEDDED PART has varying content depending on the source | + | The important consequence of this XMD-file is that several metadata formats can be supported by METAMOD as long as translations (XSLT) and proper interpretation |
| + | |||
| + | ==== Documents ==== | ||
| + | |||
| + | * {{: | ||
| + | * {{: | ||
| + | * {{: | ||
| + | |||
| + | ==== Restrictions ==== | ||
| + | |||
| + | * 2009-02-17: The name field must match one or two / characters, one / meaning parent ('' | ||
| + | |||
| + | ===== Metadata XML File ===== | ||
| + | |||
| + | The XML files containing | ||
| + | |||
| + | One of these formats are defined by METAMOD2, and is only used as an internal format within | ||
| + | This format (MM2) is for metadata produced by the UPLOAD module or the QUEST module: | ||
| < | < | ||
| - | <metamod | + | <MM2 xmlns="" |
| - | < | + | |
| - | < | + | |
| - | ... | + | |
| - | </ | + | |
| < | < | ||
| // for each name,value pair. | // for each name,value pair. | ||
| - | </metamod> | + | </MM2> |
| </ | </ | ||
| - | If the source | + | ===== Metadata names with special meaning ===== |
| + | |||
| + | Metamod is generally ignorant of metadata-names, | ||
| + | |||
| + | * **area**: geographic area either as detailed area //Fram Strait// or as gcmd-list //Continent > Europe > Northern Europe > Scandanavia > Norway// | ||
| + | * **bounding_box** for the extraction | ||
| + | * **datacollection_period_from** | ||
| + | * **datacollection_period_to** | ||
| + | * **datacollection_period** -- deprecated since metamod 2.1 | ||
| + | * **topic**: used in quest as gcmd-list without '> HIDDEN', | ||
| + | * **variable**: | ||
| + | |||
| + | |||
| + | For translation to and from other metadata, please see the metadata-names in the [[faq]] entry on DIF-mapping. A extensive list of currently configured names can be found under: [[https:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== Documents ==== | ||
| + | |||
| + | * {{: | ||
| + | * {{: | ||
| + | * {{: | ||
| + | |||
| + | |||
| + | ===== Hints on coding ===== | ||
| + | |||
| + | Both metadata files should always be written as an atomic operation. To support | ||
| + | //flock// should be used for reading and writing to the file-system. //flock// should first lock the .xmd file, then the .xml file. Then, both files should be written. Afterwards, unlock first the .xml file, then the .xmd file. **Not using this order might lead to a deadlock.** | ||
| - | < | ||
| - | < | ||
| - | ... | ||
| - | </ | ||
| - | </ | ||