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.ebxml;
17
18 import org.openehealth.ipf.commons.ihe.xds.core.metadata.LocalizedString;
19 import org.openehealth.ipf.commons.ihe.xds.core.metadata.Version;
20
21 import java.util.List;
22
23 /**
24 * Encapsulation of the ebXML classes for {@code RegistryEntryType} and
25 * {@code RegistryObjectType}.
26 * <p>
27 * This class contains convenience methods and provides a version independent
28 * abstraction of the ebXML data structure.
29 * @author Jens Riemschneider
30 */
31 public interface EbXMLRegistryObject extends EbXMLSlotList {
32 /**
33 * @return all classifications contained in this entry.
34 */
35 List<EbXMLClassification> getClassifications();
36
37 /**
38 * Returns the classification matching the given scheme.
39 * @param scheme
40 * the scheme.
41 * @return the classifications contained in this entry that match the scheme.
42 */
43 List<EbXMLClassification> getClassifications(String scheme);
44
45 /**
46 * Returns the first classification matching the given scheme.
47 * @param scheme
48 * the scheme.
49 * @return the classification matching the scheme. Only the first classification
50 * is considered, other classifications are ignored.
51 */
52 EbXMLClassification getSingleClassification(String scheme);
53
54 /**
55 * Adds a classification to this entry with a random id.
56 * @param classification
57 * the classification to add.
58 * @param scheme
59 * the scheme of the classification.
60 */
61 void addClassification(EbXMLClassification classification, String scheme);
62
63 /**
64 * @return all external identifiers contained in this entry.
65 */
66 List<EbXMLExternalIdentifier> getExternalIdentifiers();
67
68 /**
69 * Returns the value of the external identifier matching the given scheme.
70 * @param scheme
71 * the scheme of the external identifier.
72 * @return the value of the external identifier that matched the scheme. <code>null</code>
73 * if no identifier was found that matched the scheme.
74 */
75 String getExternalIdentifierValue(String scheme);
76
77 /**
78 * Adds a new external identifier to this entry.
79 * @param value
80 * the value of the identifier.
81 * @param scheme
82 * the scheme of the identifier.
83 * @param name
84 * the name of the identifier.
85 */
86 void addExternalIdentifier(String value, String scheme, String name);
87
88 /**
89 * @return the object type of this entry.
90 */
91 String getObjectType();
92
93 /**
94 * @param objectType
95 * the object type of this entry.
96 */
97 void setObjectType(String objectType);
98
99 /**
100 * @return the description of this entry.
101 */
102 LocalizedString getDescription();
103
104 /**
105 * @param description
106 * the description of this entry.
107 */
108 void setDescription(LocalizedString description);
109
110 /**
111 * @return the name of this entry.
112 */
113 LocalizedString getName();
114
115 /**
116 * @param name
117 * the name of this entry.
118 */
119 void setName(LocalizedString name);
120
121 /**
122 * @return the home attribute of this entry.
123 */
124 String getHome();
125
126 /**
127 * @param home
128 * the home attribute of this entry.
129 */
130 void setHome(String home);
131
132 /**
133 * @return the id of this entry.
134 */
135 String getId();
136
137 /**
138 * @param id the id of this entry.
139 */
140 void setId(String id);
141
142 /**
143 * @return the lid of this entry.
144 */
145 String getLid();
146
147 /**
148 * @param lid the lid of this entry.
149 */
150 void setLid(String lid);
151
152 /**
153 * @return the id of this entry.
154 */
155 Version getVersionInfo();
156
157 /**
158 * @param version the versionInfo of this entry.
159 */
160 void setVersionInfo(Version version);
161
162 /**
163 * @return the ebXML object being wrapped by this entry.
164 */
165 Object getInternal();
166 }