blob: aee40aa4d83f3dc58a0df68b0e3938d6801249ab [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2013-2020 LAAS-CNRS (www.laas.fr)
* 7 Colonel Roche 31077 Toulouse - France
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* Initial Contributors:
* Thierry Monteil : Project manager, technical co-manager
* Mahdi Ben Alaya : Technical co-manager
* Samir Medjiah : Technical co-manager
* Khalil Drira : Strategy expert
* Guillaume Garzone : Developer
* François Aïssaoui : Developer
*
* New contributors :
*******************************************************************************/
package org.eclipse.om2m.commons.resource;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlList;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;extension base="{http://www.onem2m.org/xml/protocols}regularResource">
* &lt;sequence>
* &lt;element name="serviceRoles" minOccurs="0">
* &lt;simpleType>
* &lt;list itemType="{http://www.onem2m.org/xml/protocols}SRole-ID" />
* &lt;/simpleType>
* &lt;/element>
* &lt;choice minOccurs="0">
* &lt;element name="childResource" type="{http://www.onem2m.org/xml/protocols}childResourceRef" maxOccurs="unbounded"/>
* &lt;choice maxOccurs="unbounded">
* &lt;element ref="{http://www.onem2m.org/xml/protocols}serviceSubscribedNode"/>
* &lt;element ref="{http://www.onem2m.org/xml/protocols}subscription"/>
* &lt;/choice>
* &lt;/choice>
* &lt;/sequence>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "serviceRoles", "childResource",
"serviceSubscribedNodeOrSubscription" })
@XmlRootElement(name = "m2mServiceSubscriptionProfile")
public class M2MServiceSubscriptionProfile extends RegularResource {
@XmlList
protected List<String> serviceRoles;
protected List<ChildResourceRef> childResource;
@XmlElements({
@XmlElement(name = "serviceSubscribedNode", namespace = "http://www.onem2m.org/xml/protocols", type = ServiceSubscribedNode.class),
@XmlElement(name = "subscription", namespace = "http://www.onem2m.org/xml/protocols", type = Subscription.class) })
protected List<RegularResource> serviceSubscribedNodeOrSubscription;
/**
* Gets the value of the serviceRoles property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the serviceRoles property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getServiceRoles().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link String }
*
*
*/
public List<String> getServiceRoles() {
if (serviceRoles == null) {
serviceRoles = new ArrayList<String>();
}
return this.serviceRoles;
}
/**
* Gets the value of the childResource property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the childResource property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getChildResource().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ChildResourceRef }
*
*
*/
public List<ChildResourceRef> getChildResource() {
if (childResource == null) {
childResource = new ArrayList<ChildResourceRef>();
}
return this.childResource;
}
/**
* Gets the value of the serviceSubscribedNodeOrSubscription property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the serviceSubscribedNodeOrSubscription
* property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getServiceSubscribedNodeOrSubscription().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ServiceSubscribedNode } {@link Subscription }
*
*
*/
public List<RegularResource> getServiceSubscribedNodeOrSubscription() {
if (serviceSubscribedNodeOrSubscription == null) {
serviceSubscribedNodeOrSubscription = new ArrayList<RegularResource>();
}
return this.serviceSubscribedNodeOrSubscription;
}
}