View Javadoc
1   
2   package org.kuali.ole.docstore.common.document.content.instance;
3   
4   import com.thoughtworks.xstream.annotations.XStreamAlias;
5   import com.thoughtworks.xstream.annotations.XStreamImplicit;
6   
7   import javax.xml.bind.annotation.*;
8   import java.util.ArrayList;
9   import java.util.List;
10  
11  
12  /**
13   * Created by IntelliJ IDEA.
14   * User: Pranitha
15   * Date: 8/17/12
16   * Time: 10:47 AM
17   * To change this template use File | Settings | File Templates.
18   * <p/>
19   * <p>Java class for instanceCollection complex type.
20   * <p/>
21   * <p>The following schema fragment specifies the expected content contained within this class.
22   * <p/>
23   * <pre>
24   * &lt;complexType name="instanceCollection">
25   *   &lt;complexContent>
26   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
27   *       &lt;sequence>
28   *         &lt;element name="instance" type="{http://ole.kuali.org/standards/ole-instance}instance" maxOccurs="unbounded"/>
29   *       &lt;/sequence>
30   *     &lt;/restriction>
31   *   &lt;/complexContent>
32   * &lt;/complexType>
33   * </pre>
34   */
35  @XmlAccessorType(XmlAccessType.FIELD)
36  @XmlType(name = "instanceCollection", namespace = "http://ole.kuali.org/standards/ole-instance", propOrder = {
37          "instance"
38  })
39  @XStreamAlias("instanceCollection")
40  @XmlRootElement(name = "instanceCollection", namespace = "http://ole.kuali.org/standards/ole-instance")
41  public class InstanceCollection {
42  
43      @XmlElement(name = "instance", namespace = "http://ole.kuali.org/standards/ole-instance", required = true)
44      @XStreamImplicit(itemFieldName = "instance")
45      protected List<Instance> instance;
46  
47      /**
48       * Gets the value of the instance property.
49       * <p/>
50       * <p/>
51       * This accessor method returns a reference to the live list,
52       * not a snapshot. Therefore any modification you make to the
53       * returned list will be present inside the JAXB object.
54       * This is why there is not a <CODE>set</CODE> method for the instance property.
55       * <p/>
56       * <p/>
57       * For example, to add a new item, do as follows:
58       * <pre>
59       *    getInstance().add(newItem);
60       * </pre>
61       * <p/>
62       * <p/>
63       * <p/>
64       * Objects of the following type(s) are allowed in the list
65       * {@link Instance }
66       */
67      public List<Instance> getInstance() {
68          if (instance == null) {
69              instance = new ArrayList<Instance>();
70          }
71          return this.instance;
72      }
73  
74      public void setInstance(List<Instance> instance) {
75          this.instance = instance;
76      }
77  }