Interface IBoundInstanceFlag

All Superinterfaces:
dev.metaschema.core.model.IAttributable, IBoundDefinition, IBoundDefinitionFlag, IBoundInstance<Object>, IBoundModelElement, IBoundModelObject<Object>, IBoundProperty<Object>, dev.metaschema.core.model.IDefaultable, dev.metaschema.core.model.IDefinition, dev.metaschema.core.model.IDescribable, dev.metaschema.core.model.IFeatureDefinitionInstanceInlined<IBoundDefinitionFlag,IBoundInstanceFlag>, IFeatureJavaField, IFeatureScalarItemValueHandler, dev.metaschema.core.model.constraint.IFeatureValueConstrained, dev.metaschema.core.model.IFlag, dev.metaschema.core.model.IFlagDefinition, dev.metaschema.core.model.IFlagInstance, dev.metaschema.core.model.IInstance, dev.metaschema.core.model.IInstanceAbsolute, IItemValueHandler<Object>, dev.metaschema.core.model.IJsonNamed, dev.metaschema.core.model.IModelElement, dev.metaschema.core.model.IModelElementVisitable, dev.metaschema.core.model.INamed, dev.metaschema.core.model.INamedInstance, dev.metaschema.core.model.INamedModelElement, dev.metaschema.core.model.constraint.IValueConstrained, dev.metaschema.core.model.IValued, dev.metaschema.core.model.IValuedDefinition, dev.metaschema.core.model.IValuedInstance, IValuedMutable

