package org.openprovenance.prov.sql; 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.namespace.QName; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.openprovenance.prov.xml.builder.Equals; import org.openprovenance.prov.xml.builder.HashCode; import org.openprovenance.prov.xml.builder.ToString; import org.openprovenance.prov.xml.builder.JAXBEqualsBuilder; import org.openprovenance.prov.xml.builder.JAXBHashCodeBuilder; import org.openprovenance.prov.xml.builder.JAXBToStringBuilder; /** * <p>Java class for IDRef complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="IDRef"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <attribute ref="{http://www.w3.org/ns/prov#}ref use="required""/> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "IDRef") public class IDRef implements Equals, HashCode, ToString { @XmlAttribute(name = "ref", namespace = "http://www.w3.org/ns/prov#", required = true) protected QName ref; /** * 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 equals(Object object, EqualsBuilder equalsBuilder) { if (!(object instanceof IDRef)) { equalsBuilder.appendSuper(false); return ; } if (this == object) { return ; } final IDRef that = ((IDRef) object); equalsBuilder.append(this.getRef(), that.getRef()); } public boolean equals(Object object) { if (!(object instanceof IDRef)) { return false; } if (this == object) { return true; } final EqualsBuilder equalsBuilder = new JAXBEqualsBuilder(); equals(object, equalsBuilder); return equalsBuilder.isEquals(); } public void hashCode(HashCodeBuilder hashCodeBuilder) { hashCodeBuilder.append(this.getRef()); } public int hashCode() { final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder(); hashCode(hashCodeBuilder); return hashCodeBuilder.toHashCode(); } public void toString(ToStringBuilder toStringBuilder) { { QName theRef; theRef = this.getRef(); toStringBuilder.append("ref", theRef); } } public String toString() { final ToStringBuilder toStringBuilder = new JAXBToStringBuilder(this); toString(toStringBuilder); return toStringBuilder.toString(); } }