org.openprovenance.prov.xml.WasEndedBy Maven / Gradle / Ivy
Show all versions of prov-xml Show documentation
package org.openprovenance.prov.xml;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
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;
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.model.Attribute;
/**
* Java class for End complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="End">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="activity" type="{http://www.w3.org/ns/prov#}IDRef"/>
* <element name="trigger" type="{http://www.w3.org/ns/prov#}IDRef" minOccurs="0"/>
* <element name="ender" type="{http://www.w3.org/ns/prov#}IDRef" minOccurs="0"/>
* <element name="time" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
* <element ref="{http://www.w3.org/ns/prov#}label" maxOccurs="unbounded" minOccurs="0"/>
* <element ref="{http://www.w3.org/ns/prov#}location" maxOccurs="unbounded" minOccurs="0"/>
* <element ref="{http://www.w3.org/ns/prov#}role" maxOccurs="unbounded" minOccurs="0"/>
* <element ref="{http://www.w3.org/ns/prov#}type" maxOccurs="unbounded" minOccurs="0"/>
* <any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute ref="{http://www.w3.org/ns/prov#}id"/>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "End", propOrder = {
"activity",
"trigger",
"ender",
"time",
"label",
// "location",
// "role",
// "type",
// "any"
"all"
})
public class WasEndedBy implements Equals, HashCode, ToString, org.openprovenance.prov.model.WasEndedBy, HasAllAttributes
{
@javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(IDRefAdapter.class)
@XmlElement(required = true, type = org.openprovenance.prov.xml.IDRef.class)
protected org.openprovenance.prov.model.QualifiedName activity;
@javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(IDRefAdapter.class)
@XmlElement(type = org.openprovenance.prov.xml.IDRef.class)
protected org.openprovenance.prov.model.QualifiedName trigger;
@javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(IDRefAdapter.class)
@XmlElement(type = org.openprovenance.prov.xml.IDRef.class)
protected org.openprovenance.prov.model.QualifiedName ender;
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar time;
@XmlElement(type = org.openprovenance.prov.xml.InternationalizedString.class)
protected List label;
transient protected List location;
transient protected List role;
transient protected List type;
transient protected List others;
@XmlAnyElement
protected List all;
@XmlAttribute(name = "id", namespace = "http://www.w3.org/ns/prov#")
@javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter(QualifiedNameAdapter.class)
protected org.openprovenance.prov.model.QualifiedName id;
/**
* Gets the value of the activity property.
*
* @return
* possible object is
* {@link org.openprovenance.prov.xml.QualifiedName }
*
*/
public org.openprovenance.prov.model.QualifiedName getActivity() {
return activity;
}
/**
* Sets the value of the activity property.
*
* @param value
* allowed object is
* {@link org.openprovenance.prov.xml.QualifiedName }
*
*/
public void setActivity(org.openprovenance.prov.model.QualifiedName value) {
this.activity = value;
}
/**
* Gets the value of the trigger property.
*
* @return
* possible object is
* {@link org.openprovenance.prov.xml.QualifiedName }
*
*/
public org.openprovenance.prov.model.QualifiedName getTrigger() {
return trigger;
}
/**
* Sets the value of the trigger property.
*
* @param value
* allowed object is
* {@link org.openprovenance.prov.xml.QualifiedName }
*
*/
public void setTrigger(org.openprovenance.prov.model.QualifiedName value) {
this.trigger = value;
}
/**
* Gets the value of the ender property.
*
* @return
* possible object is
* {@link org.openprovenance.prov.xml.QualifiedName }
*
*/
public org.openprovenance.prov.model.QualifiedName getEnder() {
return ender;
}
/**
* Sets the value of the ender property.
*
* @param value
* allowed object is
* {@link org.openprovenance.prov.xml.QualifiedName }
*
*/
public void setEnder(org.openprovenance.prov.model.QualifiedName value) {
this.ender = value;
}
/**
* Gets the value of the time property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getTime() {
return time;
}
/**
* Sets the value of the time property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setTime(XMLGregorianCalendar value) {
this.time = value;
}
/**
* Gets the value of the label property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the label property.
*
*
* For example, to add a new item, do as follows:
*
* getLabel().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link org.openprovenance.prov.xml.InternationalizedString }
*
*
*/
public List getLabel() {
if (label == null) {
label = new ArrayList();
}
return this.label;
}
/**
* Gets the value of the location property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the location property.
*
*
* For example, to add a new item, do as follows:
*
* getLocation().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link org.openprovenance.prov.xml.Location }
*
*
*/
public List getLocation() {
if (location == null) {
location=AttributeList.populateKnownAttributes(this, all, org.openprovenance.prov.model.Location.class);
}
return this.location;
}
/**
* Gets the value of the role property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the role property.
*
*
* For example, to add a new item, do as follows:
*
* getRole().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link org.openprovenance.prov.xml.Role }
*
*
*/
public List getRole() {
if (role == null) {
role=AttributeList.populateKnownAttributes(this, all, org.openprovenance.prov.model.Role.class);
}
return this.role;
}
/**
* Gets the value of the type property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a set
method for the type property.
*
*
* For example, to add a new item, do as follows:
*
* getType().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link org.openprovenance.prov.xml.Type }
*
*
*/
public List getType() {
if (type == null) {
type=AttributeList.populateKnownAttributes(this,all, org.openprovenance.prov.model.Type.class);
}
return this.type;
}
public List getOther() {
if (others == null) {
others=AttributeList.populateKnownAttributes(this,all, org.openprovenance.prov.model.Other.class);
}
return this.others;
}
/** Gets the List of all attributes
* @see org.openprovenance.prov.xml.HasAllAttributes#getAllAttributes()
*/
@Override
public List getAllAttributes() {
if (all == null) {
all = new SortedAttributeList();
}
return this.all;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link QualifiedName }
*
*/
public org.openprovenance.prov.model.QualifiedName getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link QualifiedName }
*
*/
public void setId(org.openprovenance.prov.model.QualifiedName value) {
this.id = value;
}
public void equals(Object object, EqualsBuilder equalsBuilder) {
if (!(object instanceof WasEndedBy)) {
equalsBuilder.appendSuper(false);
return ;
}
if (this == object) {
return ;
}
final WasEndedBy that = ((WasEndedBy) object);
equalsBuilder.append(this.getActivity(), that.getActivity());
equalsBuilder.append(this.getTrigger(), that.getTrigger());
equalsBuilder.append(this.getEnder(), that.getEnder());
equalsBuilder.append(this.getTime(), that.getTime());
equalsBuilder.append(this.getLabel(), that.getLabel());
equalsBuilder.append(this.getLocation(), that.getLocation());
equalsBuilder.append(this.getRole(), that.getRole());
equalsBuilder.append(this.getType(), that.getType());
equalsBuilder.append(this.getOther(), that.getOther());
equalsBuilder.append(this.getId(), that.getId());
}
public boolean equals(Object object) {
if (!(object instanceof WasEndedBy)) {
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.getActivity());
hashCodeBuilder.append(this.getTrigger());
hashCodeBuilder.append(this.getEnder());
hashCodeBuilder.append(this.getTime());
hashCodeBuilder.append(this.getLabel());
hashCodeBuilder.append(this.getLocation());
hashCodeBuilder.append(this.getRole());
hashCodeBuilder.append(this.getType());
hashCodeBuilder.append(this.getOther());
hashCodeBuilder.append(this.getId());
}
public int hashCode() {
final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder();
hashCode(hashCodeBuilder);
return hashCodeBuilder.toHashCode();
}
public void toString(ToStringBuilder toStringBuilder) {
{
org.openprovenance.prov.model.QualifiedName theActivity;
theActivity = this.getActivity();
toStringBuilder.append("activity", theActivity);
}
{
org.openprovenance.prov.model.QualifiedName theTrigger;
theTrigger = this.getTrigger();
toStringBuilder.append("trigger", theTrigger);
}
{
org.openprovenance.prov.model.QualifiedName theEnder;
theEnder = this.getEnder();
toStringBuilder.append("ender", theEnder);
}
{
XMLGregorianCalendar theTime;
theTime = this.getTime();
toStringBuilder.append("time", theTime);
}
{
List theLabel;
theLabel = this.getLabel();
toStringBuilder.append("label", theLabel);
}
{
List theLocation;
theLocation = this.getLocation();
toStringBuilder.append("location", theLocation);
}
{
List theRole;
theRole = this.getRole();
toStringBuilder.append("role", theRole);
}
{
List theType;
theType = this.getType();
toStringBuilder.append("type", theType);
}
{
List theOthers;
theOthers = this.getOther();
toStringBuilder.append("others", theOthers);
}
{
org.openprovenance.prov.model.QualifiedName theId;
theId = this.getId();
toStringBuilder.append("id", theId);
}
}
public String toString() {
final ToStringBuilder toStringBuilder = new JAXBToStringBuilder(this);
toString(toStringBuilder);
return toStringBuilder.toString();
}
public Kind getKind() {
return org.openprovenance.prov.model.StatementOrBundle.Kind.PROV_END;
}
}