{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "schema definitions for reusable properties",
    "definitions": {
        "url": {
            "type": "string",
            "pattern": "(https?|ftp):\\/\\/(-\\.)?([^\\s\\/?\\.#-]+\\.?)+(\\/[^\\s]*)?$"
        },
        "uri": {
            "type": "string",
            "description": "Location (address) for on-line access using a Uniform Resource Identifier, usually in the form of a Uniform Resource Locator (URL).",
            "example": "../examples/uri.json",
            "translation": {
                "ISO 19115-2": [
                    "CI_OnlineResource > linkage"
                ]
            },
            "pattern": "([A-Za-z][A-Za-z0-9+\\-.]*):(?:(//)(?:((?:[A-Za-z0-9\\-._~!$&'()*+,;=:]|%[0-9A-Fa-f]{2})*)@)?((?:\\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::)(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)|[Vv][0-9A-Fa-f]+\\.[A-Za-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:[A-Za-z0-9\\-._~!$&'()*+,;=]|%[0-9A-Fa-f]{2})*))(?::([0-9]*))?((?:/(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)|/((?:(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:/(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)?)|((?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:/(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)|)(?:\\?((?:[A-Za-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*))?(?:\\#((?:[A-Za-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*))?"
        },
        "date": {
            "type": "string",
            "description": "An ISO 8601 date/timestamp.",
            "example": "../examples/date.json",
            "translation": {
                "ISO 19115-2": [
                    "CI_Date > date",
                    "FC_FeatureCatalogue > versionDate"
                ],
                "FGDC CSDGM": [
                    "idinfo > citation > citeinfo > pubdate"
                ]
            },
            "pattern": "^(\\d{4}(-\\d{2})?(-\\d{2})?$)|(^\\d{4}-\\d{2}-\\d{2}(T\\d{2})?(\\:\\d{2}(\\:\\d{2}(\\.\\d+)?)?|Z)?(Z|(-|\\+)\\d{2}(:\\d{2})?)?$)"
        },
        "dateObject": {
            "type": "object",
            "description": "An ISO 8601 date/timestamp and type.",
            "example": "../examples/dateObject.json",
            "required": [
                "date",
                "dateType"
            ],
            "additionalProperties": true,
            "properties": {
                "date": {
                    "$ref": "#/definitions/date"
                },
                "dateType": {
                    "type": "string",
                    "description": "The type of date.",
                    "translation": {
                        "ISO 19115-2": [
                            "CI_Date > dateType [CI_DateTypeCode]"
                        ]
                    },
                    "codelist": "iso_dateType",
                    "minLength": 1
                },
                "description": {
                    "type": "string",
                    "description": "Supplemental information describing the date context."
                }
            }
        }
    },
    "properties": {
        "url": {
            "$ref": "#/definitions/url"
        },
        "uri": {
            "$ref": "#/definitions/uri"
        },
        "date": {
            "$ref": "#/definitions/date"
        },
        "dateObject": {
            "$ref": "#/definitions/dateObject"
        }
    },
    "required": [
        "url",
        "uri",
        "date",
        "dateObject"
    ]
}