001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005 006package gov.nist.secauto.metaschema.schemagen; 007 008import gov.nist.secauto.metaschema.core.model.IChoiceInstance; 009import gov.nist.secauto.metaschema.core.model.IDefinition; 010 011public class ChoiceNotInlineStrategy implements IInlineStrategy { 012 @Override 013 public boolean isInline( 014 IDefinition definition, 015 ModuleIndex metaschemaIndex) { 016 // allow inline if the definition is inline and not part of definition with a 017 // choice 018 return definition.isInline() && !(definition.getInlineInstance().getParentContainer() instanceof IChoiceInstance); 019 } 020}