metadata.json 3.45 KB
Newer Older
deniss.marinuks's avatar
deniss.marinuks committed
1
{
2
    "$schema": "http://json-schema.org/draft-07/schema#",
3
4
5
    "type": "object",
    "additionalProperties": true,
    "properties": {
6
        "_id": false,
7
        "deviceID": {
8
9
            "type": "number"
        },
10
11
12
        "subDeviceID": {
            "type": "number"
        },
13
        "serialNumber": {
14
15
16
            "type": "string"
        },
        "timestamp": {
17
18
19
20
21
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "start": {
                    "type": "string",
22
                    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\+[0-9]{2}:?[0-9]{2})$"
23
24
25
                },
                "stop": {
                    "type": "string",
26
                    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\+[0-9]{2}:?[0-9]{2})$"
27
28
29
30
31
32
                }
            },
            "required": [
                "start",
                "stop"
            ]
33
34
        },
        "location": {
35
36
37
38
39
40
41
42
43
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "latitude": {
                    "type": "number"
                },
                "longitude": {
                    "type": "number"
                },
44
45
46
                "geometry": {
                    "type": "object",
                    "properties": {
47
                        "type": {
48
49
50
51
                            "type": "string",
                            "pattern": "^(Point|LineString|Polygon|MultiPoint|MultiLineString|MultiPolygon)$"
                        },
                        "coordinates": {
52
53
54
                            "type": "array",
                            "minItems": 2,
                            "maxItems": 2
55
56
57
                        }
                    }
                },
58
59
60
61
62
63
64
65
66
67
68
                "altitude": {
                    "type": "number",
                    "optional": true
                },
                "geodeticDatum": {
                    "type": "string",
                    "optional": true
                }
            },
            "required": [
                "latitude",
69
70
                "longitude",
                "geometry"
71
            ]
72
        },
73
74
75
        "usableForResearchPurposes": {
            "type": "boolean"
        },
76
77
        "sourceFiles": {
            "type": "array",
78
            "items": {
79
80
                "type": "string",
                "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]+$"
81
            },
82
83
            "uniqueItems": true
        },
84
85
86
        "files": {
            "type": "array",
            "minItems": 1,
87
            "uniqueItems": true,
88
            "items": {
89
90
91
92
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "fileName": {
93
94
                        "type": "string",
                        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]+$"
95
                    },
deniss.marinuks's avatar
deniss.marinuks committed
96
97
98
                    "fileSize": {
                        "type": "number"
                    },
99
100
101
                    "md5Checksum": {
                        "type": "string"
                    }
deniss.marinuks's avatar
deniss.marinuks committed
102
103
104
105
106
107
                },
                "required": [
                    "fileName",
                    "fileSize",
                    "md5Checksum"
                ]
108
            }
deniss.marinuks's avatar
deniss.marinuks committed
109
110
        }
    },
111
    "required": [
112
113
        "deviceID",
        "serialNumber",
114
115
        "timestamp",
        "location",
116
        "usableForResearchPurposes",
117
        "sourceFiles",
118
119
        "files"
    ]
120
}