Interface IBoundInstanceModelChoiceGroup

All Superinterfaces:
IBoundInstance<dev.metaschema.core.model.IBoundObject>, IBoundInstanceModel<dev.metaschema.core.model.IBoundObject>, IBoundModelElement, IBoundModelObject<dev.metaschema.core.model.IBoundObject>, IBoundProperty<dev.metaschema.core.model.IBoundObject>, dev.metaschema.core.model.IChoiceGroupInstance, dev.metaschema.core.model.IContainer, dev.metaschema.core.model.IContainerModel, dev.metaschema.core.model.IContainerModelGrouped, dev.metaschema.core.model.IDefaultable, dev.metaschema.core.model.IFeatureContainerModelGrouped<IBoundInstanceModelGroupedNamed,IBoundInstanceModelGroupedField,IBoundInstanceModelGroupedAssembly>, IFeatureJavaField, dev.metaschema.core.model.IGroupable, dev.metaschema.core.model.IInstance, dev.metaschema.core.model.IInstanceAbsolute, IItemValueHandler<dev.metaschema.core.model.IBoundObject>, dev.metaschema.core.model.IJsonInstance, dev.metaschema.core.model.IJsonNamed, dev.metaschema.core.model.IModelElement, dev.metaschema.core.model.IModelElementVisitable, dev.metaschema.core.model.IModelInstance, dev.metaschema.core.model.IModelInstanceAbsolute, dev.metaschema.core.model.IValued, IValuedMutable

