001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005 006package dev.metaschema.core.model; 007 008import java.util.List; 009import java.util.Map; 010 011import edu.umd.cs.findbugs.annotations.NonNull; 012import edu.umd.cs.findbugs.annotations.Nullable; 013 014/** 015 * Represents a model container for assembly definitions. 016 * <p> 017 * Assembly containers extend absolute containers by adding support for choice 018 * instances and choice group instances, which allow for alternative content 019 * models within the assembly. 020 */ 021public interface IContainerModelAssembly extends IContainerModelAbsolute { 022 023 /** 024 * Get all choice instances within the container. 025 * 026 * @return a list of choice instances 027 */ 028 @NonNull 029 List<? extends IChoiceInstance> getChoiceInstances(); 030 031 /** 032 * Get the choice group model instance contained within the model with the 033 * associated group as name. 034 * 035 * @param name 036 * the group as name of the choice group instance 037 * @return the matching choice group instance, or {@code null} if no match was 038 * found 039 * @see IChoiceGroupInstance#getGroupAsName() 040 */ 041 @Nullable 042 IChoiceGroupInstance getChoiceGroupInstanceByName(String name); 043 044 /** 045 * Get all choice group instances within the container. 046 * 047 * @return a list of choice instances 048 */ 049 @NonNull 050 Map<String, ? extends IChoiceGroupInstance> getChoiceGroupInstances(); 051}