This paper presents an approach for context modeling in complex self-adapted systems consisting of many independent context-aware applications. The contextual information used for adaptation of all system applications is described by an ontology treated as a global context model. A local context model tailored to the specific needs of a particular application is defined as a view over the global context in the form of a feature model. Feature models and their configurations derived from the global context state are then used by a specific dynamic software product line in order to adapt applications at runtime. The main focus of the paper is on the realization of mappings between global and local contexts. The paper describes an overall model architecture and provides corresponding metamodels as well as rules for a mapping between feature models and ontologies.