1 /* 2 * SPDX-FileCopyrightText: none 3 * SPDX-License-Identifier: CC0-1.0 4 */ 5 6 package gov.nist.secauto.metaschema.core.model; 7 8 import java.util.Collection; 9 10 import edu.umd.cs.findbugs.annotations.NonNull; 11 import edu.umd.cs.findbugs.annotations.Nullable; 12 13 public interface IContainerModelGrouped extends IContainerModel { 14 15 @Override 16 IAssemblyDefinition getOwningDefinition(); 17 18 @Override 19 @NonNull 20 default Collection<? extends INamedModelInstanceGrouped> getModelInstances() { 21 return getNamedModelInstances(); 22 } 23 24 /** 25 * Get all named model instances within the container. 26 * 27 * @return an ordered mapping of use name to model instance 28 */ 29 @Override 30 @NonNull 31 Collection<? extends INamedModelInstanceGrouped> getNamedModelInstances(); 32 33 /** 34 * Get the model instance contained within the model with the associated use 35 * name. 36 * 37 * @param name 38 * the effective name of the model instance 39 * @return the matching model instance, or {@code null} if no match was found 40 * @see INamedModelInstance#getEffectiveName() 41 */ 42 @Override 43 @Nullable 44 INamedModelInstanceGrouped getNamedModelInstanceByName(Integer name); 45 46 /** 47 * Get all field instances within the container. 48 * 49 * @return a mapping of use name to field instance 50 */ 51 @Override 52 @NonNull 53 Collection<? extends IFieldInstanceGrouped> getFieldInstances(); 54 55 /** 56 * Get the field instance contained within the model with the associated use 57 * name. 58 * 59 * @param name 60 * the use name of the field instance 61 * @return the matching field instance, or {@code null} if no match was found 62 * @see IFieldInstance#getUseName() 63 */ 64 @Override 65 @Nullable 66 IFieldInstanceGrouped getFieldInstanceByName(Integer name); 67 68 /** 69 * Get all assembly instances within the container. 70 * 71 * @return a mapping of use name to assembly instance 72 */ 73 @Override 74 @NonNull 75 Collection<? extends IAssemblyInstanceGrouped> getAssemblyInstances(); 76 77 /** 78 * Get the assembly instance contained within the model with the associated use 79 * name. 80 * 81 * @param name 82 * the effective name of the assembly instance 83 * @return the matching assembly instance, or {@code null} if no match was found 84 * @see INamedModelInstance#getEffectiveName() 85 */ 86 @Override 87 @Nullable 88 IAssemblyInstanceGrouped getAssemblyInstanceByName(Integer name); 89 }