/*
* Dog - Core
*
* Copyright (c) 2009-2014 Dario Bonino and Luigi De Russis
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.02.15 at 03:00:00 PM CEST
//
package it.polito.elite.dog.core.library.jaxb;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.codehaus.jackson.annotate.JsonProperty;
/**
* <p>
* Java class for configcommand complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType name="configcommand">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="param" type="{http://elite.polito.it/dogHomeConfiguration}configparam" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="class" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="returnType" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "configcommand", propOrder = { "param" })
public class Configcommand implements Cloneable
{
protected List<Configparam> param;
@XmlAttribute(name = "class", required = true)
@JsonProperty("class")
protected String clazz;
@XmlAttribute(name = "name", required = true)
protected String name;
@XmlAttribute(name = "returnType")
protected String returnType;
@XmlAttribute(name = "id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Creates a new {@code Configcommand} instance.
*
*/
public Configcommand()
{
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
super();
}
/**
* Creates a new {@code Configcommand} instance by deeply copying a given
* {@code Configcommand} instance.
*
*
* @param o
* The instance to copy.
* @throws NullPointerException
* if {@code o} is {@code null}.
*/
public Configcommand(final Configcommand o)
{
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
super();
if (o == null)
{
throw new NullPointerException("Cannot create a copy of 'Configcommand' from 'null'.");
}
// 'Param' collection.
if (o.param != null)
{
copyParam(o.getParam(), this.getParam());
}
// CBuiltinLeafInfo: java.lang.String
this.clazz = ((o.clazz == null) ? null : o.getClazz());
// CBuiltinLeafInfo: java.lang.String
this.name = ((o.name == null) ? null : o.getName());
// CBuiltinLeafInfo: java.lang.String
this.returnType = ((o.returnType == null) ? null : o.getReturnType());
// CBuiltinLeafInfo: java.lang.String
this.id = ((o.id == null) ? null : o.getId());
}
/**
* Gets the value of the param 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 param property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getParam().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Configparam }
*
*
*/
public List<Configparam> getParam()
{
if (param == null)
{
param = new ArrayList<Configparam>();
}
return this.param;
}
/**
* Gets the value of the clazz property.
*
* @return possible object is {@link String }
*
*/
public String getClazz()
{
return clazz;
}
/**
* Sets the value of the clazz property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setClazz(String value)
{
this.clazz = value;
}
/**
* Gets the value of the name property.
*
* @return possible object is {@link String }
*
*/
public String getName()
{
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setName(String value)
{
this.name = value;
}
/**
* Gets the value of the returnType property.
*
* @return possible object is {@link String }
*
*/
public String getReturnType()
{
return returnType;
}
/**
* Sets the value of the returnType property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setReturnType(String value)
{
this.returnType = value;
}
/**
* Gets the value of the id property.
*
* @return possible object is {@link String }
*
*/
public String getId()
{
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setId(String value)
{
this.id = value;
}
/**
* Copies all values of property {@code Param} deeply.
*
* @param source
* The source to copy from.
* @param target
* The target to copy {@code source} to.
* @throws NullPointerException
* if {@code target} is {@code null}.
*/
private static void copyParam(final List<Configparam> source, final List<Configparam> target)
{
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
if ((source != null) && (!source.isEmpty()))
{
for (final Iterator<?> it = source.iterator(); it.hasNext();)
{
final Object next = it.next();
if (next instanceof Configparam)
{
// CClassInfo:
// it.polito.elite.dog.core.library.jaxb.Configparam
target.add(((Configparam) next).clone());
continue;
}
// Please report this at
// https://apps.sourceforge.net/mantisbt/ccxjc/
throw new AssertionError(
(("Unexpected instance '" + next) + "' for property 'Param' of class 'it.polito.elite.dog.core.library.jaxb.Configcommand'."));
}
}
}
/**
* Creates and returns a deep copy of this object.
*
*
* @return A deep copy of this object.
*/
@Override
public Configcommand clone()
{
try
{
{
// CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000
final Configcommand clone = ((Configcommand) super.clone());
// 'Param' collection.
if (this.param != null)
{
clone.param = null;
copyParam(this.getParam(), clone.getParam());
}
// CBuiltinLeafInfo: java.lang.String
clone.clazz = ((this.clazz == null) ? null : this.getClazz());
// CBuiltinLeafInfo: java.lang.String
clone.name = ((this.name == null) ? null : this.getName());
// CBuiltinLeafInfo: java.lang.String
clone.returnType = ((this.returnType == null) ? null : this.getReturnType());
// CBuiltinLeafInfo: java.lang.String
clone.id = ((this.id == null) ? null : this.getId());
return clone;
}
}
catch (CloneNotSupportedException e)
{
// Please report this at
// https://apps.sourceforge.net/mantisbt/ccxjc/
throw new AssertionError(e);
}
}
}