Interface IBoundInstanceModelChoiceGroup
- All Superinterfaces:
IBoundContainerModelChoiceGroup
,IBoundInstance<IBoundObject>
,IBoundInstanceModel<IBoundObject>
,IBoundModelElement
,IBoundModelObject<IBoundObject>
,IBoundProperty<IBoundObject>
,IChoiceGroupInstance
,IContainer
,IContainerModel
,IContainerModelGrouped
,IDefaultable
,IFeatureJavaField
,IGroupable
,IInstance
,IInstanceAbsolute
,IItemValueHandler<IBoundObject>
,IJsonNamed
,IModelElement
,IModelInstance
,IModelInstanceAbsolute
,IValued
,IValuedMutable
public interface IBoundInstanceModelChoiceGroup
extends IBoundInstanceModel<IBoundObject>, IBoundContainerModelChoiceGroup, IChoiceGroupInstance
Represents a choice group instance bound to Java field.
-
Field Summary
Fields inherited from interface gov.nist.secauto.metaschema.core.model.IChoiceGroupInstance
DEFAULT_CHOICE_GROUP_GROUP_AS_MAX_OCCURS, DEFAULT_JSON_DISCRIMINATOR_PROPERTY_NAME
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 boolean
canHandleXmlQName
(QName qname) Determine if the provided XML qualified name is associated with this property.default IBoundObject
deepCopyItem
(IBoundObject item, IBoundObject parentInstance) Create and return a deep copy of the provided item.default IBoundDefinitionModelAssembly
getGroupedModelInstance
(Class<?> clazz) Get the bound grouped model instance associated with the provided Java class.getGroupedModelInstance
(String discriminator) Get the bound grouped model instance associated with the provided JSON discriminator value.getGroupedModelInstance
(QName name) Get the bound grouped model instance associated with the provided XML qualified name.default IBoundInstanceModelGroupedNamed
getItemInstance
(Object item) 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 IBoundObject
readItem
(IBoundObject parent, IItemReadHandler handler) Parse and return an item.default void
writeItem
(IBoundObject item, IItemWriteHandler handler) Write the provided item.Methods inherited from interface gov.nist.secauto.metaschema.databind.model.IBoundContainerModelChoiceGroup
getAssemblyInstanceByName, getAssemblyInstances, getFieldInstanceByName, getFieldInstances, getModelInstances, getNamedModelInstanceByName, getNamedModelInstances
Methods inherited from interface gov.nist.secauto.metaschema.databind.model.IBoundInstance
getContainingModule, getValue, setValue
Methods inherited from interface gov.nist.secauto.metaschema.databind.model.IBoundInstanceModel
getCollectionInfo, getItemJsonKey, getItemValues, getResolvedDefaultValue
Methods inherited from interface gov.nist.secauto.metaschema.databind.model.IBoundProperty
deepCopy
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IChoiceGroupInstance
getJsonDiscriminatorProperty, getJsonKeyFlagInstanceName, getMaxOccurs, getModelType, getRemarks, isEffectiveValueWrappedInXml, toCoordinates
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IContainerModel
hasChildren
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IDefaultable
getDefaultValue, getEffectiveDefaultValue
Methods inherited from interface gov.nist.secauto.metaschema.databind.model.IFeatureJavaField
getField, getItemType, getType
Methods inherited from interface gov.nist.secauto.metaschema.core.model.IGroupable
getEffectiveGroupAsNamespace, getEffectiveXmlGroupAsQName, getGroupAsName, getGroupAsXmlNamespace, getJsonGroupAsBehavior, getMinOccurs, getXmlGroupAsBehavior
Methods inherited from interface gov.nist.secauto.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 tocontainingDefinition
- the definition containing the instance- Returns:
- the new instance
-
getJsonName
- Specified by:
getJsonName
in interfaceIJsonNamed
-
getOwningDefinition
- Specified by:
getOwningDefinition
in interfaceIContainerModel
- Specified by:
getOwningDefinition
in interfaceIContainerModelGrouped
-
getContainingDefinition
- Specified by:
getContainingDefinition
in interfaceIBoundInstance<IBoundObject>
- Specified by:
getContainingDefinition
in interfaceIBoundInstanceModel<IBoundObject>
- Specified by:
getContainingDefinition
in interfaceIInstance
- Specified by:
getContainingDefinition
in interfaceIModelInstance
-
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
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 interfaceIChoiceGroupInstance
- 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
Description copied from interface:IItemValueHandler
Parse and return an item.- Specified by:
readItem
in interfaceIItemValueHandler<IBoundObject>
- Parameters:
parent
- the parent Java object to use for serialization callbacks, ornull
if there is no parenthandler
- the item parsing handler- Returns:
- the Java object representing the parsed item
- Throws:
IOException
- if an error occurred while parsing
-
writeItem
Description copied from interface:IItemValueHandler
Write the provided item.- Specified by:
writeItem
in interfaceIItemValueHandler<IBoundObject>
- Parameters:
item
- the data to writehandler
- the item writing handler- Throws:
IOException
- if an error occurred while writing
-
deepCopyItem
default IBoundObject deepCopyItem(IBoundObject item, IBoundObject parentInstance) throws BindingException Description copied from interface:IItemValueHandler
Create and return a deep copy of the provided item.- Specified by:
deepCopyItem
in interfaceIItemValueHandler<IBoundObject>
- Parameters:
item
- the item to copyparentInstance
- 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
Description copied from interface:IBoundModelObject
Determine if the provided XML qualified name is associated with this property.- Specified by:
canHandleXmlQName
in interfaceIBoundModelObject<IBoundObject>
- Parameters:
qname
- the XML qualified name of the property being parsed- Returns:
true
if the instance will handle this name, orfalse
otherwise
-