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.ebxml;
17  
18  import java.util.List;
19  
20  /**
21   * Provides functionality for containers of various ebXML objects.
22   * @author Jens Riemschneider
23   */
24  public interface EbXMLObjectContainer {
25      /**
26       * Adds the given extrinsic object to this container.
27       * @param extrinsic
28       *          the object to add. If <code>null</code> nothing will be added.
29       */
30      void addExtrinsicObject(EbXMLExtrinsicObject extrinsic);
31      
32      /**
33       * Returns the list of extrinsic objects of a given type.
34       * @param objectTypes
35       *          the object types of the extrinsic objects to return.
36       * @return the extrinsic objects.
37       */
38      List<EbXMLExtrinsicObject> getExtrinsicObjects(String... objectTypes);
39      
40      /**
41       * Returns the list of all extrinsic objects.
42       * @return the extrinsic objects of this container.
43       */
44      List<EbXMLExtrinsicObject> getExtrinsicObjects();
45  
46      /**
47       * Adds a registry package to this container. 
48       * @param regPackage
49       *          the registry package to add.
50       */
51      void addRegistryPackage(EbXMLRegistryPackage regPackage);
52      
53      /**
54       * Returns the list of registry packages matching the classification node.
55       * @param classificationNode
56       *          the classification node.
57       * @return the list of packages that match the node.
58       */
59      List<EbXMLRegistryPackage> getRegistryPackages(String classificationNode);
60      
61      /**
62       * Returns all registry packages of this container.
63       * @return the list of packages.
64       */
65      List<EbXMLRegistryPackage> getRegistryPackages();
66  
67      /**
68       * Adds an association to this container.
69       * @param association
70       *          the association to add.
71       */
72      void addAssociation(EbXMLAssociation association);
73      
74      /**
75       * Returns all associations of this container.
76       * @return the associations.
77       */
78      List<EbXMLAssociation> getAssociations();
79  
80      /**
81       * Adds a classification to this container.
82       * @param classification
83       *          the classification to add.
84       */
85      void addClassification(EbXMLClassification classification);
86      
87      /**
88       * @return all classifications contained in this entry.
89       */
90      List<EbXMLClassification> getClassifications();
91  
92      /**
93       * @return the object library used by this container.
94       */
95      EbXMLObjectLibrary getObjectLibrary();
96  }