{ "$schema": "http://json-schema.org/schema#", "$schemaVersion": "0.0.1", "modelTags": "OCF", "$id": "https://smart-data-models.github.io/dataModel.IoTDataModels/Door/schema.json", "title": "Door", "description": "Smart Data Models Program adaptation of the original IoTData data Models. This Resource describes the open state of the door. A door is modelled by means of openState (Open/Closed), openDuration (ISO 8601 Time), and openAlarm (boolean). For Property 'openState', the value 'Open' indicates the door is open. The value 'Closed' indicates the door is closed. The type of Property 'openDuration' is an RFC Time encoded string. The Property 'openAlarm' value 'true' indicates that the open alarm is active. The openAlarm value 'false' indicates that open alarm is not active. retrieves the state of the Door.", "type": "object", "allOf": [ { "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/GSMA-Commons" }, { "$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/Location-Commons" }, { "properties": { "rt": { "description": "Property. The Resource Type.", "items": { "enum": [ "oic.r.door" ], "maxLength": 64, "type": "string" }, "minItems": 1, "uniqueItems": true, "readOnly": true, "type": "array" }, "openDuration": { "description": "Property. A string representing duration formatted as defined in ISO 8601. Allowable formats are: P[n]Y[n]M[n]DT[n]H[n]M[n]S, P[n]W, P[n]Y[n]-M[n]-DT[0-23]H[0-59]:M[0-59]:S, and P[n]W, P[n]Y[n]M[n]DT[0-23]H[0-59]M[0-59]S. P is mandatory, all other elements are optional, time elements must follow a T.", "type": "string", "pattern": "^(P(?!$)([0-9]+Y)?([0-9]+M)?([0-9]+W)?([0-9]+D)?((T(?=[0-9]+[HMS])([0-9]+H)?([0-9]+M)?([0-9]+S)?)?))$|^(P[0-9]+W)$|^(P[0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|2[0-9]|1[0-9]|0[1-9])T(2[0-3]|1[0-9]|0[1-9]):([0-5][0-9]):([0-5][0-9])$|^(P[0-9]{4})(1[0-2]|0[1-9])(3[0-1]|2[0-9]|1[0-9]|0[1-9])T(2[0-3]|1[0-9]|0[1-9])([0-5][0-9])([0-5][0-9])$" }, "openState": { "description": "Property. The state of the door (open or closed).", "enum": [ "Open", "Closed" ], "readOnly": true, "type": "string" }, "openAlarm": { "description": "Property. The state of the door open alarm.", "type": "boolean" }, "n": { "type": "string", "maxLength": 64, "readOnly": true, "description": "Property. Friendly name of the Resource" }, "if": { "description": "Property. The OCF Interface set supported by this Resource.", "items": { "enum": [ "oic.if.a", "oic.if.baseline" ], "type": "string" }, "minItems": 2, "uniqueItems": true, "readOnly": true, "type": "array" }, "type": { "type": "string", "enum": [ "Door" ], "description": "Property. NGSI entity type. It has to be Door" } } } ], "derivedFrom": "https://github.com/OpenInterConnect/IoTDataModels/blob/master/DoorResURI.swagger.json", "license": "https://github.com/OpenInterConnect/IoTDataModels/blob/master/README.md", "required": [ "id", "type" ] }