public interface IBoundInstanceModelChoiceGroup extends IBoundInstanceModel<dev.metaschema.core.model.IBoundObject>, dev.metaschema.core.model.IFeatureContainerModelGrouped<IBoundInstanceModelGroupedNamed,IBoundInstanceModelGroupedField,IBoundInstanceModelGroupedAssembly>, dev.metaschema.core.model.IChoiceGroupInstance
Represents a choice group instance bound to Java field.
  • Field Summary

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

    DEFAULT_CHOICE_GROUP_GROUP_AS_MAX_OCCURS, DEFAULT_JSON_DISCRIMINATOR_PROPERTY_NAME

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

    DEFAULT_GROUP_AS_MAX_OCCURS, DEFAULT_GROUP_AS_MIN_OCCURS, DEFAULT_JSON_GROUP_AS_BEHAVIOR, DEFAULT_XML_GROUP_AS_BEHAVIOR
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    canHandleXmlQName(dev.metaschema.core.qname.IEnhancedQName qname)
    Determine if the provided XML qualified name is associated with this property.
    default dev.metaschema.core.model.IBoundObject
    deepCopyItem(dev.metaschema.core.model.IBoundObject item, dev.metaschema.core.model.IBoundObject parentInstance)
    Create and return a deep copy of the provided item.
     
    getGroupedModelInstance(dev.metaschema.core.qname.IEnhancedQName name)
    Get the bound grouped model instance associated with the provided XML qualified name.
    Get the bound grouped model instance associated with the provided Java class.
    Get the bound grouped model instance associated with the provided JSON discriminator value.
    Get the bound grouped model instance associated with the provided item.
    default String
     
     
    newInstance(Field field, IBoundDefinitionModelAssembly containingDefinition)
    Create a new bound choice group instance.
    default dev.metaschema.core.model.IBoundObject
    readItem(dev.metaschema.core.model.IBoundObject parent, IItemReadHandler handler)
    Parse and return an item.
    default void
    writeItem(dev.metaschema.core.model.IBoundObject item, IItemWriteHandler handler)
    Write the provided item.

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

    getContainingModule, getValue, setValue

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

    deepCopy, getCollectionInfo, getItemJsonKey, getItemValues, getResolvedDefaultValue

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

    accept, getJsonDiscriminatorProperty, getJsonKeyFlagInstanceName, getMaxOccurs, getModelType, getRemarks, isEffectiveValueWrappedInXml, toCoordinates

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

    getDefaultValue, getEffectiveDefaultValue

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

    getAssemblyInstanceByName, getAssemblyInstances, getFieldInstanceByName, getFieldInstances, getModelContainer, getModelInstances, getNamedModelInstanceByName, getNamedModelInstances, hasChildren

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

    getField, getItemType, getType

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

    getEffectiveXmlGroupAsQName, getGroupAsName, getJsonGroupAsBehavior, getMinOccurs, getXmlGroupAsBehavior

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

    getParentContainer
  • Method Details

    • newInstance

      @NonNull static IBoundInstanceModelChoiceGroup newInstance(@NonNull Field field, @NonNull IBoundDefinitionModelAssembly containingDefinition)
      Create a new bound choice group instance.
      Parameters:
      field - the Java field the instance is bound to
      containingDefinition - the definition containing the instance
      Returns:
      the new instance
    • getJsonName

      default String getJsonName()
      Specified by:
      getJsonName in interface dev.metaschema.core.model.IChoiceGroupInstance
      Specified by:
      getJsonName in interface dev.metaschema.core.model.IJsonInstance
      Specified by:
      getJsonName in interface dev.metaschema.core.model.IJsonNamed
    • getOwningDefinition

      Specified by:
      getOwningDefinition in interface dev.metaschema.core.model.IContainerModel
      Specified by:
      getOwningDefinition in interface dev.metaschema.core.model.IContainerModelGrouped
    • getContainingDefinition

      Specified by:
      getContainingDefinition in interface IBoundInstance<dev.metaschema.core.model.IBoundObject>
      Specified by:
      getContainingDefinition in interface IBoundInstanceModel<dev.metaschema.core.model.IBoundObject>
      Specified by:
      getContainingDefinition in interface dev.metaschema.core.model.IInstance
      Specified by:
      getContainingDefinition in interface dev.metaschema.core.model.IModelInstance
    • getGroupedModelInstance

      Get the bound grouped model instance associated with the provided Java class.
      Parameters:
      clazz - the Java class which should be bound to a grouped model instance
      Returns:
      the grouped model instance or {code null} if no instance was bound to the requested class
    • getGroupedModelInstance

      @Nullable IBoundInstanceModelGroupedNamed getGroupedModelInstance(@NonNull dev.metaschema.core.qname.IEnhancedQName name)
      Get the bound grouped model instance associated with the provided XML qualified name.
      Parameters:
      name - the XML qualified name which should be bound to a grouped model instance
      Returns:
      the grouped model instance or {code null} if no instance was bound to the requested XML qualified name
    • getGroupedModelInstance

      Get the bound grouped model instance associated with the provided JSON discriminator value.
      Parameters:
      discriminator - the JSON discriminator value which should be bound to a grouped model instance
      Returns:
      the grouped model instance or {code null} if no instance was bound to the requested JSON discriminator value
    • getItemInstance

      Get the bound grouped model instance associated with the provided item.
      Specified by:
      getItemInstance in interface dev.metaschema.core.model.IChoiceGroupInstance
      Parameters:
      item - the item which should be bound to a grouped model instance
      Returns:
      the grouped model instance or {code null} if no instance was bound to the requested item
    • readItem

      default dev.metaschema.core.model.IBoundObject readItem(dev.metaschema.core.model.IBoundObject parent, IItemReadHandler handler) throws IOException
      Description copied from interface: IItemValueHandler
      Parse and return an item.
      Specified by:
      readItem in interface IItemValueHandler<dev.metaschema.core.model.IBoundObject>
      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(dev.metaschema.core.model.IBoundObject item, IItemWriteHandler handler) throws IOException
      Description copied from interface: IItemValueHandler
      Write the provided item.
      Specified by:
      writeItem in interface IItemValueHandler<dev.metaschema.core.model.IBoundObject>
      Parameters:
      item - the data to write
      handler - the item writing handler
      Throws:
      IOException - if an error occurred while writing
    • deepCopyItem

      default dev.metaschema.core.model.IBoundObject deepCopyItem(dev.metaschema.core.model.IBoundObject item, dev.metaschema.core.model.IBoundObject parentInstance) throws BindingException
      Description copied from interface: IItemValueHandler
      Create and return a deep copy of the provided item.
      Specified by:
      deepCopyItem in interface IItemValueHandler<dev.metaschema.core.model.IBoundObject>
      Parameters:
      item - the item to copy
      parentInstance - an optional parent object to use for serialization callbacks
      Returns:
      the new deep copy
      Throws:
      BindingException - if an error occurred while analyzing the bound objects
    • 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<dev.metaschema.core.model.IBoundObject>
      Parameters:
      qname - the XML qualified name of the property being parsed
      Returns:
      true if the instance will handle this name, or false otherwise