The architecture of the oNCS platform. This figure represents the architecture of the oNCS platform. The Context Framework Layer is the most important layer. Within this layer the Context Interpreter controls all the context information. The ontology determines the structure of the Knowledge Base. The Knowledge Base contains all the data that conforms to the ontology. The Context Model provides access to the ontology by using Jena. Pellet is used to check the consistency of the model. The layer also holds all the Rules that work with the information in the Knowledge Base. The different Context Providers allow importing external information into the framework. This information is then added to the Knowledge Base. This new information can come from a database (Persistence Layer) or directly from a device (Device Layer and Context Gathering Layer). Currently three Context Providers are provided: the Person Provider, the Environment Provider and the Call Provider. The Query Services are used to extract information from the Knowledge Base. The Query Services can be used to visualize the knowledge or to use the information in another application (Application Layer). The methods in the Context Providers and Query Services were also made available as Web Services.