{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://api.npolar.no/schema/ny-alesund-1.0.0",
    "title": "Metadata schema for datasets collected in the Ny-\u00c5lesund area by NPI and other institutions.",
    "description": "Metadata related to datasets collected by the dirrerent research stations located in the Ny-\u00c5lesund area.",
    "type": "object",
    "additionalProperties": false,
    "required": [
        "title"
    ],
    "properties": {
        "id": {
            "description": "Identifier (UUID | URI)",
            "type": "string"
        },
        "title": {
            "description": "Title descriptive of the dataset",
            "type": "string"
        },
        "parameters": {
            "type": "array",
            "additionalItems": false,
            "items": {
                "type": "string"
            }
        },
        "summary": {
            "description": "Free text description of the dataset. Instrument, System, Method, frequency and time resolution should be mentioned here.",
            "type": "string"
        },
        "topics": {
            "description": "Topic of the dataset",
            "type": "array",
            "additionalItems": false,
            "items": {
                "type": "string",
                "enum": [
                    "atmosphere",
                    "biology",
                    "chemistry",
                    "climate",
                    "conservation",
                    "ecology",
                    "ecotoxicology",
                    "environment",
                    "geology",
                    "glaciology",
                    "management",
                    "marine",
                    "maps",
                    "oceanography",
                    "other",
                    "remote-sensing",
                    "seaice",
                    "social sciences",
                    "terrestrial",
                    "technology and engineering",
                    "topography",
                    "vegetation"
                ]
            },
            "default": [
                "other"
            ],
            "minItems": 1,
            "_uniqueItems": true
        },
        "research_station": {
            "description": "Research station the dataset is related to",
            "type": "string",
            "enum": [
                "NPI - Norwegian Polar Institute",
                "AWIPEV - French-German Arctic Research Base",
                "CAA - Chinese Arctic and Antarctic Administration",
                "CNR - National Research Council of Italy",
                "KOPRI - Korean Polar Research Base",
                "NCAOR - National Centre for Antarctic & Ocean Research (India)",
                "NMA - Norwegian Mapping Authority - NMA",
                "NERC - National Environmental Research Council (UK)",
                "NIPR - National Institute for Polar Research (Japan)",
                "UIG - Arctic Centre of the University of Groningen (Netherlands)"
            ]
        },
        "people": {
            "description": "Primary contact for information about the dataset.",
            "type": "array",
            "additionalItems": false,
            "required": [
                "first_name",
                "last_name",
                "email"
            ],
            "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "first_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_name": {
                        "type": "string"
                    },
                    "roles": {
                        "type": "array",
                        "items": {
                            "enum": [
                                "pointOfContact"
                            ]
                        },
                        "default": [
                            "pointOfContact"
                        ]
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                }
            }
        },
        "organisations": {
            "description": "Organisations connected to the dataset",
            "type": "array",
            "additionalItems": false,
            "maxItems": 1,
            "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "roles": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "owner"
                            ]
                        },
                        "default": [
                            "owner"
                        ]
                    }
                },
                "required": [
                    "name",
                    "roles"
                ]
            }
        },
        "location": {
            "type": "array",
            "additionalItems": false,
            "description": "Geographical area or location of the dataset. Coordinates as WGS-84 decimal degrees",
            "items": {
                "type": "object",
                "properties": {
                    "northeast": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "latitude": {
                                "type": "number",
                                "minimum": 78.55,
                                "maximum": 79.3333
                            },
                            "longitude": {
                                "type": "number",
                                "minimum": 10.4,
                                "maximum": 14.0
                            }
                        }
                    },
                    "southwest": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                            "latitude": {
                                "type": "number",
                                "minimum": 78.55,
                                "maximum": 79.3333
                            },
                            "longitude": {
                                "type": "number",
                                "minimum": 10.4,
                                "maximum": 14.0
                            }
                        }
                    }
                }
            }
        },
        "placenames": {
            "type": "array",
            "additionalItems": false,
            "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "placename": {
                        "type": "string"
                    },
                    "latitude": {
                        "type": "number",
                        "minimum": 78.55,
                        "maximum": 79.3333
                    },
                    "longitude": {
                        "type": "number",
                        "minimum": 10.4,
                        "maximum": 14.0
                    },
                    "activity": {
                        "description": "Start and stop of data collection. For year registration use January 1ste as the date.",
                        "type": "array",
                        "additionalItems": false,
                        "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                                "start": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time"
                                },
                                "stop": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time"
                                }
                            }
                        }
                    }
                }
            }
        },
        "links": {
            "description": "Required link to RiS project page. Links to data and original metadata are recommended if available.",
            "type": "array",
            "additionalItems": false,
            "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "rel": {
                        "type": "string",
                        "enum": [
                            "ris",
                            "data",
                            "metadata"
                        ]
                    },
                    "href": {
                        "type": "string",
                        "format": "uri"
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "href"
                ],
                "default": {
                    "rel": "ris",
                    "href": "",
                    "title": "Link to the RiS Project page"
                }
            },
            "minItems": 1
        },
        "database_suggestion": {
            "description": "If the data is not in a database now, which database should it be in?",
            "type": "string"
        },
        "monitoring_program": {
            "description": "Can this parameter be part of the monitoring program?",
            "type": "boolean"
        },
        "created": {
            "description": "Metadata was published",
            "type": [
                "string",
                "null"
            ],
            "format": "date-time"
        },
        "updated": {
            "description": "Metadata was updated",
            "type": [
                "string",
                "null"
            ],
            "format": "date-time"
        },
        "released": {
            "description": "Data released datetime (may be in the future)",
            "type": [
                "string",
                "null"
            ],
            "format": "date-time"
        },
        "_id": {
            "description": "Internal id",
            "type": "string"
        },
        "_rev": {
            "description": "Internal revision",
            "type": "string"
        },
        "created_by": {
            "type": "string"
        },
        "collection": {
            "type": "string",
            "default": "ny-\u00e5lesund"
        },
        "updated_by": {
            "type": "string"
        }
    }
}