View Javadoc
1   /*
2    * Copyright 2009-2011 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.metadata;
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.ExtraMetadataHolder;
23  import org.openehealth.ipf.commons.ihe.xds.core.metadata.jaxbadapters.StringMap;
24  import org.openehealth.ipf.commons.ihe.xds.core.metadata.jaxbadapters.StringMapAdapter;
25  
26  import javax.xml.bind.annotation.XmlAccessType;
27  import javax.xml.bind.annotation.XmlAccessorType;
28  import javax.xml.bind.annotation.XmlElement;
29  import javax.xml.bind.annotation.XmlType;
30  import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
31  import java.io.Serializable;
32  import java.util.List;
33  import java.util.Map;
34  
35  /**
36   * Common base class of all XDS meta data classes.
37   * <p>
38   * All members of this class are allowed to be <code>null</code>.
39   * @author Jens Riemschneider
40   */
41  @XmlAccessorType(XmlAccessType.FIELD)
42  @XmlType(name = "IdentifiedObject", propOrder = {
43          "homeCommunityId", "entryUuid", "logicalUuid", "version", "uniqueId",
44          "patientId", "availabilityStatus", "title", "comments", "limitedMetadata",
45          "extraMetadata"})
46  @EqualsAndHashCode(doNotUseGetters = true)
47  @ToString(doNotUseGetters = true)
48  abstract public class XDSMetaClass implements Serializable, ExtraMetadataHolder {
49      private static final long serialVersionUID = -1193012076778493996L;
50      
51      @Getter @Setter private AvailabilityStatus availabilityStatus;
52      @Getter @Setter private LocalizedString comments;
53      @Getter @Setter private String entryUuid;
54      @Getter @Setter private Identifiable patientId;
55      @Getter @Setter private LocalizedString title;
56      @Getter @Setter private String uniqueId;
57      @Getter @Setter private String homeCommunityId;
58      @Getter @Setter private String logicalUuid;
59      @Getter @Setter private Version version;
60      @Getter @Setter private boolean limitedMetadata;
61  
62      @XmlJavaTypeAdapter(StringMapAdapter.class)
63      @XmlElement(name = "extraMetadata", type = StringMap.class)
64      @Getter @Setter private Map<String, List<String>> extraMetadata;
65  
66  }