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 definition
MODEL - the Java type of child model instances supported by this choice
NAMED_MODEL - the Java type of child named model instances supported by this choice
FIELD - the Java type of child field instances supported by this choice
ASSEMBLY - 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.
  • Constructor Details

    • AbstractChoiceInstance

      protected AbstractChoiceInstance(@NonNull PARENT parent)
      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

      public String getGroupAsName()
      Description copied from interface: IGroupable
      Get the name provided for grouping. An instance in Metaschema must have a group name if the instance has a cardinality greater than 1.
      Specified by:
      getGroupAsName in interface IGroupable
      Returns:
      the group-as name or null if no name is configured, such as when IGroupable.getMaxOccurs() = 1
    • getContainingDefinition

      public PARENT getContainingDefinition()
      Retrieve the Metaschema assembly definition on which this instance is declared.
      Specified by:
      getContainingDefinition in interface IInstance
      Specified by:
      getContainingDefinition in interface IModelInstance
      Returns:
      the parent Metaschema assembly definition
    • getContainingModule

      public IModule getContainingModule()
      Description copied from interface: IModelElement
      Retrieves the Metaschema module that contains the information element's declaration.
      Specified by:
      getContainingModule in interface IModelElement
      Returns:
      the Metaschema module