{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Media Scene",
    "description": "A document representing a collection of media assets and their tags",
    "type": "object",
    "properties": {
        "_id": {
            "description": "unique identifier for this scene",
            "type": "string"
        },
        "name": {
            "description": "human readable name to refer to the scene by",
            "type": "string"
        },
        "displayDuration": {
            "description": "How many seconds atemporal assets should be on the screen for",
            "type": "number"
        },
        "displayInterval": {
            "description": "How many seconds should be between the showing of assets on the screen",
            "type": "number"
        },
        "transitionDuration": {
            "description": "How many seconds it should take for an asset to appear/disappear from the screen",
            "type": "number"
        },
        "maximumOnScreen": {
            "description": "maximum counts of media types allowed on the screen at one time",
            "type": "object",
            "properties": {
                "image": {
                    "type": "integer"
                },
                "text": {
                    "type": "integer"
                },
                "video": {
                    "type": "integer"
                },
                "audio": {
                    "type": "integer"
                }
            }
        },
        "themes": {
            "description": "represents sets of tags bundled together to make a coherent theme. Each property represents a singular theme.",
            "type": "object",
            "additionalProperties": {
                "description": "Comma seperated list of tags that belong to this theme.",
                "type": "string"
            }
        },
        "scene": {
            "description": "a collection of objects representing the various assets of a scene",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "_id": {
                        "description": "unique identifier for this scene",
                        "type": "string"
                    },
                    "url": {
                        "description": "Url pointing to media asset if neccessary. Used for images, video, and audio.",
                        "type": "string"
                    },
                    "text": {
                        "description": "Text to display for text media asset.",
                        "type": "string"
                    },
                    "type": {
                        "description": "Kind of media it is (only 'image', 'text', 'video', and 'audio' is supported)",
                        "type": "string"
                    },
                    "tags": {
                        "description": "Semantic tags for this asset, comma seperated",
                        "type": "string"
                    }
                },
                "required": [
                    "_id",
                    "type",
                    "tags"
                ]
            }
        }
    },
    "required": [
        "_id",
        "name",
        "scene"
    ]
}