Interface IDefaultable

All Known Subinterfaces:
IAssembly, IAssemblyDefinition, IAssemblyInstance, IAssemblyInstanceAbsolute, IAssemblyInstanceGrouped, IBindingDefinitionModel, IBindingDefinitionModelAssembly, IBindingInstance, IBindingInstanceModel, IBindingModelElement, IBoundDefinition, IBoundDefinitionFlag, IBoundDefinitionModel<ITEM>, IBoundDefinitionModelAssembly, IBoundDefinitionModelComplex, IBoundDefinitionModelField<ITEM>, IBoundDefinitionModelFieldComplex, IBoundFieldValue, IBoundInstance<ITEM>, IBoundInstanceFlag, IBoundInstanceModel<ITEM>, IBoundInstanceModelAssembly, IBoundInstanceModelChoiceGroup, IBoundInstanceModelField<ITEM>, IBoundInstanceModelFieldComplex, IBoundInstanceModelFieldScalar, IBoundInstanceModelGroupedAssembly, IBoundInstanceModelGroupedField, IBoundInstanceModelGroupedNamed, IBoundInstanceModelNamed<ITEM>, IBoundModelElement, IBoundProperty<ITEM>, IChoiceGroupInstance, IChoiceInstance, IDefinition, IFeatureContainerFlag<FI>, IFeatureDefinitionInstanceInlined<DEFINITION,INSTANCE>, IFeatureDefinitionReferenceInstance<DEFINITION,INSTANCE>, IFeatureJavaField, IFeatureScalarItemValueHandler, IFeatureValueless, IField, IFieldDefinition, IFieldInstance, IFieldInstanceAbsolute, IFieldInstanceGrouped, IFlag, IFlagDefinition, IFlagInstance, IGroupable, IInstance, IInstanceAbsolute, IModelDefinition, IModelElement, IModelInstance, IModelInstanceAbsolute, INamedInstance, INamedModelElement, INamedModelInstance, INamedModelInstanceAbsolute, INamedModelInstanceGrouped, IValued, IValuedDefinition, IValuedInstance, IValuedMutable
All Known Implementing Classes:
AbstractAssemblyInstance, AbstractChoiceGroupInstance, AbstractChoiceInstance, AbstractFieldInstance, AbstractFlagInstance, AbstractGlobalAssemblyDefinition, AbstractGlobalDefinition, AbstractGlobalFieldDefinition, AbstractGlobalFlagDefinition, AbstractInlineAssemblyDefinition, AbstractInlineFieldDefinition, AbstractInlineFlagDefinition, AbstractInstance, AbstractNamedInstance, AbstractNamedModelInstance

public interface IDefaultable
A marker interface for Metaschema constructs that can have a default value.
  • Method Details

    • getDefaultValue

      @Nullable default Object getDefaultValue()
      Retrieves the default data value for this model construct.

      Child implementations are expected to override this method to provide a more reasonable default value.

      Returns:
      the default value or null if there is no default
    • getEffectiveDefaultValue

      @Nullable default Object getEffectiveDefaultValue()
      Get the effective default value for the model construct.

      This should consider default values in any related referenced definitions or child constructs as needed to determine the default to use.

      Returns:
      the effective default value or null if there is no effective default value
    • getResolvedDefaultValue

      @Nullable default Object getResolvedDefaultValue()
      Get the actual default value to use for the model construct.

      This will consider the effective default value in the use context to determine the appropriate default to use. Factors such as the required instance cardinality may affect if the effective default or an empty collection is used.

      Returns:
      the actual default value or null if there is no actual default value