Interface IBoundInstanceModel<ITEM>

Type Parameters:
ITEM - the Java type for associated bound objects
All Superinterfaces:
IBoundInstance<ITEM>, IBoundModelElement, IBoundModelObject<ITEM>, IBoundProperty<ITEM>, dev.metaschema.core.model.IDefaultable, IFeatureJavaField, dev.metaschema.core.model.IGroupable, dev.metaschema.core.model.IInstance, dev.metaschema.core.model.IInstanceAbsolute, IItemValueHandler<ITEM>, 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
All Known Subinterfaces:
IBoundInstanceModelAssembly, IBoundInstanceModelChoiceGroup, IBoundInstanceModelField<ITEM>, IBoundInstanceModelFieldComplex, IBoundInstanceModelFieldScalar, IBoundInstanceModelNamed<ITEM>

public interface IBoundInstanceModel<ITEM> extends IBoundInstance<ITEM>, dev.metaschema.core.model.IModelInstanceAbsolute
Represents an assembly or field instance bound to Java data.
  • Field Summary

    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 void
    deepCopy(dev.metaschema.core.model.IBoundObject fromInstance, dev.metaschema.core.model.IBoundObject toInstance)
    Copy this instance from one parent object to another.
    Get the Java binding information for the collection type supported by this instance.
     
    Get the JSON key flag for the provided item.
    static Class<?>
    Get the collection Java item type for the Java field associated with this instance.
    static <TYPE> Class<? extends TYPE>
    getItemType(Field field, Class<TYPE> expectedItemType)
    Get the collection Java item type for the Java field associated with this instance.
    default Collection<? extends Object>
    Get the item values associated with the provided value.
    default Object
     

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

    getContainingModule, getValue, setValue

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

    canHandleXmlQName

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

    getDefaultValue, getEffectiveDefaultValue

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

    getField, getItemType, getType

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

    getEffectiveXmlGroupAsQName, getGroupAsName, getJsonGroupAsBehavior, getMaxOccurs, getMinOccurs, getXmlGroupAsBehavior

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

    toCoordinates

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

    deepCopyItem, readItem, writeItem

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

    getJsonName

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

    getModelType, getRemarks

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

    accept

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

    getParentContainer, isEffectiveValueWrappedInXml
  • Method Details

    • getItemType

      @NonNull static Class<?> getItemType(@NonNull Field field)
      Get the collection Java item type for the Java field associated with this instance.
      Parameters:
      field - the Java field for the instance
      Returns:
      the Java item type
    • getItemType

      @NonNull static <TYPE> Class<? extends TYPE> getItemType(@NonNull Field field, @NonNull Class<TYPE> expectedItemType)
      Get the collection Java item type for the Java field associated with this instance.
      Type Parameters:
      TYPE - the item's expected Java type
      Parameters:
      field - the Java field for the instance
      expectedItemType - the item's expected Java type, which may be a super type of the item's type
      Returns:
      the Java item type
    • getContainingDefinition

      Specified by:
      getContainingDefinition in interface IBoundInstance<ITEM>
      Specified by:
      getContainingDefinition in interface dev.metaschema.core.model.IInstance
      Specified by:
      getContainingDefinition in interface dev.metaschema.core.model.IModelInstance
    • getResolvedDefaultValue

      Specified by:
      getResolvedDefaultValue in interface dev.metaschema.core.model.IDefaultable
    • getItemValues

      @NonNull default Collection<? extends Object> getItemValues(Object value)
      Get the item values associated with the provided value.
      Specified by:
      getItemValues in interface dev.metaschema.core.model.IGroupable
      Parameters:
      value - the value which may be a singleton or a collection
      Returns:
      the ordered collection of values
    • getCollectionInfo

      Get the Java binding information for the collection type supported by this instance.
      Returns:
      the collection Java binding information
    • getItemJsonKey

      @Nullable IBoundInstanceFlag getItemJsonKey(@NonNull Object item)
      Get the JSON key flag for the provided item.
      Parameters:
      item - the item to get the JSON key flag for
      Returns:
      the JSON key flag
    • 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<ITEM>
      Parameters:
      fromInstance - the object to copy from
      toInstance - the object to copy to
      Throws:
      BindingException - if an error occurred while processing the object bindings