blob: 5649d559ddfaf797d7c462c3ddb27301e7dce45f [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2014, 2017 Orange.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.om2m.commons.resource;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import org.eclipse.om2m.commons.constants.ShortName;
public class MgmtObjAnncWithChildren extends AnnouncedMgmtResource {
@XmlElement(name = ShortName.CHILD_RESOURCE, namespace="")
protected List<ChildResourceRef> childResource;
@XmlElement(namespace = "http://www.onem2m.org/xml/protocols", name = ShortName.SUB)
protected List<Subscription> subscriptions;
/**
* 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 subscription 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 subscription property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getSubscription().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Subscription }
*
*
*/
public List<Subscription> getSubscriptions() {
if (subscriptions == null) {
subscriptions = new ArrayList<Subscription>();
}
return this.subscriptions;
}
}