Skip to main content
summaryrefslogtreecommitdiffstats
blob: 2d76e8001ac81f78660f0771468ab24bed0d1def (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/********************************************************************************
 * Copyright (c) 2015-2018 Contributors to the Eclipse Foundation
 *
 * See the NOTICE file(s) distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 ********************************************************************************/


package org.eclipse.mdm.api.base.model;

import org.eclipse.mdm.api.base.adapter.Core;

/**
 * Implementation of the context sensor entity types. Instances of this class
 * are only provided / managed via the owning {@link ContextComponent}. A
 * context sensor may be related to a {@link Channel}.
 *
 * @since 1.0.0
 * @author Viktor Stoehr, Gigatronik Ingolstadt GmbH
 * @author Sebastian Dirsch, Gigatronik Ingolstadt GmbH
 */
public class ContextSensor extends BaseEntity implements Deletable {

	// ======================================================================
	// Constructors
	// ======================================================================

	/**
	 * Constructor.
	 *
	 * @param core
	 *            The {@link Core}.
	 */
	ContextSensor(Core core) {
		super(core);
	}

	/**
	 * Returns the {@link ContextComponent} this context sensor belongs to.
	 *
	 * @return The parent {@link ContextComponent}
	 */
	public ContextComponent getContextComponent() {
		return getCore().getPermanentStore().get(ContextComponent.class);
	}
}

Back to the top