- All Superinterfaces:
IContainer,IContainerModel,IContainerModelAbsolute,IDefaultable,IGroupable,IInstance,IInstanceAbsolute,IModelElement,IModelElementVisitable,IModelInstance,IModelInstanceAbsolute,IValued
- All Known Implementing Classes:
AbstractChoiceInstance
A marker interface for a choice of allowed instances in a Metachema.
-
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 TypeMethodDescriptiondefault <CONTEXT,RESULT>
RESULTaccept(IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) A visitor callback.default IEnhancedQNameGet the name used for the associated element wrapping a collection of elements in XML.default intGet the maximum cardinality for this associated instance.default intGet the minimum cardinality for this associated instance.default ModelTypeProvides the Metaschema model type of "CHOICE".default IAssemblyDefinitionRetrieve the Metaschema module definition containing this container.default booleanIndicate if the instance allows values without an XML element wrapper.default StringGenerates a "coordinate" string for the provided information element instance.Methods inherited from interface dev.metaschema.core.model.IContainerModel
hasChildrenMethods inherited from interface dev.metaschema.core.model.IContainerModelAbsolute
getAssemblyInstanceByName, getAssemblyInstances, getFieldInstanceByName, getFieldInstances, getModelInstances, getNamedModelInstanceByName, getNamedModelInstancesMethods inherited from interface dev.metaschema.core.model.IDefaultable
getDefaultValue, getEffectiveDefaultValue, getResolvedDefaultValueMethods inherited from interface dev.metaschema.core.model.IGroupable
getGroupAsName, getItemValues, getJsonGroupAsBehavior, getXmlGroupAsBehaviorMethods inherited from interface dev.metaschema.core.model.IModelElement
getContainingModule, getRemarksMethods inherited from interface dev.metaschema.core.model.IModelInstance
getContainingDefinition, getParentContainer
-
Method Details
-
getModelType
Provides the Metaschema model type of "CHOICE".- Specified by:
getModelTypein interfaceIModelElement- Returns:
- the model type
-
getOwningDefinition
Description copied from interface:IContainerModelRetrieve the Metaschema module definition containing this container.- Specified by:
getOwningDefinitionin interfaceIContainerModel- Returns:
- the containing Metaschema module definition
-
getMinOccurs
default int getMinOccurs()Description copied from interface:IGroupableGet the minimum cardinality for this associated instance. This value must be less than or equal to the maximum cardinality returned byIGroupable.getMaxOccurs().- Specified by:
getMinOccursin interfaceIGroupable- Returns:
0or a positive integer value- See Also:
-
getMaxOccurs
default int getMaxOccurs()Description copied from interface:IGroupableGet the maximum cardinality for this associated instance. This value must be greater than or equal to the minimum cardinality returned byIGroupable.getMinOccurs(), or-1if unbounded.- Specified by:
getMaxOccursin interfaceIGroupable- Returns:
- a positive integer value or
-1if unbounded - See Also:
-
getEffectiveXmlGroupAsQName
Description copied from interface:IGroupableGet the name used for the associated element wrapping a collection of elements in XML. This value is required whenIGroupable.getXmlGroupAsBehavior()=XmlGroupAsBehavior.GROUPED. This name will be the element name wrapping a collection of elements.If this instance doesn't have a namespace defined, then the module's XML namespace will be used.
- Specified by:
getEffectiveXmlGroupAsQNamein interfaceIGroupable- Returns:
- the groupAs QName or
nullif no name is configured, such as whenIGroupable.getMaxOccurs()= 1.
-
isEffectiveValueWrappedInXml
default boolean isEffectiveValueWrappedInXml()Description copied from interface:IModelInstanceIndicate if the instance allows values without an XML element wrapper.- Specified by:
isEffectiveValueWrappedInXmlin interfaceIModelInstance- Returns:
trueif the underlying data type is allowed to be unwrapped, orfalseotherwise
-
toCoordinates
Description copied from interface:IInstanceGenerates a "coordinate" string for the provided information element instance. A coordinate consists of the element's:- containing Metaschema module's short name
- model type
- name
- hash code
- the hash code of the definition
- Specified by:
toCoordinatesin interfaceIInstance- Specified by:
toCoordinatesin interfaceIModelElement- Returns:
- the coordinate
-
accept
default <CONTEXT,RESULT> RESULT accept(@NonNull IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) A visitor callback.- Specified by:
acceptin interfaceIModelElementVisitable- Type Parameters:
CONTEXT- the type of the context parameterRESULT- the type of the visitor result- Parameters:
visitor- the calling visitorcontext- a parameter used to pass contextual information between visitors- Returns:
- the visitor result
-