View Javadoc
1   /*
2    * Copyright 2009 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.Getter;
20  import lombok.Setter;
21  import lombok.ToString;
22  import org.openehealth.ipf.commons.ihe.xds.core.metadata.Association;
23  import org.openehealth.ipf.commons.ihe.xds.core.metadata.Document;
24  import org.openehealth.ipf.commons.ihe.xds.core.metadata.Folder;
25  import org.openehealth.ipf.commons.ihe.xds.core.metadata.SubmissionSet;
26  
27  import javax.xml.bind.annotation.*;
28  import java.io.Serializable;
29  import java.util.ArrayList;
30  import java.util.List;
31  
32  /**
33   * The data required for the Provide and register document set request.
34   * <p>
35   * All non-list members of this class are allowed to be <code>null</code>.
36   * The lists are pre-created and can therefore never be <code>null</code>.
37   * @author Jens Riemschneider
38   */
39  @XmlAccessorType(XmlAccessType.FIELD)
40  @XmlType(name = "ProvideAndRegisterDocumentSet", propOrder = {
41          "submissionSet", "folders", "documents", "associations"})
42  @XmlRootElement(name = "provideAndRegisterDocumentSet")
43  @EqualsAndHashCode(doNotUseGetters = true)
44  @ToString(doNotUseGetters = true)
45  public class ProvideAndRegisterDocumentSet implements Serializable {
46      private static final long serialVersionUID = -746285879968609663L;
47      
48      @XmlElementRef
49      @Getter @Setter private SubmissionSet submissionSet;
50      @XmlElementRef
51      @Getter private final List<Folder> folders = new ArrayList<>();
52      @XmlElementRef
53      @Getter private final List<Document> documents = new ArrayList<>();
54      @XmlElementRef
55      @Getter private final List<Association> associations = new ArrayList<>();
56      @XmlAttribute
57      @Getter @Setter private String targetHomeCommunityId;
58  
59  }