org.openprovenance.prov.sql.Entry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of prov-sql Show documentation
Show all versions of prov-sql Show documentation
Java Objects representing the PROV model, XML serialiser/deserialiser for them, and ORM mapping generated by HyperJaxb.
package org.openprovenance.prov.sql;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.openprovenance.apache.commons.lang.builder.EqualsBuilder;
import org.openprovenance.apache.commons.lang.builder.HashCodeBuilder;
import org.openprovenance.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;
/**
* Java class for KeyEntityPair complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="KeyEntityPair">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="key" type="{http://www.w3.org/2001/XMLSchema}anySimpleType"/>
* <element name="entity" type="{http://www.w3.org/ns/prov#}IDRef"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "KeyEntityPair", propOrder = {
"key",
"entity"
})
public class Entry
implements Equals, HashCode, ToString, org.openprovenance.prov.model.Entry
{
@javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(KeyAdapter.class)
@XmlAnyElement
protected org.openprovenance.prov.sql.Key key;
@XmlElement(required = true, type = org.openprovenance.prov.sql.IDRef.class)
protected org.openprovenance.prov.model.QualifiedName entity;
/**
* Gets the value of the key property.
*
* @return
* possible object is
* {@link Object }
*
*/
public org.openprovenance.prov.model.Key getKey() {
return key;
}
/**
* Sets the value of the key property.
*
* @param value
* allowed object is
* {@link Object }
*
*/
public void setKey(org.openprovenance.prov.model.Key value) {
this.key = (org.openprovenance.prov.sql.Key)value;
}
/**
* Gets the value of the entity property.
*
* @return
* possible object is
* {@link org.openprovenance.prov.sql.IDRef }
*
*/
public org.openprovenance.prov.model.QualifiedName getEntity() {
return entity;
}
/**
* Sets the value of the entity property.
*
* @param value
* allowed object is
* {@link org.openprovenance.prov.sql.IDRef }
*
*/
public void setEntity(org.openprovenance.prov.model.QualifiedName value) {
this.entity = value;
}
public void equals(Object object, EqualsBuilder equalsBuilder) {
if (!(object instanceof Entry)) {
equalsBuilder.appendSuper(false);
return ;
}
if (this == object) {
return ;
}
final Entry that = ((Entry) object);
equalsBuilder.append(this.getKey(), that.getKey());
equalsBuilder.append(this.getEntity(), that.getEntity());
}
public boolean equals(Object object) {
if (!(object instanceof Entry)) {
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.getKey());
hashCodeBuilder.append(this.getEntity());
}
public int hashCode() {
final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder();
hashCode(hashCodeBuilder);
return hashCodeBuilder.toHashCode();
}
public void toString(ToStringBuilder toStringBuilder) {
{
org.openprovenance.prov.model.TypedValue theKey;
theKey = this.getKey();
toStringBuilder.append("key", theKey);
}
{
org.openprovenance.prov.model.QualifiedName theEntity;
theEntity = this.getEntity();
toStringBuilder.append("entity", theEntity);
}
}
public String toString() {
final ToStringBuilder toStringBuilder = new JAXBToStringBuilder(this);
toString(toStringBuilder);
return toStringBuilder.toString();
}
}