com.cisco.oss.foundation.configuration.xml.jaxb.Component Maven / Gradle / Ivy
Show all versions of configuration-api Show documentation
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.11.05 at 02:12:08 AM EST
//
package com.cisco.oss.foundation.configuration.xml.jaxb;
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.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.jvnet.jaxb2_commons.lang.CopyStrategy;
import org.jvnet.jaxb2_commons.lang.CopyTo;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Java class for Component complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="Component">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="OtherInstallations" type="{}Component" maxOccurs="unbounded" minOccurs="0"/>
* <element name="configSchema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* <attribute name="componentName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="namespaceName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="namespaceVersion" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="parentId" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="fqdn" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="installPath" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="ccpEnable" type="{http://www.w3.org/2001/XMLSchema}integer" />
* <attribute name="ccpSwitchable" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Component", propOrder = {
"otherInstallations",
"configSchema"
})
public class Component
implements Cloneable, CopyTo, Equals, ToString
{
@XmlElement(name = "OtherInstallations")
protected List otherInstallations;
protected String configSchema;
@XmlAttribute(name = "componentName", required = true)
protected String componentName;
@XmlAttribute(name = "namespaceName", required = true)
protected String namespaceName;
@XmlAttribute(name = "namespaceVersion", required = true)
protected String namespaceVersion;
@XmlAttribute(name = "parentId")
protected String parentId;
@XmlAttribute(name = "fqdn")
protected String fqdn;
@XmlAttribute(name = "installPath")
protected String installPath;
@XmlAttribute(name = "ccpEnable")
@XmlJavaTypeAdapter(Adapter1 .class)
@XmlSchemaType(name = "integer")
protected Integer ccpEnable;
@XmlAttribute(name = "ccpSwitchable")
protected Boolean ccpSwitchable;
/**
* Gets the value of the otherInstallations property.
*
*
* 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 set
method for the otherInstallations property.
*
*
* For example, to add a new item, do as follows:
*
* getOtherInstallations().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link Component }
*
*
*/
public List getOtherInstallations() {
if (otherInstallations == null) {
otherInstallations = new ArrayList();
}
return this.otherInstallations;
}
/**
* Gets the value of the configSchema property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getConfigSchema() {
return configSchema;
}
/**
* Sets the value of the configSchema property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setConfigSchema(String value) {
this.configSchema = value;
}
/**
* Gets the value of the componentName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getComponentName() {
return componentName;
}
/**
* Sets the value of the componentName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setComponentName(String value) {
this.componentName = value;
}
/**
* Gets the value of the namespaceName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNamespaceName() {
return namespaceName;
}
/**
* Sets the value of the namespaceName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNamespaceName(String value) {
this.namespaceName = value;
}
/**
* Gets the value of the namespaceVersion property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNamespaceVersion() {
return namespaceVersion;
}
/**
* Sets the value of the namespaceVersion property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNamespaceVersion(String value) {
this.namespaceVersion = value;
}
/**
* Gets the value of the parentId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getParentId() {
return parentId;
}
/**
* Sets the value of the parentId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setParentId(String value) {
this.parentId = value;
}
/**
* Gets the value of the fqdn property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getFqdn() {
return fqdn;
}
/**
* Sets the value of the fqdn property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFqdn(String value) {
this.fqdn = value;
}
/**
* Gets the value of the installPath property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getInstallPath() {
return installPath;
}
/**
* Sets the value of the installPath property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setInstallPath(String value) {
this.installPath = value;
}
/**
* Gets the value of the ccpEnable property.
*
* @return
* possible object is
* {@link String }
*
*/
public Integer getCcpEnable() {
return ccpEnable;
}
/**
* Sets the value of the ccpEnable property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCcpEnable(Integer value) {
this.ccpEnable = value;
}
/**
* Gets the value of the ccpSwitchable property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public boolean isCcpSwitchable() {
if (ccpSwitchable == null) {
return true;
} else {
return ccpSwitchable;
}
}
/**
* Sets the value of the ccpSwitchable property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setCcpSwitchable(Boolean value) {
this.ccpSwitchable = value;
}
/**
* Sets the value of the otherInstallations property.
*
* @param otherInstallations
* allowed object is
* {@link Component }
*
*/
public void setOtherInstallations(List otherInstallations) {
this.otherInstallations = otherInstallations;
}
public String toString() {
final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
{
List theOtherInstallations;
theOtherInstallations = (((this.otherInstallations!= null)&&(!this.otherInstallations.isEmpty()))?this.getOtherInstallations():null);
strategy.appendField(locator, this, "otherInstallations", buffer, theOtherInstallations);
}
{
String theConfigSchema;
theConfigSchema = this.getConfigSchema();
strategy.appendField(locator, this, "configSchema", buffer, theConfigSchema);
}
{
String theComponentName;
theComponentName = this.getComponentName();
strategy.appendField(locator, this, "componentName", buffer, theComponentName);
}
{
String theNamespaceName;
theNamespaceName = this.getNamespaceName();
strategy.appendField(locator, this, "namespaceName", buffer, theNamespaceName);
}
{
String theNamespaceVersion;
theNamespaceVersion = this.getNamespaceVersion();
strategy.appendField(locator, this, "namespaceVersion", buffer, theNamespaceVersion);
}
{
String theParentId;
theParentId = this.getParentId();
strategy.appendField(locator, this, "parentId", buffer, theParentId);
}
{
String theFqdn;
theFqdn = this.getFqdn();
strategy.appendField(locator, this, "fqdn", buffer, theFqdn);
}
{
String theInstallPath;
theInstallPath = this.getInstallPath();
strategy.appendField(locator, this, "installPath", buffer, theInstallPath);
}
{
Integer theCcpEnable;
theCcpEnable = this.getCcpEnable();
strategy.appendField(locator, this, "ccpEnable", buffer, theCcpEnable);
}
{
boolean theCcpSwitchable;
theCcpSwitchable = ((this.ccpSwitchable!= null)?this.isCcpSwitchable():false);
strategy.appendField(locator, this, "ccpSwitchable", buffer, theCcpSwitchable);
}
return buffer;
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof Component) {
final Component copy = ((Component) draftCopy);
if ((this.otherInstallations!= null)&&(!this.otherInstallations.isEmpty())) {
List sourceOtherInstallations;
sourceOtherInstallations = (((this.otherInstallations!= null)&&(!this.otherInstallations.isEmpty()))?this.getOtherInstallations():null);
@SuppressWarnings("unchecked")
List copyOtherInstallations = ((List ) strategy.copy(LocatorUtils.property(locator, "otherInstallations", sourceOtherInstallations), sourceOtherInstallations));
copy.setOtherInstallations(copyOtherInstallations);
} else {
copy.otherInstallations = null;
}
if (this.configSchema!= null) {
String sourceConfigSchema;
sourceConfigSchema = this.getConfigSchema();
String copyConfigSchema = ((String) strategy.copy(LocatorUtils.property(locator, "configSchema", sourceConfigSchema), sourceConfigSchema));
copy.setConfigSchema(copyConfigSchema);
} else {
copy.configSchema = null;
}
if (this.componentName!= null) {
String sourceComponentName;
sourceComponentName = this.getComponentName();
String copyComponentName = ((String) strategy.copy(LocatorUtils.property(locator, "componentName", sourceComponentName), sourceComponentName));
copy.setComponentName(copyComponentName);
} else {
copy.componentName = null;
}
if (this.namespaceName!= null) {
String sourceNamespaceName;
sourceNamespaceName = this.getNamespaceName();
String copyNamespaceName = ((String) strategy.copy(LocatorUtils.property(locator, "namespaceName", sourceNamespaceName), sourceNamespaceName));
copy.setNamespaceName(copyNamespaceName);
} else {
copy.namespaceName = null;
}
if (this.namespaceVersion!= null) {
String sourceNamespaceVersion;
sourceNamespaceVersion = this.getNamespaceVersion();
String copyNamespaceVersion = ((String) strategy.copy(LocatorUtils.property(locator, "namespaceVersion", sourceNamespaceVersion), sourceNamespaceVersion));
copy.setNamespaceVersion(copyNamespaceVersion);
} else {
copy.namespaceVersion = null;
}
if (this.parentId!= null) {
String sourceParentId;
sourceParentId = this.getParentId();
String copyParentId = ((String) strategy.copy(LocatorUtils.property(locator, "parentId", sourceParentId), sourceParentId));
copy.setParentId(copyParentId);
} else {
copy.parentId = null;
}
if (this.fqdn!= null) {
String sourceFqdn;
sourceFqdn = this.getFqdn();
String copyFqdn = ((String) strategy.copy(LocatorUtils.property(locator, "fqdn", sourceFqdn), sourceFqdn));
copy.setFqdn(copyFqdn);
} else {
copy.fqdn = null;
}
if (this.installPath!= null) {
String sourceInstallPath;
sourceInstallPath = this.getInstallPath();
String copyInstallPath = ((String) strategy.copy(LocatorUtils.property(locator, "installPath", sourceInstallPath), sourceInstallPath));
copy.setInstallPath(copyInstallPath);
} else {
copy.installPath = null;
}
if (this.ccpEnable!= null) {
Integer sourceCcpEnable;
sourceCcpEnable = this.getCcpEnable();
Integer copyCcpEnable = ((Integer) strategy.copy(LocatorUtils.property(locator, "ccpEnable", sourceCcpEnable), sourceCcpEnable));
copy.setCcpEnable(copyCcpEnable);
} else {
copy.ccpEnable = null;
}
if (this.ccpSwitchable!= null) {
boolean sourceCcpSwitchable;
sourceCcpSwitchable = ((this.ccpSwitchable!= null)?this.isCcpSwitchable():false);
boolean copyCcpSwitchable = strategy.copy(LocatorUtils.property(locator, "ccpSwitchable", sourceCcpSwitchable), sourceCcpSwitchable);
copy.setCcpSwitchable(copyCcpSwitchable);
} else {
copy.ccpSwitchable = null;
}
}
return draftCopy;
}
public Object createNewInstance() {
return new Component();
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof Component)) {
return false;
}
if (this == object) {
return true;
}
final Component that = ((Component) object);
{
List lhsOtherInstallations;
lhsOtherInstallations = (((this.otherInstallations!= null)&&(!this.otherInstallations.isEmpty()))?this.getOtherInstallations():null);
List rhsOtherInstallations;
rhsOtherInstallations = (((that.otherInstallations!= null)&&(!that.otherInstallations.isEmpty()))?that.getOtherInstallations():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "otherInstallations", lhsOtherInstallations), LocatorUtils.property(thatLocator, "otherInstallations", rhsOtherInstallations), lhsOtherInstallations, rhsOtherInstallations)) {
return false;
}
}
{
String lhsConfigSchema;
lhsConfigSchema = this.getConfigSchema();
String rhsConfigSchema;
rhsConfigSchema = that.getConfigSchema();
if (!strategy.equals(LocatorUtils.property(thisLocator, "configSchema", lhsConfigSchema), LocatorUtils.property(thatLocator, "configSchema", rhsConfigSchema), lhsConfigSchema, rhsConfigSchema)) {
return false;
}
}
{
String lhsComponentName;
lhsComponentName = this.getComponentName();
String rhsComponentName;
rhsComponentName = that.getComponentName();
if (!strategy.equals(LocatorUtils.property(thisLocator, "componentName", lhsComponentName), LocatorUtils.property(thatLocator, "componentName", rhsComponentName), lhsComponentName, rhsComponentName)) {
return false;
}
}
{
String lhsNamespaceName;
lhsNamespaceName = this.getNamespaceName();
String rhsNamespaceName;
rhsNamespaceName = that.getNamespaceName();
if (!strategy.equals(LocatorUtils.property(thisLocator, "namespaceName", lhsNamespaceName), LocatorUtils.property(thatLocator, "namespaceName", rhsNamespaceName), lhsNamespaceName, rhsNamespaceName)) {
return false;
}
}
{
String lhsNamespaceVersion;
lhsNamespaceVersion = this.getNamespaceVersion();
String rhsNamespaceVersion;
rhsNamespaceVersion = that.getNamespaceVersion();
if (!strategy.equals(LocatorUtils.property(thisLocator, "namespaceVersion", lhsNamespaceVersion), LocatorUtils.property(thatLocator, "namespaceVersion", rhsNamespaceVersion), lhsNamespaceVersion, rhsNamespaceVersion)) {
return false;
}
}
{
String lhsParentId;
lhsParentId = this.getParentId();
String rhsParentId;
rhsParentId = that.getParentId();
if (!strategy.equals(LocatorUtils.property(thisLocator, "parentId", lhsParentId), LocatorUtils.property(thatLocator, "parentId", rhsParentId), lhsParentId, rhsParentId)) {
return false;
}
}
{
String lhsFqdn;
lhsFqdn = this.getFqdn();
String rhsFqdn;
rhsFqdn = that.getFqdn();
if (!strategy.equals(LocatorUtils.property(thisLocator, "fqdn", lhsFqdn), LocatorUtils.property(thatLocator, "fqdn", rhsFqdn), lhsFqdn, rhsFqdn)) {
return false;
}
}
{
String lhsInstallPath;
lhsInstallPath = this.getInstallPath();
String rhsInstallPath;
rhsInstallPath = that.getInstallPath();
if (!strategy.equals(LocatorUtils.property(thisLocator, "installPath", lhsInstallPath), LocatorUtils.property(thatLocator, "installPath", rhsInstallPath), lhsInstallPath, rhsInstallPath)) {
return false;
}
}
{
Integer lhsCcpEnable;
lhsCcpEnable = this.getCcpEnable();
Integer rhsCcpEnable;
rhsCcpEnable = that.getCcpEnable();
if (!strategy.equals(LocatorUtils.property(thisLocator, "ccpEnable", lhsCcpEnable), LocatorUtils.property(thatLocator, "ccpEnable", rhsCcpEnable), lhsCcpEnable, rhsCcpEnable)) {
return false;
}
}
{
boolean lhsCcpSwitchable;
lhsCcpSwitchable = ((this.ccpSwitchable!= null)?this.isCcpSwitchable():false);
boolean rhsCcpSwitchable;
rhsCcpSwitchable = ((that.ccpSwitchable!= null)?that.isCcpSwitchable():false);
if (!strategy.equals(LocatorUtils.property(thisLocator, "ccpSwitchable", lhsCcpSwitchable), LocatorUtils.property(thatLocator, "ccpSwitchable", rhsCcpSwitchable), lhsCcpSwitchable, rhsCcpSwitchable)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
}