//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2
// 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: 2011.05.30 at 01:37:07 odp. CEST
//
package cz.cuni.mff.peckam.java.origamist.common.jaxb;
import java.net.URI;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import cz.cuni.mff.peckam.java.origamist.common.GeneratedClassBase;
import cz.cuni.mff.peckam.java.origamist.utils.URIAdapter;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* <p>Provided property: name
* <p>Provided property: homepage
* <p>Java class for Author complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="Author">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="homepage" type="{http://www.w3.org/2001/XMLSchema}anyURI" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlType(name = "Author", propOrder = {
"name",
"homepage"
})
@XmlAccessorType(XmlAccessType.PROPERTY)
public class Author
extends GeneratedClassBase
implements Equals, HashCode
{
protected String name;
/**
* Property name
*
*/
public final static String NAME_PROPERTY = "name:cz.cuni.mff.peckam.java.origamist.common.jaxb.Author";
protected URI homepage;
/**
* Property homepage
*
*/
public final static String HOMEPAGE_PROPERTY = "homepage:cz.cuni.mff.peckam.java.origamist.common.jaxb.Author";
public Author() {
if (getClass().getName().equals("cz.cuni.mff.peckam.java.origamist.common.Author")) {
init();
}
}
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
@XmlElement(required = true)
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
String old = this.name;
this.name = value;
if (((old!= value)&&((old == null)||(value == null)))||((old!= null)&&(!old.equals(value)))) {
support.firePropertyChange(Author.NAME_PROPERTY, old, value);
}
}
/**
* Gets the value of the homepage property.
*
* @return
* possible object is
* {@link String }
*
*/
@XmlElement(type = String.class)
@XmlJavaTypeAdapter(URIAdapter.class)
public URI getHomepage() {
return homepage;
}
/**
* Sets the value of the homepage property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHomepage(URI value) {
URI old = this.homepage;
this.homepage = value;
if (((old!= value)&&((old == null)||(value == null)))||((old!= null)&&(!old.equals(value)))) {
support.firePropertyChange(Author.HOMEPAGE_PROPERTY, old, value);
}
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof Author)) {
return false;
}
if (this == object) {
return true;
}
final Author that = ((Author) 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;
}
}
{
URI lhsHomepage;
lhsHomepage = this.getHomepage();
URI rhsHomepage;
rhsHomepage = that.getHomepage();
if (!strategy.equals(LocatorUtils.property(thisLocator, "homepage", lhsHomepage), LocatorUtils.property(thatLocator, "homepage", rhsHomepage), lhsHomepage, rhsHomepage)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
String theName;
theName = this.getName();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName);
}
{
URI theHomepage;
theHomepage = this.getHomepage();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "homepage", theHomepage), currentHashCode, theHomepage);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
}