diff --git a/core/src/main/java/gov/nist/secauto/metaschema/core/model/AbstractInlineAssemblyDefinition.java b/core/src/main/java/gov/nist/secauto/metaschema/core/model/AbstractInlineAssemblyDefinition.java index c1b78f58e..76b737335 100644 --- a/core/src/main/java/gov/nist/secauto/metaschema/core/model/AbstractInlineAssemblyDefinition.java +++ b/core/src/main/java/gov/nist/secauto/metaschema/core/model/AbstractInlineAssemblyDefinition.java @@ -69,7 +69,7 @@ public final INSTANCE getInlineInstance() { } @Override - public final IFlagInstance getJsonKey() { + public final FLAG getJsonKey() { return IFeatureContainerFlag.super.getJsonKey(); } } diff --git a/core/src/main/java/gov/nist/secauto/metaschema/core/model/AbstractInlineFieldDefinition.java b/core/src/main/java/gov/nist/secauto/metaschema/core/model/AbstractInlineFieldDefinition.java index 375c4b745..17ea2e6ea 100644 --- a/core/src/main/java/gov/nist/secauto/metaschema/core/model/AbstractInlineFieldDefinition.java +++ b/core/src/main/java/gov/nist/secauto/metaschema/core/model/AbstractInlineFieldDefinition.java @@ -57,7 +57,7 @@ public final INSTANCE getInlineInstance() { } @Override - public final IFlagInstance getJsonKey() { + public final FLAG getJsonKey() { return IFeatureContainerFlag.super.getJsonKey(); } } diff --git a/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFeatureContainerFlag.java b/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFeatureContainerFlag.java index f4f6c56c4..51ac31b1a 100644 --- a/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFeatureContainerFlag.java +++ b/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFeatureContainerFlag.java @@ -63,7 +63,7 @@ default Collection getFlagInstances() { } @Override - default IFlagInstance getJsonKey() { + default FI getJsonKey() { return getFlagContainer().getJsonKeyFlagInstance(); } } diff --git a/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFeatureDefinitionInstanceInlined.java b/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFeatureDefinitionInstanceInlined.java index 5fdee30cb..11b3f48ea 100644 --- a/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFeatureDefinitionInstanceInlined.java +++ b/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFeatureDefinitionInstanceInlined.java @@ -27,6 +27,7 @@ package gov.nist.secauto.metaschema.core.model; import gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine; +import gov.nist.secauto.metaschema.core.util.ObjectUtils; import java.util.Locale; @@ -60,11 +61,15 @@ default QName getDefinitionQName() { } @Override - DEFINITION getDefinition(); + default DEFINITION getDefinition() { + return ObjectUtils.asType(this); + } @Override @NonNull - INSTANCE getInlineInstance(); + default INSTANCE getInlineInstance() { + return ObjectUtils.asType(this); + } @Override default String getEffectiveFormalName() { diff --git a/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFlagDefinition.java b/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFlagDefinition.java index 7aa06994e..727a7fd69 100644 --- a/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFlagDefinition.java +++ b/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFlagDefinition.java @@ -28,8 +28,5 @@ public interface IFlagDefinition extends IValuedDefinition, IFlag { @Override - default IFlagInstance getInlineInstance() { - // not inline by default - return null; - } + IFlagInstance getInlineInstance(); } diff --git a/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFlagInstance.java b/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFlagInstance.java index 9c8e5f520..3b6038ea9 100644 --- a/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFlagInstance.java +++ b/core/src/main/java/gov/nist/secauto/metaschema/core/model/IFlagInstance.java @@ -38,6 +38,11 @@ public interface IFlagInstance extends IFlag, IValuedInstance, IInstanceAbsolute @Override IFlagDefinition getDefinition(); + @Override + default IModelDefinition getContainingDefinition() { + return getParentContainer(); + } + /** * Determines if a flag value is required to be provided. * diff --git a/core/src/main/java/gov/nist/secauto/metaschema/core/model/xml/impl/XmlInlineFlagDefinition.java b/core/src/main/java/gov/nist/secauto/metaschema/core/model/xml/impl/XmlInlineFlagDefinition.java index dec321ec4..12a99b3de 100644 --- a/core/src/main/java/gov/nist/secauto/metaschema/core/model/xml/impl/XmlInlineFlagDefinition.java +++ b/core/src/main/java/gov/nist/secauto/metaschema/core/model/xml/impl/XmlInlineFlagDefinition.java @@ -51,6 +51,7 @@ class XmlInlineFlagDefinition extends AbstractInlineFlagDefinition { + @NonNull private final InlineFlagDefinitionType xmlFlag; @Nullable