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 Process complex type.
37   * 
38   * <p>The following schema fragment specifies the expected content contained within this class.
39   * 
40   * <pre>
41   * &lt;complexType name="Process">
42   *   &lt;complexContent>
43   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
44   *       &lt;sequence>
45   *         &lt;element name="account" type="{http://openprovenance.org/model/v1.1.a}AccountRef" maxOccurs="unbounded" minOccurs="0"/>
46   *         &lt;element ref="{http://openprovenance.org/model/v1.1.a}annotation" maxOccurs="unbounded" minOccurs="0"/>
47   *       &lt;/sequence>
48   *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
49   *     &lt;/restriction>
50   *   &lt;/complexContent>
51   * &lt;/complexType>
52   * </pre>
53   * 
54   * 
55   */
56  @XmlAccessorType(XmlAccessType.FIELD)
57  @XmlType(name = "Process", namespace = "http://openprovenance.org/model/v1.1.a", propOrder = {
58      "account",
59      "annotation"
60  })
61  public class Process
62      implements Node, Equals, HashCode, ToString
63  {
64  
65      @XmlElement(namespace = "http://openprovenance.org/model/v1.1.a")
66      protected List<AccountRef> account;
67      @XmlElementRef(name = "annotation", namespace = "http://openprovenance.org/model/v1.1.a", type = JAXBElement.class)
68      protected List<JAXBElement<? extends EmbeddedAnnotation>> annotation;
69      @XmlAttribute
70      @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
71      @XmlID
72      @XmlSchemaType(name = "ID")
73      protected String id;
74  
75      /***
76       * Gets the value of the account property.
77       * 
78       * <p>
79       * This accessor method returns a reference to the live list,
80       * not a snapshot. Therefore any modification you make to the
81       * returned list will be present inside the JAXB object.
82       * This is why there is not a <CODE>set</CODE> method for the account property.
83       * 
84       * <p>
85       * For example, to add a new item, do as follows:
86       * <pre>
87       *    getAccount().add(newItem);
88       * </pre>
89       * 
90       * 
91       * <p>
92       * Objects of the following type(s) are allowed in the list
93       * {@link AccountRef }
94       * 
95       * 
96       */
97      public List<AccountRef> getAccount() {
98          if (account == null) {
99              account = new ArrayList<AccountRef>();
100         }
101         return this.account;
102     }
103 
104     /***
105      * Gets the value of the annotation property.
106      * 
107      * <p>
108      * This accessor method returns a reference to the live list,
109      * not a snapshot. Therefore any modification you make to the
110      * returned list will be present inside the JAXB object.
111      * This is why there is not a <CODE>set</CODE> method for the annotation property.
112      * 
113      * <p>
114      * For example, to add a new item, do as follows:
115      * <pre>
116      *    getAnnotation().add(newItem);
117      * </pre>
118      * 
119      * 
120      * <p>
121      * Objects of the following type(s) are allowed in the list
122      * {@link JAXBElement }{@code <}{@link Type }{@code >}
123      * {@link JAXBElement }{@code <}{@link Label }{@code >}
124      * {@link JAXBElement }{@code <}{@link PName }{@code >}
125      * {@link JAXBElement }{@code <}{@link Profile }{@code >}
126      * {@link JAXBElement }{@code <}{@link EmbeddedAnnotation }{@code >}
127      * {@link JAXBElement }{@code <}{@link Value }{@code >}
128      * 
129      * 
130      */
131     public List<JAXBElement<? extends EmbeddedAnnotation>> getAnnotation() {
132         if (annotation == null) {
133             annotation = new ArrayList<JAXBElement<? extends EmbeddedAnnotation>>();
134         }
135         return this.annotation;
136     }
137 
138     /***
139      * Gets the value of the id property.
140      * 
141      * @return
142      *     possible object is
143      *     {@link String }
144      *     
145      */
146     public String getId() {
147         return id;
148     }
149 
150     /***
151      * Sets the value of the id property.
152      * 
153      * @param value
154      *     allowed object is
155      *     {@link String }
156      *     
157      */
158     public void setId(String value) {
159         this.id = value;
160     }
161 
162     public void equals(Object object, EqualsBuilder equalsBuilder) {
163         if (!(object instanceof Process)) {
164             equalsBuilder.appendSuper(false);
165             return ;
166         }
167         if (this == object) {
168             return ;
169         }
170         final Process that = ((Process) object);
171         equalsBuilder.append(this.getAccount(), that.getAccount());
172         equalsBuilder.append(this.getAnnotation(), that.getAnnotation());
173         equalsBuilder.append(this.getId(), that.getId());
174     }
175 
176     public boolean equals(Object object) {
177         if (!(object instanceof Process)) {
178             return false;
179         }
180         if (this == object) {
181             return true;
182         }
183         final EqualsBuilder equalsBuilder = new JAXBEqualsBuilder();
184         equals(object, equalsBuilder);
185         return equalsBuilder.isEquals();
186     }
187 
188     public void hashCode(HashCodeBuilder hashCodeBuilder) {
189         hashCodeBuilder.append(this.getAccount());
190         hashCodeBuilder.append(this.getAnnotation());
191         hashCodeBuilder.append(this.getId());
192     }
193 
194     public int hashCode() {
195         final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder();
196         hashCode(hashCodeBuilder);
197         return hashCodeBuilder.toHashCode();
198     }
199 
200     public void toString(ToStringBuilder toStringBuilder) {
201         {
202             List<AccountRef> theAccount;
203             theAccount = this.getAccount();
204             toStringBuilder.append("account", theAccount);
205         }
206         {
207             List<JAXBElement<? extends EmbeddedAnnotation>> theAnnotation;
208             theAnnotation = this.getAnnotation();
209             toStringBuilder.append("annotation", theAnnotation);
210         }
211         {
212             String theId;
213             theId = this.getId();
214             toStringBuilder.append("id", theId);
215         }
216     }
217 
218     public String toString() {
219         final ToStringBuilder toStringBuilder = new JAXBToStringBuilder(this);
220         toString(toStringBuilder);
221         return toStringBuilder.toString();
222     }
223 
224 }