Package: Tad

Tad

nameinstructionbranchcomplexitylinemethod
Tad()
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getAny()
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%
getCardinality()
M: 0 C: 9
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
getDefault()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getDescription()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getId()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getMax()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getMin()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getName()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getOption()
M: 0 C: 11
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
getOtherAttributes()
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%
getType()
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
isRequired()
M: 2 C: 7
78%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 2
67%
M: 0 C: 1
100%
setCardinality(Integer)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setDefault(String)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setDescription(String)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setId(String)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setMax(String)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setMin(String)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setName(String)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setOption(Toption)
M: 0 C: 14
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
setRequired(Boolean)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
setType(Tscalar)
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011, 2016 Eurotech and/or its affiliates
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License v1.0
6: * which accompanies this distribution, and is available at
7: * http://www.eclipse.org/legal/epl-v10.html
8: *
9: * Contributors:
10: * Eurotech
11: *******************************************************************************/
12: //
13: // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147
14: // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
15: // Any modifications to this file will be lost upon recompilation of the source schema.
16: // Generated on: 2012.11.25 at 06:05:15 PM CET
17: //
18:
19: package org.eclipse.kura.core.configuration.metatype;
20:
21: import java.util.ArrayList;
22: import java.util.HashMap;
23: import java.util.List;
24: import java.util.Map;
25:
26: import javax.xml.namespace.QName;
27:
28: import org.eclipse.kura.configuration.metatype.AD;
29: import org.eclipse.kura.configuration.metatype.Option;
30: import org.eclipse.kura.configuration.metatype.Scalar;
31: import org.w3c.dom.Element;
32:
33: /**
34: * <p>
35: * Java class for Tad complex type.
36: *
37: * <p>
38: * The following schema fragment specifies the expected content contained within this class.
39: *
40: * <pre>
41: * <complexType name="Tad">
42: * <complexContent>
43: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
44: * <sequence>
45: * <element name="Option" type="{http://www.osgi.org/xmlns/metatype/v1.2.0}Toption" maxOccurs="unbounded" minOccurs="0"/>
46: * <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
47: * </sequence>
48: * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
49: * <attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
50: * <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
51: * <attribute name="type" use="required" type="{http://www.osgi.org/xmlns/metatype/v1.2.0}Tscalar" />
52: * <attribute name="cardinality" type="{http://www.w3.org/2001/XMLSchema}int" default="0" />
53: * <attribute name="min" type="{http://www.w3.org/2001/XMLSchema}string" />
54: * <attribute name="max" type="{http://www.w3.org/2001/XMLSchema}string" />
55: * <attribute name="default" type="{http://www.w3.org/2001/XMLSchema}string" />
56: * <attribute name="required" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
57: * <anyAttribute/>
58: * </restriction>
59: * </complexContent>
60: * </complexType>
61: * </pre>
62: *
63: *
64: */
65:
66: public class Tad implements AD {
67:
68: protected List<Toption> option;
69: protected List<Object> any;
70: protected String name;
71: protected String description;
72: protected String id;
73: protected Tscalar type;
74: protected Integer cardinality;
75: protected String min;
76: protected String max;
77: protected String _default;
78: protected Boolean required;
79: private final Map<QName, String> otherAttributes = new HashMap<QName, String>();
80:
81: /**
82: * Gets the value of the option property.
83: *
84: * <p>
85: * This accessor method returns a reference to the live list,
86: * not a snapshot. Therefore any modification you make to the
87: * returned list will be present inside the JAXB object.
88: * This is why there is not a <CODE>set</CODE> method for the option property.
89: *
90: * <p>
91: * For example, to add a new item, do as follows:
92: *
93: * <pre>
94: * getOption().add(newItem);
95: * </pre>
96: *
97: *
98: * <p>
99: * Objects of the following type(s) are allowed in the list
100: * {@link Toption }
101: *
102: *
103: */
104: @Override
105: @SuppressWarnings("unchecked")
106: public List<Option> getOption() {
107:• if (this.option == null) {
108: this.option = new ArrayList<Toption>();
109: }
110: return (List<Option>) (List<?>) this.option;
111: }
112:
113: public void setOption(Toption o) {
114:• if (this.option == null) {
115: this.option = new ArrayList<Toption>();
116: }
117: this.option.add(o);
118: }
119:
120: /**
121: * Gets the value of the any property.
122: *
123: * <p>
124: * This accessor method returns a reference to the live list,
125: * not a snapshot. Therefore any modification you make to the
126: * returned list will be present inside the JAXB object.
127: * This is why there is not a <CODE>set</CODE> method for the any property.
128: *
129: * <p>
130: * For example, to add a new item, do as follows:
131: *
132: * <pre>
133: * getAny().add(newItem);
134: * </pre>
135: *
136: *
137: * <p>
138: * Objects of the following type(s) are allowed in the list
139: * {@link Element }
140: * {@link Object }
141: *
142: *
143: */
144: public List<Object> getAny() {
145:• if (this.any == null) {
146: this.any = new ArrayList<Object>();
147: }
148: return this.any;
149: }
150:
151: /**
152: * Gets the value of the name property.
153: *
154: * @return
155: * possible object is
156: * {@link String }
157: *
158: */
159: @Override
160: public String getName() {
161: return this.name;
162: }
163:
164: /**
165: * Sets the value of the name property.
166: *
167: * @param value
168: * allowed object is
169: * {@link String }
170: *
171: */
172: public void setName(String value) {
173: this.name = value;
174: }
175:
176: /**
177: * Gets the value of the description property.
178: *
179: * @return
180: * possible object is
181: * {@link String }
182: *
183: */
184: @Override
185: public String getDescription() {
186: return this.description;
187: }
188:
189: /**
190: * Sets the value of the description property.
191: *
192: * @param value
193: * allowed object is
194: * {@link String }
195: *
196: */
197: public void setDescription(String value) {
198: this.description = value;
199: }
200:
201: /**
202: * Gets the value of the id property.
203: *
204: * @return
205: * possible object is
206: * {@link String }
207: *
208: */
209: @Override
210: public String getId() {
211: return this.id;
212: }
213:
214: /**
215: * Sets the value of the id property.
216: *
217: * @param value
218: * allowed object is
219: * {@link String }
220: *
221: */
222: public void setId(String value) {
223: this.id = value;
224: }
225:
226: /**
227: * Gets the value of the type property.
228: *
229: * @return
230: * possible object is
231: * {@link Tscalar }
232: *
233: */
234: @Override
235: public Scalar getType() {
236: return Scalar.valueOf(this.type.name());
237: }
238:
239: /**
240: * Sets the value of the type property.
241: *
242: * @param value
243: * allowed object is
244: * {@link Tscalar }
245: *
246: */
247: public void setType(Tscalar value) {
248: this.type = value;
249: }
250:
251: /**
252: * Gets the value of the cardinality property.
253: *
254: * @return
255: * possible object is
256: * {@link Integer }
257: *
258: */
259: @Override
260: public int getCardinality() {
261:• if (this.cardinality == null) {
262: return 0;
263: } else {
264: return this.cardinality;
265: }
266: }
267:
268: /**
269: * Sets the value of the cardinality property.
270: *
271: * @param value
272: * allowed object is
273: * {@link Integer }
274: *
275: */
276: public void setCardinality(Integer value) {
277: this.cardinality = value;
278: }
279:
280: /**
281: * Gets the value of the min property.
282: *
283: * @return
284: * possible object is
285: * {@link String }
286: *
287: */
288: @Override
289: public String getMin() {
290: return this.min;
291: }
292:
293: /**
294: * Sets the value of the min property.
295: *
296: * @param value
297: * allowed object is
298: * {@link String }
299: *
300: */
301: public void setMin(String value) {
302: this.min = value;
303: }
304:
305: /**
306: * Gets the value of the max property.
307: *
308: * @return
309: * possible object is
310: * {@link String }
311: *
312: */
313: @Override
314: public String getMax() {
315: return this.max;
316: }
317:
318: /**
319: * Sets the value of the max property.
320: *
321: * @param value
322: * allowed object is
323: * {@link String }
324: *
325: */
326: public void setMax(String value) {
327: this.max = value;
328: }
329:
330: /**
331: * Gets the value of the default property.
332: *
333: * @return
334: * possible object is
335: * {@link String }
336: *
337: */
338: @Override
339: public String getDefault() {
340: return this._default;
341: }
342:
343: /**
344: * Sets the value of the default property.
345: *
346: * @param value
347: * allowed object is
348: * {@link String }
349: *
350: */
351: public void setDefault(String value) {
352: this._default = value;
353: }
354:
355: /**
356: * Gets the value of the required property.
357: *
358: * @return
359: * possible object is
360: * {@link Boolean }
361: *
362: */
363: @Override
364: public boolean isRequired() {
365:• if (this.required == null) {
366: return true;
367: } else {
368: return this.required;
369: }
370: }
371:
372: /**
373: * Sets the value of the required property.
374: *
375: * @param value
376: * allowed object is
377: * {@link Boolean }
378: *
379: */
380: public void setRequired(Boolean value) {
381: this.required = value;
382: }
383:
384: /**
385: * Gets a map that contains attributes that aren't bound to any typed property on this class.
386: *
387: * <p>
388: * the map is keyed by the name of the attribute and
389: * the value is the string value of the attribute.
390: *
391: * the map returned by this method is live, and you can add new attribute
392: * by updating the map directly. Because of this design, there's no setter.
393: *
394: *
395: * @return
396: * always non-null
397: */
398: public Map<QName, String> getOtherAttributes() {
399: return this.otherAttributes;
400: }
401: }