Interface IBoundInstanceModel<ITEM>
- Type Parameters:
ITEM- the Java type for associated bound objects
- All Superinterfaces:
IBoundInstance<ITEM>,IBoundModelElement,IBoundModelObject<ITEM>,IBoundProperty<ITEM>,IDefaultable,IFeatureJavaField,IGroupable,IInstance,IInstanceAbsolute,IItemValueHandler<ITEM>,IJsonNamed,IModelElement,IModelElementVisitable,IModelInstance,IModelInstanceAbsolute,IValued,IValuedMutable
- All Known Subinterfaces:
IBoundInstanceModelAssembly,IBoundInstanceModelChoiceGroup,IBoundInstanceModelField<ITEM>,IBoundInstanceModelFieldComplex,IBoundInstanceModelFieldScalar,IBoundInstanceModelNamed<ITEM>
Represents an assembly or field instance bound to Java data.
-
Field Summary
Fields inherited from interface gov.nist.secauto.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 TypeMethodDescriptiondefault voiddeepCopy(IBoundObject fromInstance, IBoundObject toInstance) Copy this instance from one parent object to another.Get the Java binding information for the collection type supported by this instance.getItemJsonKey(Object item) Get the JSON key flag for the provided item.static Class<?>getItemType(Field field) 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>getItemValues(Object value) Get the item values associated with the provided value.default ObjectMethods inherited from interface gov.nist.secauto.metaschema.databind.model.IBoundInstance
getContainingModule, getValue, setValueMethods inherited from interface gov.nist.secauto.metaschema.databind.model.IBoundModelObject
canHandleXmlQNameMethods inherited from interface gov.nist.secauto.metaschema.core.model.IDefaultable
getDefaultValue, getEffectiveDefaultValueMethods inherited from interface gov.nist.secauto.metaschema.databind.model.IFeatureJavaField
getField, getItemType, getTypeMethods inherited from interface gov.nist.secauto.metaschema.core.model.IGroupable
getEffectiveXmlGroupAsQName, getGroupAsName, getJsonGroupAsBehavior, getMaxOccurs, getMinOccurs, getXmlGroupAsBehaviorMethods inherited from interface gov.nist.secauto.metaschema.core.model.IInstance
toCoordinatesMethods inherited from interface gov.nist.secauto.metaschema.databind.model.info.IItemValueHandler
deepCopyItem, readItem, writeItemMethods inherited from interface gov.nist.secauto.metaschema.core.model.IJsonNamed
getJsonNameMethods inherited from interface gov.nist.secauto.metaschema.core.model.IModelElement
getModelType, getRemarksMethods inherited from interface gov.nist.secauto.metaschema.core.model.IModelElementVisitable
acceptMethods inherited from interface gov.nist.secauto.metaschema.core.model.IModelInstance
getParentContainer, isEffectiveValueWrappedInXml
-
Method Details
-
getItemType
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 instanceexpectedItemType- 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:
getContainingDefinitionin interfaceIBoundInstance<ITEM>- Specified by:
getContainingDefinitionin interfaceIInstance- Specified by:
getContainingDefinitionin interfaceIModelInstance
-
getResolvedDefaultValue
- Specified by:
getResolvedDefaultValuein interfaceIDefaultable
-
getItemValues
Get the item values associated with the provided value.- Specified by:
getItemValuesin interfaceIGroupable- 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
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 IBoundObject fromInstance, @NonNull IBoundObject toInstance) throws BindingException Description copied from interface:IBoundPropertyCopy this instance from one parent object to another.- Specified by:
deepCopyin interfaceIBoundProperty<ITEM>- Parameters:
fromInstance- the object to copy fromtoInstance- the object to copy to- Throws:
BindingException- if an error occurred while processing the object bindings
-