//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-792
// 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: 2010.02.16 at 09:57:53 AM CET
//
package org.ow2.easywsdl.schema.org.w3._2001.xmlschema;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
import org.ow2.easywsdl.u.builder.EqualsBuilder;
import org.ow2.easywsdl.u.builder.HashCodeBuilder;
import org.ow2.easywsdl.u.builder.ToStringBuilder;
import org.jvnet.jaxb2_commons.lang.CopyTo;
import org.jvnet.jaxb2_commons.lang.Copyable;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.builder.CopyBuilder;
import org.jvnet.jaxb2_commons.lang.builder.JAXBCopyBuilder;
import org.jvnet.jaxb2_commons.lang.builder.JAXBEqualsBuilder;
import org.jvnet.jaxb2_commons.lang.builder.JAXBHashCodeBuilder;
import org.jvnet.jaxb2_commons.lang.builder.JAXBToStringBuilder;
/**
* <p>Java class for attribute complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="attribute">
* <complexContent>
* <extension base="{http://www.w3.org/2001/XMLSchema}annotated">
* <sequence>
* <element name="simpleType" type="{http://www.w3.org/2001/XMLSchema}localSimpleType" minOccurs="0"/>
* </sequence>
* <attGroup ref="{http://www.w3.org/2001/XMLSchema}defRef"/>
* <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}QName" />
* <attribute name="use" default="optional">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN">
* <enumeration value="prohibited"/>
* <enumeration value="optional"/>
* <enumeration value="required"/>
* </restriction>
* </simpleType>
* </attribute>
* <attribute name="default" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="fixed" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="form" type="{http://www.w3.org/2001/XMLSchema}formChoice" />
* <anyAttribute processContents='lax' namespace='##other'/>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "attribute", propOrder = {
"simpleType"
})
@XmlSeeAlso({
TopLevelAttribute.class
})
public class Attribute
extends Annotated
implements CopyTo, Copyable, Equals, HashCode, ToString
{
protected LocalSimpleType simpleType;
@XmlAttribute
protected QName type;
@XmlAttribute
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String use;
@XmlAttribute(name = "default")
protected String _default;
@XmlAttribute
protected String fixed;
@XmlAttribute
protected FormChoice form;
@XmlAttribute
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "NCName")
protected String name;
@XmlAttribute
protected QName ref;
/**
* Gets the value of the simpleType property.
*
* @return
* possible object is
* {@link LocalSimpleType }
*
*/
public LocalSimpleType getSimpleType() {
return simpleType;
}
/**
* Sets the value of the simpleType property.
*
* @param value
* allowed object is
* {@link LocalSimpleType }
*
*/
public void setSimpleType(LocalSimpleType value) {
this.simpleType = value;
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link QName }
*
*/
public QName getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link QName }
*
*/
public void setType(QName value) {
this.type = value;
}
/**
* Gets the value of the use property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUse() {
if (use == null) {
return "optional";
} else {
return use;
}
}
/**
* Sets the value of the use property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUse(String value) {
this.use = value;
}
/**
* Gets the value of the default property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDefault() {
return _default;
}
/**
* Sets the value of the default property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDefault(String value) {
this._default = value;
}
/**
* Gets the value of the fixed property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getFixed() {
return fixed;
}
/**
* Sets the value of the fixed property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFixed(String value) {
this.fixed = value;
}
/**
* Gets the value of the form property.
*
* @return
* possible object is
* {@link FormChoice }
*
*/
public FormChoice getForm() {
return form;
}
/**
* Sets the value of the form property.
*
* @param value
* allowed object is
* {@link FormChoice }
*
*/
public void setForm(FormChoice value) {
this.form = 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 ref property.
*
* @return
* possible object is
* {@link QName }
*
*/
public QName getRef() {
return ref;
}
/**
* Sets the value of the ref property.
*
* @param value
* allowed object is
* {@link QName }
*
*/
public void setRef(QName value) {
this.ref = value;
}
public void toString(ToStringBuilder toStringBuilder) {
super.toString(toStringBuilder);
{
LocalSimpleType theSimpleType;
theSimpleType = this.getSimpleType();
toStringBuilder.append("simpleType", theSimpleType);
}
{
QName theType;
theType = this.getType();
toStringBuilder.append("type", theType);
}
{
String theUse;
theUse = this.getUse();
toStringBuilder.append("use", theUse);
}
{
String theDefault;
theDefault = this.getDefault();
toStringBuilder.append("_default", theDefault);
}
{
String theFixed;
theFixed = this.getFixed();
toStringBuilder.append("fixed", theFixed);
}
{
FormChoice theForm;
theForm = this.getForm();
toStringBuilder.append("form", theForm);
}
{
String theName;
theName = this.getName();
toStringBuilder.append("name", theName);
}
{
QName theRef;
theRef = this.getRef();
toStringBuilder.append("ref", theRef);
}
}
public String toString() {
final ToStringBuilder toStringBuilder = new JAXBToStringBuilder(this);
toString(toStringBuilder);
return toStringBuilder.toString();
}
public void equals(Object object, EqualsBuilder equalsBuilder) {
if (!(object instanceof Attribute)) {
equalsBuilder.appendSuper(false);
return ;
}
if (this == object) {
return ;
}
super.equals(object, equalsBuilder);
final Attribute that = ((Attribute) object);
equalsBuilder.append(this.getSimpleType(), that.getSimpleType());
equalsBuilder.append(this.getType(), that.getType());
equalsBuilder.append(this.getUse(), that.getUse());
equalsBuilder.append(this.getDefault(), that.getDefault());
equalsBuilder.append(this.getFixed(), that.getFixed());
equalsBuilder.append(this.getForm(), that.getForm());
equalsBuilder.append(this.getName(), that.getName());
equalsBuilder.append(this.getRef(), that.getRef());
}
public boolean equals(Object object) {
if (!(object instanceof Attribute)) {
return false;
}
if (this == object) {
return true;
}
final EqualsBuilder equalsBuilder = new JAXBEqualsBuilder();
equals(object, equalsBuilder);
return equalsBuilder.isEquals();
}
public void hashCode(HashCodeBuilder hashCodeBuilder) {
super.hashCode(hashCodeBuilder);
hashCodeBuilder.append(this.getSimpleType());
hashCodeBuilder.append(this.getType());
hashCodeBuilder.append(this.getUse());
hashCodeBuilder.append(this.getDefault());
hashCodeBuilder.append(this.getFixed());
hashCodeBuilder.append(this.getForm());
hashCodeBuilder.append(this.getName());
hashCodeBuilder.append(this.getRef());
}
public int hashCode() {
final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder();
hashCode(hashCodeBuilder);
return hashCodeBuilder.toHashCode();
}
public Object copyTo(Object target, CopyBuilder copyBuilder) {
final Attribute copy = ((target == null)?((Attribute) createCopy()):((Attribute) target));
super.copyTo(copy, copyBuilder);
{
LocalSimpleType sourceSimpleType;
sourceSimpleType = this.getSimpleType();
LocalSimpleType copySimpleType = ((LocalSimpleType) copyBuilder.copy(sourceSimpleType));
copy.setSimpleType(copySimpleType);
}
{
QName sourceType;
sourceType = this.getType();
QName copyType = ((QName) copyBuilder.copy(sourceType));
copy.setType(copyType);
}
{
String sourceUse;
sourceUse = this.getUse();
String copyUse = ((String) copyBuilder.copy(sourceUse));
copy.setUse(copyUse);
}
{
String sourceDefault;
sourceDefault = this.getDefault();
String copyDefault = ((String) copyBuilder.copy(sourceDefault));
copy.setDefault(copyDefault);
}
{
String sourceFixed;
sourceFixed = this.getFixed();
String copyFixed = ((String) copyBuilder.copy(sourceFixed));
copy.setFixed(copyFixed);
}
{
FormChoice sourceForm;
sourceForm = this.getForm();
FormChoice copyForm = ((FormChoice) copyBuilder.copy(sourceForm));
copy.setForm(copyForm);
}
{
String sourceName;
sourceName = this.getName();
String copyName = ((String) copyBuilder.copy(sourceName));
copy.setName(copyName);
}
{
QName sourceRef;
sourceRef = this.getRef();
QName copyRef = ((QName) copyBuilder.copy(sourceRef));
copy.setRef(copyRef);
}
return copy;
}
public Object copyTo(Object target) {
final CopyBuilder copyBuilder = new JAXBCopyBuilder();
return copyTo(target, copyBuilder);
}
public Object createCopy() {
return new Attribute();
}
}