public interface IBoundInstanceFlag extends dev.metaschema.core.model.IFlagInstance, IBoundDefinitionFlag, IFeatureScalarItemValueHandler, IBoundInstance<Object>, dev.metaschema.core.model.IFeatureDefinitionInstanceInlined<IBoundDefinitionFlag,IBoundInstanceFlag>
Represents a flag instance bound to Java data.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface dev.metaschema.core.model.IAttributable

    dev.metaschema.core.model.IAttributable.Key

    Nested classes/interfaces inherited from interface dev.metaschema.core.model.IDefinition

    dev.metaschema.core.model.IDefinition.ModuleScope
  • Field Summary

    Fields inherited from interface dev.metaschema.core.model.IAttributable

    DEFAULT_PROPERY_NAMESPACE

    Fields inherited from interface dev.metaschema.core.model.IDefinition

    DEFAULT_MODULE_SCOPE

    Fields inherited from interface dev.metaschema.core.model.IFlagInstance

    DEFAULT_FLAG_REQUIRED
  • Method Summary

    Modifier and Type
    Method
    Description
    default <CONTEXT, RESULT>
    RESULT
    accept(dev.metaschema.core.model.IModelElementVisitor<CONTEXT,RESULT> visitor, CONTEXT context)
     
    default boolean
    canHandleXmlQName(dev.metaschema.core.qname.IEnhancedQName qname)
    Determine if the provided XML qualified name is associated with this property.
    default void
    deepCopy(dev.metaschema.core.model.IBoundObject fromInstance, dev.metaschema.core.model.IBoundObject toInstance)
    Copy this instance from one parent object to another.
    IBoundDefinitionModel<dev.metaschema.core.model.IBoundObject>
     
     
    default IBoundDefinitionModel<dev.metaschema.core.model.IBoundObject>
     
    boolean
    Determines if this flag's value is used as the property name for the JSON object that holds the remaining data based on this flag's containing definition.
    boolean
    Determines if this flag is used as a JSON "value key".
    newInstance(Field field, IBoundDefinitionModel<dev.metaschema.core.model.IBoundObject> containingDefinition)
    Create a new bound flag instance.
    default Object
    readItem(dev.metaschema.core.model.IBoundObject parent, IItemReadHandler handler)
    Parse and return an item.
    default void
    Write the provided item.

    Methods inherited from interface dev.metaschema.core.model.IAttributable

    getProperties, getPropertyValues, hasProperty, hasPropertyValue

    Methods inherited from interface dev.metaschema.databind.model.IBoundInstance

    getContainingModule, getValue, setValue

    Methods inherited from interface dev.metaschema.core.model.IDefaultable

    getDefaultValue, getResolvedDefaultValue

    Methods inherited from interface dev.metaschema.core.model.IDefinition

    getLocation, getModuleScope

    Methods inherited from interface dev.metaschema.core.model.IDescribable

    getDescription, getFormalName

    Methods inherited from interface dev.metaschema.core.model.IFeatureDefinitionInstanceInlined

    getDefinitionQName, getEffectiveDefaultValue, getEffectiveDescription, getEffectiveFormalName, getEffectiveIndex, getEffectiveName, getSource, isInline, isInlineDefinition, toCoordinates

    Methods inherited from interface dev.metaschema.databind.model.IFeatureJavaField

    getField, getItemType, getType

    Methods inherited from interface dev.metaschema.databind.model.info.IFeatureScalarItemValueHandler

    deepCopyItem, getJavaTypeAdapter, getValueFromString, setValue

    Methods inherited from interface dev.metaschema.core.model.constraint.IFeatureValueConstrained

    addConstraint, addConstraint, addConstraint, addConstraint, addConstraint, addLetExpression, getAllowedValuesConstraints, getConstraints, getConstraintSupport, getExpectConstraints, getIndexHasKeyConstraints, getLetExpressions, getMatchesConstraints, getReportConstraints

    Methods inherited from interface dev.metaschema.core.model.IFlag

    getModelType

    Methods inherited from interface dev.metaschema.core.model.IFlagInstance

    isRequired

    Methods inherited from interface dev.metaschema.core.model.IInstance

    toCoordinates

    Methods inherited from interface dev.metaschema.core.model.IModelElement

    getRemarks

    Methods inherited from interface dev.metaschema.core.model.INamed

    getIndex, getName, getQName, getUseIndex, getUseName

    Methods inherited from interface dev.metaschema.core.model.INamedInstance

    getReferencedDefinitionQName

    Methods inherited from interface dev.metaschema.core.model.INamedModelElement

    getJsonName

    Methods inherited from interface dev.metaschema.core.model.IValuedDefinition

    getJavaTypeAdapter
  • Method Details

    • newInstance

      @NonNull static IBoundInstanceFlag newInstance(@NonNull Field field, @NonNull IBoundDefinitionModel<dev.metaschema.core.model.IBoundObject> containingDefinition)
      Create a new bound flag instance.
      Parameters:
      field - the Java field the instance is bound to
      containingDefinition - the definition containing the instance
      Returns:
      the new instance
    • isJsonKey

      boolean isJsonKey()
      Determines if this flag's value is used as the property name for the JSON object that holds the remaining data based on this flag's containing definition.
      Returns:
      true if this flag is used as a JSON key, or false otherwise
    • isJsonValueKey

      boolean isJsonValueKey()
      Determines if this flag is used as a JSON "value key". A "value key" is a flag who's value is used as the property name for the containing objects value.
      Returns:
      true if the flag is used as a JSON "value key", or false otherwise
    • getContainingDefinition

      @NonNull IBoundDefinitionModel<dev.metaschema.core.model.IBoundObject> getContainingDefinition()
      Specified by:
      getContainingDefinition in interface IBoundInstance<Object>
      Specified by:
      getContainingDefinition in interface dev.metaschema.core.model.IFlagInstance
      Specified by:
      getContainingDefinition in interface dev.metaschema.core.model.IInstance
    • getParentContainer

      @NonNull default IBoundDefinitionModel<dev.metaschema.core.model.IBoundObject> getParentContainer()
      Specified by:
      getParentContainer in interface dev.metaschema.core.model.IFlagInstance
      Specified by:
      getParentContainer in interface dev.metaschema.core.model.IInstance
    • getDefinition

      For an inline instance, this instance is the definition.

      Specified by:
      getDefinition in interface dev.metaschema.core.model.IFeatureDefinitionInstanceInlined<IBoundDefinitionFlag,IBoundInstanceFlag>
      Specified by:
      getDefinition in interface dev.metaschema.core.model.IFlagInstance
      Specified by:
      getDefinition in interface dev.metaschema.core.model.INamedInstance
      Specified by:
      getDefinition in interface dev.metaschema.core.model.IValuedInstance
    • getInlineInstance

      Specified by:
      getInlineInstance in interface dev.metaschema.core.model.IDefinition
      Specified by:
      getInlineInstance in interface dev.metaschema.core.model.IFeatureDefinitionInstanceInlined<IBoundDefinitionFlag,IBoundInstanceFlag>
      Specified by:
      getInlineInstance in interface dev.metaschema.core.model.IFlagDefinition
    • deepCopy

      default void deepCopy(@NonNull dev.metaschema.core.model.IBoundObject fromInstance, @NonNull dev.metaschema.core.model.IBoundObject toInstance) throws BindingException
      Description copied from interface: IBoundProperty
      Copy this instance from one parent object to another.
      Specified by:
      deepCopy in interface IBoundProperty<Object>
      Parameters:
      fromInstance - the object to copy from
      toInstance - the object to copy to
      Throws:
      BindingException - if an error occurred while processing the object bindings
    • readItem

      @NonNull default Object readItem(dev.metaschema.core.model.IBoundObject parent, @NonNull IItemReadHandler handler) throws IOException
      Description copied from interface: IItemValueHandler
      Parse and return an item.
      Specified by:
      readItem in interface IItemValueHandler<Object>
      Parameters:
      parent - the parent Java object to use for serialization callbacks, or null if there is no parent
      handler - the item parsing handler
      Returns:
      the Java object representing the parsed item
      Throws:
      IOException - if an error occurred while parsing
    • writeItem

      default void writeItem(Object item, IItemWriteHandler handler) throws IOException
      Description copied from interface: IItemValueHandler
      Write the provided item.
      Specified by:
      writeItem in interface IItemValueHandler<Object>
      Parameters:
      item - the data to write
      handler - the item writing handler
      Throws:
      IOException - if an error occurred while writing
    • canHandleXmlQName

      default boolean canHandleXmlQName(@NonNull dev.metaschema.core.qname.IEnhancedQName qname)
      Description copied from interface: IBoundModelObject
      Determine if the provided XML qualified name is associated with this property.
      Specified by:
      canHandleXmlQName in interface IBoundModelObject<Object>
      Parameters:
      qname - the XML qualified name of the property being parsed
      Returns:
      true if the instance will handle this name, or false otherwise
    • accept

      default <CONTEXT, RESULT> RESULT accept(dev.metaschema.core.model.IModelElementVisitor<CONTEXT,RESULT> visitor, CONTEXT context)
      Specified by:
      accept in interface dev.metaschema.core.model.IFlagDefinition
      Specified by:
      accept in interface dev.metaschema.core.model.IFlagInstance
      Specified by:
      accept in interface dev.metaschema.core.model.IModelElementVisitable