View Javadoc
1   /*
2    * Copyright 2012 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.openehealth.ipf.commons.ihe.xds.core.requests;
17  
18  import lombok.EqualsAndHashCode;
19  import lombok.ToString;
20  
21  import javax.xml.bind.annotation.XmlAccessType;
22  import javax.xml.bind.annotation.XmlAccessorType;
23  import javax.xml.bind.annotation.XmlElementRef;
24  import javax.xml.bind.annotation.XmlRootElement;
25  import javax.xml.bind.annotation.XmlType;
26  import java.io.Serializable;
27  import java.util.ArrayList;
28  import java.util.List;
29  
30  
31  /**
32   * Request object for a single Series.
33   * <p>
34   * All members of this class are allowed to be <code>null</code>.
35   * @author Clay Sebourn
36   */
37  
38  @XmlAccessorType(XmlAccessType.FIELD)
39  @XmlType(name = "RetrieveSeries", propOrder = {"seriesInstanceUID", "documents"})
40  @XmlRootElement(name = "retrieveSeries")
41  @EqualsAndHashCode(doNotUseGetters = true)
42  @ToString(doNotUseGetters = true)
43  public class RetrieveSeries implements Serializable
44  {
45      private static final long serialVersionUID = 8999352499981099421L;
46  
47      protected String seriesInstanceUID;
48      @XmlElementRef
49      private List<DocumentReference> documents = new ArrayList<>();
50  
51      /**
52       * Constructs the RetrieveSeries.
53       */
54      public RetrieveSeries() {}
55  
56      /**
57       * Constructs the Series request.
58       *
59       * @param seriesInstanceUID    he series instance UID.
60       * @param documents            the documents.
61       */
62      public RetrieveSeries(String seriesInstanceUID, List<DocumentReference> documents) {
63          this.seriesInstanceUID = seriesInstanceUID;
64          this.documents = documents;
65      }
66  
67      /**
68       * Gets the value of the seriesInstanceUID property.
69       *
70       * @return seriesInstanceUID      {@link String }
71       *
72       */
73      public String getSeriesInstanceUID() {
74          return seriesInstanceUID;
75      }
76  
77      /**
78       * @param seriesInstanceUID
79       *          the unique ID of the series instance.
80       */
81      public void setSeriesInstanceUID(String seriesInstanceUID) {
82          this.seriesInstanceUID = seriesInstanceUID;
83      }
84  
85      /**
86       * @return the list of documents to retrieve.
87       */
88      public List<DocumentReference> getDocuments() {
89          return documents;
90      }
91  
92  }