Module dev.metaschema.core
Package dev.metaschema.core.model
Class AbstractChoiceInstance<PARENT extends IAssemblyDefinition,MODEL extends IModelInstanceAbsolute,NAMED_MODEL extends INamedModelInstanceAbsolute,FIELD extends IFieldInstanceAbsolute,ASSEMBLY extends IAssemblyInstanceAbsolute>
java.lang.Object
dev.metaschema.core.model.AbstractInstance<PARENT>
dev.metaschema.core.model.AbstractChoiceInstance<PARENT,MODEL,NAMED_MODEL,FIELD,ASSEMBLY>
- Type Parameters:
PARENT- the Java type of the containing assembly definitionMODEL- the Java type of child model instances supported by this choiceNAMED_MODEL- the Java type of child named model instances supported by this choiceFIELD- the Java type of child field instances supported by this choiceASSEMBLY- the Java type of child assembly instances supported by this choice
- All Implemented Interfaces:
IChoiceInstance,IContainer,IContainerModel,IContainerModelAbsolute,IDefaultable,IFeatureContainerModelAbsolute<MODEL,,NAMED_MODEL, FIELD, ASSEMBLY> IGroupable,IInstance,IInstanceAbsolute,IModelElement,IModelElementVisitable,IModelInstance,IModelInstanceAbsolute,IValued
public abstract class AbstractChoiceInstance<PARENT extends IAssemblyDefinition,MODEL extends IModelInstanceAbsolute,NAMED_MODEL extends INamedModelInstanceAbsolute,FIELD extends IFieldInstanceAbsolute,ASSEMBLY extends IAssemblyInstanceAbsolute>
extends AbstractInstance<PARENT>
implements IChoiceInstance, IFeatureContainerModelAbsolute<MODEL,NAMED_MODEL,FIELD,ASSEMBLY>
A base class for a choice that is a member of a containing model.
-
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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractChoiceInstance(PARENT parent) Construct a new choice instance that is contained with the provided parent assembly definition. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the Metaschema assembly definition on which this instance is declared.Retrieves the Metaschema module that contains the information element's declaration.Get the name provided for grouping.Methods inherited from class dev.metaschema.core.model.AbstractInstance
getParentContainerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.metaschema.core.model.IChoiceInstance
accept, getEffectiveXmlGroupAsQName, getMaxOccurs, getMinOccurs, getModelType, getOwningDefinition, isEffectiveValueWrappedInXml, toCoordinatesMethods inherited from interface dev.metaschema.core.model.IContainerModel
hasChildrenMethods inherited from interface dev.metaschema.core.model.IDefaultable
getDefaultValue, getEffectiveDefaultValue, getResolvedDefaultValueMethods inherited from interface dev.metaschema.core.model.IFeatureContainerModelAbsolute
getAssemblyInstanceByName, getAssemblyInstances, getFieldInstanceByName, getFieldInstances, getModelContainer, getModelInstances, getNamedModelInstanceByName, getNamedModelInstancesMethods inherited from interface dev.metaschema.core.model.IGroupable
getItemValues, getJsonGroupAsBehavior, getXmlGroupAsBehaviorMethods inherited from interface dev.metaschema.core.model.IModelElement
getRemarksMethods inherited from interface dev.metaschema.core.model.IModelInstance
getParentContainer
-
Constructor Details
-
AbstractChoiceInstance
Construct a new choice instance that is contained with the provided parent assembly definition.- Parameters:
parent- the parent assembly definition container for this instance
-
-
Method Details
-
getGroupAsName
Description copied from interface:IGroupableGet the name provided for grouping. An instance in Metaschema must have a group name if the instance has a cardinality greater than1.- Specified by:
getGroupAsNamein interfaceIGroupable- Returns:
- the group-as name or
nullif no name is configured, such as whenIGroupable.getMaxOccurs()= 1
-
getContainingDefinition
Retrieve the Metaschema assembly definition on which this instance is declared.- Specified by:
getContainingDefinitionin interfaceIInstance- Specified by:
getContainingDefinitionin interfaceIModelInstance- Returns:
- the parent Metaschema assembly definition
-
getContainingModule
Description copied from interface:IModelElementRetrieves the Metaschema module that contains the information element's declaration.- Specified by:
getContainingModulein interfaceIModelElement- Returns:
- the Metaschema module
-