Skip to content

Package: DeviceXmlRegistry

DeviceXmlRegistry

nameinstructionbranchcomplexitylinemethod
DeviceXmlRegistry()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
newDevice()
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
newDeviceCreator()
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
newDeviceExtendedProperty()
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
newDeviceListResult()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
newQuery()
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 8 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.registry;
14:
15: import org.eclipse.kapua.locator.KapuaLocator;
16:
17: import javax.xml.bind.annotation.XmlRegistry;
18:
19: /**
20: * {@link Device} xml factory class
21: *
22: * @since 1.0
23: */
24: @XmlRegistry
25: public class DeviceXmlRegistry {
26:
27: private static final KapuaLocator LOCATOR = KapuaLocator.getInstance();
28: private static final DeviceFactory DEVICE_FACTORY = LOCATOR.getFactory(DeviceFactory.class);
29:
30: /**
31: * Creates a new {@link Device}
32: *
33: * @return
34: * @since 1.0.0
35: */
36: public Device newDevice() {
37: return DEVICE_FACTORY.newEntity(null);
38: }
39:
40: /**
41: * Creates a new device creator
42: *
43: * @return
44: * @since 1.0.0
45: */
46: public DeviceCreator newDeviceCreator() {
47: return DEVICE_FACTORY.newCreator(null, null);
48: }
49:
50: /**
51: * Creates a new device list result
52: *
53: * @return
54: * @since 1.0.0
55: */
56: public DeviceListResult newDeviceListResult() {
57: return DEVICE_FACTORY.newListResult();
58: }
59:
60: public DeviceQuery newQuery() {
61: return DEVICE_FACTORY.newQuery(null);
62: }
63:
64: /**
65: * Instantiates a new {@link DeviceExtendedProperty}.
66: *
67: * @return The newly instantiated {@link DeviceExtendedProperty}.
68: * @since 1.5.0
69: */
70: public DeviceExtendedProperty newDeviceExtendedProperty() {
71: return DEVICE_FACTORY.newExtendedProperty(null, null, null);
72: }
73: }