1
2
3
4
5
6
7
8
9 package org.openprovenance.model;
10
11 import javax.xml.bind.annotation.XmlAccessType;
12 import javax.xml.bind.annotation.XmlAccessorType;
13 import javax.xml.bind.annotation.XmlAttribute;
14 import javax.xml.bind.annotation.XmlIDREF;
15 import javax.xml.bind.annotation.XmlSchemaType;
16 import javax.xml.bind.annotation.XmlType;
17 import org.apache.commons.lang.builder.EqualsBuilder;
18 import org.apache.commons.lang.builder.HashCodeBuilder;
19 import org.apache.commons.lang.builder.ToStringBuilder;
20 import org.jvnet.jaxb2_commons.lang.Equals;
21 import org.jvnet.jaxb2_commons.lang.HashCode;
22 import org.jvnet.jaxb2_commons.lang.ToString;
23 import org.jvnet.jaxb2_commons.lang.builder.JAXBEqualsBuilder;
24 import org.jvnet.jaxb2_commons.lang.builder.JAXBHashCodeBuilder;
25 import org.jvnet.jaxb2_commons.lang.builder.JAXBToStringBuilder;
26
27
28 /***
29 * <p>Java class for ProcessRef complex type.
30 *
31 * <p>The following schema fragment specifies the expected content contained within this class.
32 *
33 * <pre>
34 * <complexType name="ProcessRef">
35 * <complexContent>
36 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
37 * <attribute name="ref" type="{http://www.w3.org/2001/XMLSchema}IDREF" />
38 * </restriction>
39 * </complexContent>
40 * </complexType>
41 * </pre>
42 *
43 *
44 */
45 @XmlAccessorType(XmlAccessType.FIELD)
46 @XmlType(name = "ProcessRef", namespace = "http://openprovenance.org/model/v1.1.a")
47 public class ProcessRef
48 implements Ref, Equals, HashCode, ToString
49 {
50
51 @XmlAttribute
52 @XmlIDREF
53 @XmlSchemaType(name = "IDREF")
54 protected Object ref;
55
56 /***
57 * Gets the value of the ref property.
58 *
59 * @return
60 * possible object is
61 * {@link Object }
62 *
63 */
64 public Object getRef() {
65 return ref;
66 }
67
68 /***
69 * Sets the value of the ref property.
70 *
71 * @param value
72 * allowed object is
73 * {@link Object }
74 *
75 */
76 public void setRef(Object value) {
77 this.ref = value;
78 }
79
80 public void equals(Object object, EqualsBuilder equalsBuilder) {
81 if (!(object instanceof ProcessRef)) {
82 equalsBuilder.appendSuper(false);
83 return ;
84 }
85 if (this == object) {
86 return ;
87 }
88 final ProcessRef that = ((ProcessRef) object);
89 equalsBuilder.append(this.getRef(), that.getRef());
90 }
91
92 public boolean equals(Object object) {
93 if (!(object instanceof ProcessRef)) {
94 return false;
95 }
96 if (this == object) {
97 return true;
98 }
99 final EqualsBuilder equalsBuilder = new JAXBEqualsBuilder();
100 equals(object, equalsBuilder);
101 return equalsBuilder.isEquals();
102 }
103
104 public void hashCode(HashCodeBuilder hashCodeBuilder) {
105 hashCodeBuilder.append(this.getRef());
106 }
107
108 public int hashCode() {
109 final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder();
110 hashCode(hashCodeBuilder);
111 return hashCodeBuilder.toHashCode();
112 }
113
114 public void toString(ToStringBuilder toStringBuilder) {
115 {
116 Object theRef;
117 theRef = this.getRef();
118 toStringBuilder.append("ref", theRef);
119 }
120 }
121
122 public String toString() {
123 final ToStringBuilder toStringBuilder = new JAXBToStringBuilder(this);
124 toString(toStringBuilder);
125 return toStringBuilder.toString();
126 }
127
128 }