- All Superinterfaces:
IDefaultable,IGroupable,IInstance,IInstanceAbsolute,IModelElement,IModelElementVisitable,IModelInstance,IModelInstanceAbsolute,IValued
A marker interface for an
any instance in a Metaschema model.
An any instance represents unmodeled content that may appear within
an assembly's model. Unlike other model instances, an any instance
does not have a definition or name; it acts as a wildcard that captures
content not explicitly declared by the model.
An any instance is always optional (getMinOccurs() returns
0) and unbounded (getMaxOccurs() returns -1).
-
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 IAssemblyDefinitionRetrieve the Metaschema module definition on which the instance was declared.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 "ANY".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.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
getParentContainer
-
Method Details
-
getModelType
Provides the Metaschema model type of "ANY".- Specified by:
getModelTypein interfaceIModelElement- Returns:
- the model type
-
getContainingDefinition
Description copied from interface:IInstanceRetrieve the Metaschema module definition on which the instance was declared.- Specified by:
getContainingDefinitionin interfaceIInstance- Specified by:
getContainingDefinitionin interfaceIModelInstance- Returns:
- the Metaschema module definition on which the instance was declared
-
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
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
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
-