Skip to content

Package: KuraDataChannel

KuraDataChannel

nameinstructionbranchcomplexitylinemethod
KuraDataChannel()
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
KuraDataChannel(String, String)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getParts()
M: 10 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getSemanticParts()
M: 11 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
setSemanticParts(List)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.service.device.call.message.kura.data;
14:
15: import org.eclipse.kapua.service.device.call.message.data.DeviceDataChannel;
16: import org.eclipse.kapua.service.device.call.message.kura.KuraChannel;
17:
18: import java.util.ArrayList;
19: import java.util.List;
20:
21: /**
22: * {@link DeviceDataChannel} {@link org.eclipse.kapua.service.device.call.kura.Kura} implementation.
23: *
24: * @since 1.0.0
25: */
26: public class KuraDataChannel extends KuraChannel implements DeviceDataChannel {
27:
28: private List<String> semanticParts;
29:
30: /**
31: * Constructor.
32: *
33: * @since 1.0.0
34: */
35: public KuraDataChannel() {
36: this(null, null);
37: }
38:
39: /**
40: * Constructor.
41: *
42: * @param scopeNamespace The scope namespace
43: * @param clientId The clientId
44: * @see org.eclipse.kapua.service.device.call.message.DeviceChannel
45: * @since 1.0.0
46: */
47: public KuraDataChannel(String scopeNamespace, String clientId) {
48: super(scopeNamespace, clientId);
49: }
50:
51: @Override
52: public List<String> getSemanticParts() {
53:• if (semanticParts == null) {
54: semanticParts = new ArrayList<>();
55: }
56:
57: return semanticParts;
58: }
59:
60: @Override
61: public void setSemanticParts(List<String> semanticParts) {
62: this.semanticParts = semanticParts;
63: }
64:
65: @Override
66: public List<String> getParts() {
67: List<String> parts = super.getParts();
68: parts.addAll(getSemanticParts());
69: return parts;
70: }
71: }