Event message header Content Model
Event messages are XML documents. The content model for events consists of a generic metadata message header with a payload of data, such as IoTProperty state observations of IoTEntities. The content model is adapted to the semantic web standards from W3C, namely the RDFa Core 1.1 – Second Edition.
Figure: The top level of the generic Event Model
The Event content model is defined in the Event XML Schema and basically consists of three parts, a descriptive event metadata section (EventMeta), an event source description (Source) and a content body (Content) that includes the actual payload of the event, e.g. a temperature reading for a room entity.
The @about and @prefix attributes will be used to express a globally unique identifier and ontology reference definitions for the event message. Please see the RDFa section for further information on usage of these attributes.
Figure: The EventMeta content model
The EventMeta element is described above. The EventID includes a globally unique identifier of the event. It is provided for compatibility reasons and MUST be the same as the value expressed in the @about attribute of the Event element.
The TimeStamp element holds the datetime of when the event was first generated.
The EventType and Topic elements both provides means for tagging the event with descriptive metadata according to a predefined ontology referenced using the @typeof attribute (RDFa).
The Comment element can be used to provide human readable information about the event. The intention is that this element may used during development and testing.
Finally, the content of an EventMeta is open for extension by any other element provided that it is defined within an namespace that differs from the target namespace of the Event model schema.
[Describe the Source element]
Figure: An example of an Event message
[add more details here]
Event data content – The message payload
The event payload as expressed within the Content element is expected to follow the IoTEntity XML Schema for IoT applications. Please see the IoTEntity section for further information about this model.
The event payload may however be any XML content that does not violate the Well-formed property of the XML document. The only constraint is that the Event XML Schema requires that the Content child elements are defined in another namespace than used as target namespace by the Event schema itself.