1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package gov.nist.secauto.metaschema.databind.model.metaschema.impl;
7   
8   import gov.nist.secauto.metaschema.core.model.IAssemblyInstanceAbsolute;
9   import gov.nist.secauto.metaschema.core.model.IContainerModelAbsolute;
10  import gov.nist.secauto.metaschema.core.model.IContainerModelSupport;
11  import gov.nist.secauto.metaschema.core.model.IFeatureContainerModel;
12  import gov.nist.secauto.metaschema.core.model.IFieldInstanceAbsolute;
13  import gov.nist.secauto.metaschema.core.model.IModelInstanceAbsolute;
14  import gov.nist.secauto.metaschema.core.model.INamedModelInstanceAbsolute;
15  
16  import java.util.Collection;
17  
18  import javax.xml.namespace.QName;
19  
20  import edu.umd.cs.findbugs.annotations.NonNull;
21  
22  public interface IFeatureBindingContainerModel
23      extends IContainerModelAbsolute, IFeatureContainerModel<
24          IModelInstanceAbsolute,
25          INamedModelInstanceAbsolute,
26          IFieldInstanceAbsolute,
27          IAssemblyInstanceAbsolute> {
28    @Override
29    @NonNull
30    IContainerModelSupport<
31        IModelInstanceAbsolute,
32        INamedModelInstanceAbsolute,
33        IFieldInstanceAbsolute,
34        IAssemblyInstanceAbsolute> getModelContainer();
35  
36    @Override
37    default Collection<IModelInstanceAbsolute> getModelInstances() {
38      return getModelContainer().getModelInstances();
39    }
40  
41    @Override
42    default INamedModelInstanceAbsolute getNamedModelInstanceByName(QName name) {
43      return getModelContainer().getNamedModelInstanceMap().get(name);
44    }
45  
46    @SuppressWarnings("null")
47    @Override
48    default Collection<INamedModelInstanceAbsolute> getNamedModelInstances() {
49      return getModelContainer().getNamedModelInstanceMap().values();
50    }
51  
52    @Override
53    default IFieldInstanceAbsolute getFieldInstanceByName(QName name) {
54      return getModelContainer().getFieldInstanceMap().get(name);
55    }
56  
57    @SuppressWarnings("null")
58    @Override
59    default Collection<IFieldInstanceAbsolute> getFieldInstances() {
60      return getModelContainer().getFieldInstanceMap().values();
61    }
62  
63    @Override
64    default IAssemblyInstanceAbsolute getAssemblyInstanceByName(QName name) {
65      return getModelContainer().getAssemblyInstanceMap().get(name);
66    }
67  
68    @SuppressWarnings("null")
69    @Override
70    default Collection<IAssemblyInstanceAbsolute> getAssemblyInstances() {
71      return getModelContainer().getAssemblyInstanceMap().values();
72    }
73  }