{ "$schema": "http://json-schema.org/schema#", "$schemaVersion": "0.1.1", "modelTags": "", "$id": "https://smart-data-models.github.io/dataModel.User/Activity/schema.json", "title": "Smart Data Model - User Activity schema", "description": "Information on the current activity performed by an anonymized user in a given point in time", "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": { "dateActivityStarted": { "type": "string", "format": "date-time", "description": "Property. It must be equal to UserActivity." }, "dateActivityEnded": { "type": "string", "format": "date-time", "description": "Property. Model:'https://schema.org/DateTime'. Activity's end timestamp." }, "refObject": { "description": "Relationship. Model:'https://schema.org/URL'. Reference to the object of the action (e.g. Car1). It may be another NGSI Entity or any `Object` identified by an URI.", "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$", "description": "Property. Identifier format of any NGSI entity" }, { "type": "string", "format": "uri", "description": "Property. Identifier format of any NGSI entity" } ] }, "activityType": { "type": "string", "description": "Property. Model:'https://schema.org/Text'. The action performed (e.g. Drive). Normative References: [https://schema.org/Action](https://schema.org/Action), [https://www.w3.org/TR/activitystreams-vocabulary/#activity-types](https://www.w3.org/TR/activitystreams-vocabulary/#activity-types), [https://health-lifesci.schema.org/PhysicalActivityCategory](https://health-lifesci.schema.org/PhysicalActivityCategory)" }, "refTarget": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$", "description": "Property. Identifier format of any NGSI entity" }, { "type": "string", "format": "uri", "description": "Property. Identifier format of any NGSI entity" } ], "description": "Relationship. Model:'https://schema.org/URL'. Reference to the target of the action (e.g. Office1)." }, "refAgent": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$", "description": "Property. Identifier format of any NGSI entity" }, { "type": "string", "format": "uri", "description": "Property. Identifier format of any NGSI entity" } ], "description": "Relationship. Model:'https://schema.org/URL'. Reference to the agent (i.e. a person) performing the activity. It may be another NGSI Entity or any `Agent` identified by an URI." }, "type": { "type": "string", "enum": [ "Activity" ], "description": "Property. NGSI Entity type. It has to be Activity" } } } ], "required": [ "type", "id" ] }