View Javadoc

1   //
2   // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-792 
3   // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4   // Any modifications to this file will be lost upon recompilation of the source schema. 
5   // Generated on: 2010.09.16 at 12:50:49 AM BST 
6   //
7   
8   
9   package org.openprovenance.model;
10  
11  import java.util.ArrayList;
12  import java.util.List;
13  import javax.xml.bind.JAXBElement;
14  import javax.xml.bind.annotation.XmlAccessType;
15  import javax.xml.bind.annotation.XmlAccessorType;
16  import javax.xml.bind.annotation.XmlAttribute;
17  import javax.xml.bind.annotation.XmlElement;
18  import javax.xml.bind.annotation.XmlElementRef;
19  import javax.xml.bind.annotation.XmlID;
20  import javax.xml.bind.annotation.XmlSchemaType;
21  import javax.xml.bind.annotation.XmlType;
22  import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
23  import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
24  import org.apache.commons.lang.builder.EqualsBuilder;
25  import org.apache.commons.lang.builder.HashCodeBuilder;
26  import org.apache.commons.lang.builder.ToStringBuilder;
27  import org.jvnet.jaxb2_commons.lang.Equals;
28  import org.jvnet.jaxb2_commons.lang.HashCode;
29  import org.jvnet.jaxb2_commons.lang.ToString;
30  import org.jvnet.jaxb2_commons.lang.builder.JAXBEqualsBuilder;
31  import org.jvnet.jaxb2_commons.lang.builder.JAXBHashCodeBuilder;
32  import org.jvnet.jaxb2_commons.lang.builder.JAXBToStringBuilder;
33  
34  
35  /***
36   * <p>Java class for WasDerivedFromStar complex type.
37   * 
38   * <p>The following schema fragment specifies the expected content contained within this class.
39   * 
40   * <pre>
41   * &lt;complexType name="WasDerivedFromStar">
42   *   &lt;complexContent>
43   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
44   *       &lt;sequence>
45   *         &lt;element name="effect" type="{http://openprovenance.org/model/v1.1.a}ArtifactRef"/>
46   *         &lt;element name="cause" type="{http://openprovenance.org/model/v1.1.a}ArtifactRef"/>
47   *         &lt;element name="account" type="{http://openprovenance.org/model/v1.1.a}AccountRef" maxOccurs="unbounded" minOccurs="0"/>
48   *         &lt;element ref="{http://openprovenance.org/model/v1.1.a}annotation" maxOccurs="unbounded" minOccurs="0"/>
49   *       &lt;/sequence>
50   *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
51   *     &lt;/restriction>
52   *   &lt;/complexContent>
53   * &lt;/complexType>
54   * </pre>
55   * 
56   * 
57   */
58  @XmlAccessorType(XmlAccessType.FIELD)
59  @XmlType(name = "WasDerivedFromStar", namespace = "http://openprovenance.org/model/v1.1.a", propOrder = {
60      "effect",
61      "cause",
62      "account",
63      "annotation"
64  })
65  public class WasDerivedFromStar implements Edge, Equals, HashCode, ToString
66  {
67  
68      @XmlElement(namespace = "http://openprovenance.org/model/v1.1.a", required = true)
69      protected ArtifactRef effect;
70      @XmlElement(namespace = "http://openprovenance.org/model/v1.1.a", required = true)
71      protected ArtifactRef cause;
72      @XmlElement(namespace = "http://openprovenance.org/model/v1.1.a")
73      protected List<AccountRef> account;
74      @XmlElementRef(name = "annotation", namespace = "http://openprovenance.org/model/v1.1.a", type = JAXBElement.class)
75      protected List<JAXBElement<? extends EmbeddedAnnotation>> annotation;
76      @XmlAttribute
77      @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
78      @XmlID
79      @XmlSchemaType(name = "ID")
80      protected String id;
81  
82      /***
83       * Gets the value of the effect property.
84       * 
85       * @return
86       *     possible object is
87       *     {@link ArtifactRef }
88       *     
89       */
90      public ArtifactRef getEffect() {
91          return effect;
92      }
93  
94      /***
95       * Sets the value of the effect property.
96       * 
97       * @param value
98       *     allowed object is
99       *     {@link ArtifactRef }
100      *     
101      */
102     public void setEffect(ArtifactRef value) {
103         this.effect = value;
104     }
105 
106     /***
107      * Gets the value of the cause property.
108      * 
109      * @return
110      *     possible object is
111      *     {@link ArtifactRef }
112      *     
113      */
114     public ArtifactRef getCause() {
115         return cause;
116     }
117 
118     /***
119      * Sets the value of the cause property.
120      * 
121      * @param value
122      *     allowed object is
123      *     {@link ArtifactRef }
124      *     
125      */
126     public void setCause(ArtifactRef value) {
127         this.cause = value;
128     }
129 
130     /***
131      * Gets the value of the account property.
132      * 
133      * <p>
134      * This accessor method returns a reference to the live list,
135      * not a snapshot. Therefore any modification you make to the
136      * returned list will be present inside the JAXB object.
137      * This is why there is not a <CODE>set</CODE> method for the account property.
138      * 
139      * <p>
140      * For example, to add a new item, do as follows:
141      * <pre>
142      *    getAccount().add(newItem);
143      * </pre>
144      * 
145      * 
146      * <p>
147      * Objects of the following type(s) are allowed in the list
148      * {@link AccountRef }
149      * 
150      * 
151      */
152     public List<AccountRef> getAccount() {
153         if (account == null) {
154             account = new ArrayList<AccountRef>();
155         }
156         return this.account;
157     }
158 
159     /***
160      * Gets the value of the annotation property.
161      * 
162      * <p>
163      * This accessor method returns a reference to the live list,
164      * not a snapshot. Therefore any modification you make to the
165      * returned list will be present inside the JAXB object.
166      * This is why there is not a <CODE>set</CODE> method for the annotation property.
167      * 
168      * <p>
169      * For example, to add a new item, do as follows:
170      * <pre>
171      *    getAnnotation().add(newItem);
172      * </pre>
173      * 
174      * 
175      * <p>
176      * Objects of the following type(s) are allowed in the list
177      * {@link JAXBElement }{@code <}{@link Type }{@code >}
178      * {@link JAXBElement }{@code <}{@link Label }{@code >}
179      * {@link JAXBElement }{@code <}{@link PName }{@code >}
180      * {@link JAXBElement }{@code <}{@link Profile }{@code >}
181      * {@link JAXBElement }{@code <}{@link EmbeddedAnnotation }{@code >}
182      * {@link JAXBElement }{@code <}{@link Value }{@code >}
183      * 
184      * 
185      */
186     public List<JAXBElement<? extends EmbeddedAnnotation>> getAnnotation() {
187         if (annotation == null) {
188             annotation = new ArrayList<JAXBElement<? extends EmbeddedAnnotation>>();
189         }
190         return this.annotation;
191     }
192 
193     /***
194      * Gets the value of the id property.
195      * 
196      * @return
197      *     possible object is
198      *     {@link String }
199      *     
200      */
201     public String getId() {
202         return id;
203     }
204 
205     /***
206      * Sets the value of the id property.
207      * 
208      * @param value
209      *     allowed object is
210      *     {@link String }
211      *     
212      */
213     public void setId(String value) {
214         this.id = value;
215     }
216 
217     public void equals(Object object, EqualsBuilder equalsBuilder) {
218         if (!(object instanceof WasDerivedFromStar)) {
219             equalsBuilder.appendSuper(false);
220             return ;
221         }
222         if (this == object) {
223             return ;
224         }
225         final WasDerivedFromStar that = ((WasDerivedFromStar) object);
226         equalsBuilder.append(this.getEffect(), that.getEffect());
227         equalsBuilder.append(this.getCause(), that.getCause());
228         equalsBuilder.append(this.getAccount(), that.getAccount());
229         equalsBuilder.append(this.getAnnotation(), that.getAnnotation());
230         equalsBuilder.append(this.getId(), that.getId());
231     }
232 
233     public boolean equals(Object object) {
234         if (!(object instanceof WasDerivedFromStar)) {
235             return false;
236         }
237         if (this == object) {
238             return true;
239         }
240         final EqualsBuilder equalsBuilder = new JAXBEqualsBuilder();
241         equals(object, equalsBuilder);
242         return equalsBuilder.isEquals();
243     }
244 
245     public void hashCode(HashCodeBuilder hashCodeBuilder) {
246         hashCodeBuilder.append(this.getEffect());
247         hashCodeBuilder.append(this.getCause());
248         hashCodeBuilder.append(this.getAccount());
249         hashCodeBuilder.append(this.getAnnotation());
250         hashCodeBuilder.append(this.getId());
251     }
252 
253     public int hashCode() {
254         final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder();
255         hashCode(hashCodeBuilder);
256         return hashCodeBuilder.toHashCode();
257     }
258 
259     public void toString(ToStringBuilder toStringBuilder) {
260         {
261             ArtifactRef theEffect;
262             theEffect = this.getEffect();
263             toStringBuilder.append("effect", theEffect);
264         }
265         {
266             ArtifactRef theCause;
267             theCause = this.getCause();
268             toStringBuilder.append("cause", theCause);
269         }
270         {
271             List<AccountRef> theAccount;
272             theAccount = this.getAccount();
273             toStringBuilder.append("account", theAccount);
274         }
275         {
276             List<JAXBElement<? extends EmbeddedAnnotation>> theAnnotation;
277             theAnnotation = this.getAnnotation();
278             toStringBuilder.append("annotation", theAnnotation);
279         }
280         {
281             String theId;
282             theId = this.getId();
283             toStringBuilder.append("id", theId);
284         }
285     }
286 
287     public String toString() {
288         final ToStringBuilder toStringBuilder = new JAXBToStringBuilder(this);
289         toString(toStringBuilder);
290         return toStringBuilder.toString();
291     }
292 
293 }