1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package gov.nist.secauto.metaschema.schemagen;
7   
8   import gov.nist.secauto.metaschema.core.model.IChoiceInstance;
9   import gov.nist.secauto.metaschema.core.model.IDefinition;
10  
11  public class ChoiceNotInlineStrategy implements IInlineStrategy {
12    @Override
13    public boolean isInline(
14        IDefinition definition,
15        ModuleIndex metaschemaIndex) {
16      // allow inline if the definition is inline and not part of definition with a
17      // choice
18      return definition.isInline() && !(definition.getInlineInstance().getParentContainer() instanceof IChoiceInstance);
19    }
20  }