//
// 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.util.Arrays;
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 javax.xml.bind.annotation.XmlValue;
import cz.cuni.mff.peckam.java.origamist.common.GeneratedClassBase;
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: value
* <p>Provided property: type
* <p>Java class for BinaryImage complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="BinaryImage">
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
* <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlType(name = "BinaryImage", propOrder = {
"value"
})
@XmlAccessorType(XmlAccessType.PROPERTY)
public class BinaryImage
extends GeneratedClassBase
implements Equals, HashCode
{
protected byte[] value;
/**
* Property value
*
*/
public final static String VALUE_PROPERTY = "value:cz.cuni.mff.peckam.java.origamist.common.jaxb.BinaryImage";
protected String type;
/**
* Property type
*
*/
public final static String TYPE_PROPERTY = "type:cz.cuni.mff.peckam.java.origamist.common.jaxb.BinaryImage";
public BinaryImage() {
if (getClass().getName().equals("cz.cuni.mff.peckam.java.origamist.common.BinaryImage")) {
init();
}
}
/**
* Gets the value of the value property.
*
* @return
* possible object is
* byte[]
*/
@XmlValue
public byte[] getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* byte[]
*/
public void setValue(byte[] value) {
byte[] old = this.value;
this.value = ((byte[]) value);
if (!Arrays.equals(old, value)) {
support.firePropertyChange(BinaryImage.VALUE_PROPERTY, old, value);
}
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link String }
*
*/
@XmlAttribute
public String getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setType(String value) {
String old = this.type;
this.type = value;
if (((old!= value)&&((old == null)||(value == null)))||((old!= null)&&(!old.equals(value)))) {
support.firePropertyChange(BinaryImage.TYPE_PROPERTY, old, value);
}
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof BinaryImage)) {
return false;
}
if (this == object) {
return true;
}
final BinaryImage that = ((BinaryImage) object);
{
byte[] lhsValue;
lhsValue = this.getValue();
byte[] rhsValue;
rhsValue = that.getValue();
if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue)) {
return false;
}
}
{
String lhsType;
lhsType = this.getType();
String rhsType;
rhsType = that.getType();
if (!strategy.equals(LocatorUtils.property(thisLocator, "type", lhsType), LocatorUtils.property(thatLocator, "type", rhsType), lhsType, rhsType)) {
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;
{
byte[] theValue;
theValue = this.getValue();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "value", theValue), currentHashCode, theValue);
}
{
String theType;
theType = this.getType();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
}