com.cisco.oss.foundation.configuration.xml.jaxb.NamespaceIdentifier Maven / Gradle / Ivy
//
// 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.06.05 at 10:11:28 AM EDT
//
package com.cisco.oss.foundation.configuration.xml.jaxb;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
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 NamespaceIdentifier complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="NamespaceIdentifier">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="version" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="file" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="groupWith" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "NamespaceIdentifier")
public class NamespaceIdentifier
implements Cloneable, CopyTo, Equals, ToString
{
@XmlAttribute(name = "name", required = true)
protected String name;
@XmlAttribute(name = "version", required = true)
protected String version;
@XmlAttribute(name = "file")
protected String file;
@XmlAttribute(name = "groupWith")
protected String groupWith;
/**
* 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 version property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getVersion() {
return version;
}
/**
* Sets the value of the version property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setVersion(String value) {
this.version = value;
}
/**
* Gets the value of the file property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getFile() {
return file;
}
/**
* Sets the value of the file property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFile(String value) {
this.file = value;
}
/**
* Gets the value of the groupWith property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getGroupWith() {
return groupWith;
}
/**
* Sets the value of the groupWith property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setGroupWith(String value) {
this.groupWith = value;
}
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) {
{
String theName;
theName = this.getName();
strategy.appendField(locator, this, "name", buffer, theName);
}
{
String theVersion;
theVersion = this.getVersion();
strategy.appendField(locator, this, "version", buffer, theVersion);
}
{
String theFile;
theFile = this.getFile();
strategy.appendField(locator, this, "file", buffer, theFile);
}
{
String theGroupWith;
theGroupWith = this.getGroupWith();
strategy.appendField(locator, this, "groupWith", buffer, theGroupWith);
}
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 NamespaceIdentifier) {
final NamespaceIdentifier copy = ((NamespaceIdentifier) draftCopy);
if (this.name!= null) {
String sourceName;
sourceName = this.getName();
String copyName = ((String) strategy.copy(LocatorUtils.property(locator, "name", sourceName), sourceName));
copy.setName(copyName);
} else {
copy.name = null;
}
if (this.version!= null) {
String sourceVersion;
sourceVersion = this.getVersion();
String copyVersion = ((String) strategy.copy(LocatorUtils.property(locator, "version", sourceVersion), sourceVersion));
copy.setVersion(copyVersion);
} else {
copy.version = null;
}
if (this.file!= null) {
String sourceFile;
sourceFile = this.getFile();
String copyFile = ((String) strategy.copy(LocatorUtils.property(locator, "file", sourceFile), sourceFile));
copy.setFile(copyFile);
} else {
copy.file = null;
}
if (this.groupWith!= null) {
String sourceGroupWith;
sourceGroupWith = this.getGroupWith();
String copyGroupWith = ((String) strategy.copy(LocatorUtils.property(locator, "groupWith", sourceGroupWith), sourceGroupWith));
copy.setGroupWith(copyGroupWith);
} else {
copy.groupWith = null;
}
}
return draftCopy;
}
public Object createNewInstance() {
return new NamespaceIdentifier();
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof NamespaceIdentifier)) {
return false;
}
if (this == object) {
return true;
}
final NamespaceIdentifier that = ((NamespaceIdentifier) object);
{
String lhsName;
lhsName = this.getName();
String rhsName;
rhsName = that.getName();
if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName)) {
return false;
}
}
{
String lhsVersion;
lhsVersion = this.getVersion();
String rhsVersion;
rhsVersion = that.getVersion();
if (!strategy.equals(LocatorUtils.property(thisLocator, "version", lhsVersion), LocatorUtils.property(thatLocator, "version", rhsVersion), lhsVersion, rhsVersion)) {
return false;
}
}
{
String lhsFile;
lhsFile = this.getFile();
String rhsFile;
rhsFile = that.getFile();
if (!strategy.equals(LocatorUtils.property(thisLocator, "file", lhsFile), LocatorUtils.property(thatLocator, "file", rhsFile), lhsFile, rhsFile)) {
return false;
}
}
{
String lhsGroupWith;
lhsGroupWith = this.getGroupWith();
String rhsGroupWith;
rhsGroupWith = that.getGroupWith();
if (!strategy.equals(LocatorUtils.property(thisLocator, "groupWith", lhsGroupWith), LocatorUtils.property(thatLocator, "groupWith", rhsGroupWith), lhsGroupWith, rhsGroupWith)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
}