Module dev.metaschema.databind
Package dev.metaschema.databind.model
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_NAMEFields 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 TypeMethodDescriptiondefault booleancanHandleXmlQName(dev.metaschema.core.qname.IEnhancedQName qname) Determine if the provided XML qualified name is associated with this property.default dev.metaschema.core.model.IBoundObjectdeepCopyItem(dev.metaschema.core.model.IBoundObject item, dev.metaschema.core.model.IBoundObject parentInstance) Create and return a deep copy of the provided item.default IBoundDefinitionModelAssemblygetGroupedModelInstance(dev.metaschema.core.qname.IEnhancedQName name) Get the bound grouped model instance associated with the provided XML qualified name.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.default IBoundInstanceModelGroupedNamedgetItemInstance(Object item) Get the bound grouped model instance associated with the provided item.default StringnewInstance(Field field, IBoundDefinitionModelAssembly containingDefinition) Create a new bound choice group instance.default dev.metaschema.core.model.IBoundObjectreadItem(dev.metaschema.core.model.IBoundObject parent, IItemReadHandler handler) Parse and return an item.default voidwriteItem(dev.metaschema.core.model.IBoundObject item, IItemWriteHandler handler) Write the provided item.Methods inherited from interface dev.metaschema.databind.model.IBoundInstance
getContainingModule, getValue, setValueMethods inherited from interface dev.metaschema.databind.model.IBoundInstanceModel
deepCopy, getCollectionInfo, getItemJsonKey, getItemValues, getResolvedDefaultValueMethods inherited from interface dev.metaschema.core.model.IChoiceGroupInstance
accept, getJsonDiscriminatorProperty, getJsonKeyFlagInstanceName, getMaxOccurs, getModelType, getRemarks, isEffectiveValueWrappedInXml, toCoordinatesMethods inherited from interface dev.metaschema.core.model.IDefaultable
getDefaultValue, getEffectiveDefaultValueMethods inherited from interface dev.metaschema.core.model.IFeatureContainerModelGrouped
getAssemblyInstanceByName, getAssemblyInstances, getFieldInstanceByName, getFieldInstances, getModelContainer, getModelInstances, getNamedModelInstanceByName, getNamedModelInstances, hasChildrenMethods inherited from interface dev.metaschema.databind.model.IFeatureJavaField
getField, getItemType, getTypeMethods inherited from interface dev.metaschema.core.model.IGroupable
getEffectiveXmlGroupAsQName, getGroupAsName, getJsonGroupAsBehavior, getMinOccurs, getXmlGroupAsBehaviorMethods 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 tocontainingDefinition- the definition containing the instance- Returns:
- the new instance
-
getJsonName
- Specified by:
getJsonNamein interfacedev.metaschema.core.model.IChoiceGroupInstance- Specified by:
getJsonNamein interfacedev.metaschema.core.model.IJsonInstance- Specified by:
getJsonNamein interfacedev.metaschema.core.model.IJsonNamed
-
getOwningDefinition
- Specified by:
getOwningDefinitionin interfacedev.metaschema.core.model.IContainerModel- Specified by:
getOwningDefinitionin interfacedev.metaschema.core.model.IContainerModelGrouped
-
getContainingDefinition
- Specified by:
getContainingDefinitionin interfaceIBoundInstance<dev.metaschema.core.model.IBoundObject>- Specified by:
getContainingDefinitionin interfaceIBoundInstanceModel<dev.metaschema.core.model.IBoundObject>- Specified by:
getContainingDefinitionin interfacedev.metaschema.core.model.IInstance- Specified by:
getContainingDefinitionin interfacedev.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:
getItemInstancein interfacedev.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:IItemValueHandlerParse and return an item.- Specified by:
readItemin interfaceIItemValueHandler<dev.metaschema.core.model.IBoundObject>- Parameters:
parent- the parent Java object to use for serialization callbacks, ornullif 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
default void writeItem(dev.metaschema.core.model.IBoundObject item, IItemWriteHandler handler) throws IOException Description copied from interface:IItemValueHandlerWrite the provided item.- Specified by:
writeItemin interfaceIItemValueHandler<dev.metaschema.core.model.IBoundObject>- Parameters:
item- the data to writehandler- 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:IItemValueHandlerCreate and return a deep copy of the provided item.- Specified by:
deepCopyItemin interfaceIItemValueHandler<dev.metaschema.core.model.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:IBoundModelObjectDetermine if the provided XML qualified name is associated with this property.- Specified by:
canHandleXmlQNamein interfaceIBoundModelObject<dev.metaschema.core.model.IBoundObject>- Parameters:
qname- the XML qualified name of the property being parsed- Returns:
trueif the instance will handle this name, orfalseotherwise
-