- All Superinterfaces:
IAssembly,IAttributable,IContainer,IContainerModel,IContainerModelAbsolute,IContainerModelAssembly,IDefaultable,IDefinition,IDescribable,IFeatureModelConstrained,IFeatureValueConstrained,IJsonNamed,IModelConstrained,IModelDefinition,IModelElement,IModelElementVisitable,INamed,INamedModelElement,IValueConstrained
- All Known Subinterfaces:
IBindingDefinitionModelAssembly,IBoundDefinitionModelAssembly
- All Known Implementing Classes:
AbstractGlobalAssemblyDefinition,AbstractInlineAssemblyDefinition
public interface IAssemblyDefinition
extends IModelDefinition, IContainerModelAssembly, IAssembly, IFeatureModelConstrained
Represents an assembly definition in a Metaschema module.
An assembly is a complex structured data object that may contain flags, fields, and other nested assemblies. Assembly definitions may be designated as root elements for documents.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.metaschema.core.model.IAttributable
IAttributable.KeyNested classes/interfaces inherited from interface dev.metaschema.core.model.IDefinition
IDefinition.ModuleScope -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IEnhancedQNameThe qualified name for the model property in Metaschema.Fields inherited from interface dev.metaschema.core.model.IAttributable
DEFAULT_PROPERY_NAMESPACEFields inherited from interface dev.metaschema.core.model.IDefinition
DEFAULT_MODULE_SCOPE -
Method Summary
Modifier and TypeMethodDescriptiondefault <CONTEXT,RESULT>
RESULTaccept(IModelElementVisitor<CONTEXT, RESULT> visitor, CONTEXT context) A visitor callback.default IAssemblyInstanceIfIDefinition.isInline()istrue, return the instance the definition is inlined for.default IAssemblyDefinitionRetrieve the Metaschema module definition containing this container.default IntegerGet the root index to use for binary data, if this assembly is a top-level root.default StringGet the name used for the associated property in JSON/YAML.default StringGet the root name if this assembly is a top-level root.default IEnhancedQNameGet the XML qualified name to use in XML as the root element.default booleanIdentifies if the container allows child instances or not.default booleanisInline()Determine if the definition is defined inline, meaning the definition is declared where it is used.default booleanisRoot()Check if the assembly is a top-level root assembly.Methods inherited from interface dev.metaschema.core.model.IAssembly
getModelTypeMethods inherited from interface dev.metaschema.core.model.IAttributable
getProperties, getPropertyValues, hasProperty, hasPropertyValueMethods inherited from interface dev.metaschema.core.model.IContainerModelAbsolute
getAssemblyInstanceByName, getAssemblyInstances, getFieldInstanceByName, getFieldInstances, getModelInstances, getNamedModelInstanceByName, getNamedModelInstancesMethods inherited from interface dev.metaschema.core.model.IContainerModelAssembly
getChoiceGroupInstanceByName, getChoiceGroupInstances, getChoiceInstancesMethods inherited from interface dev.metaschema.core.model.IDefaultable
getDefaultValue, getEffectiveDefaultValue, getResolvedDefaultValueMethods inherited from interface dev.metaschema.core.model.IDefinition
getDefinitionQName, getLocation, getModuleScope, toCoordinatesMethods inherited from interface dev.metaschema.core.model.IDescribable
getDescription, getEffectiveDescription, getEffectiveFormalName, getFormalNameMethods inherited from interface dev.metaschema.core.model.constraint.IFeatureModelConstrained
addConstraint, addConstraint, addConstraint, getConstraintSupport, getHasCardinalityConstraints, getIndexConstraints, getUniqueConstraintsMethods inherited from interface dev.metaschema.core.model.constraint.IFeatureValueConstrained
addConstraint, addConstraint, addConstraint, addConstraint, addConstraint, addLetExpression, getAllowedValuesConstraints, getConstraints, getExpectConstraints, getIndexHasKeyConstraints, getLetExpressions, getMatchesConstraints, getReportConstraintsMethods inherited from interface dev.metaschema.core.model.IModelDefinition
getFlagInstanceByName, getFlagInstances, getJsonKeyMethods inherited from interface dev.metaschema.core.model.IModelElement
getContainingModule, getRemarksMethods inherited from interface dev.metaschema.core.model.INamed
getEffectiveIndex, getEffectiveName, getIndex, getName, getQName, getUseIndex, getUseNameMethods inherited from interface dev.metaschema.core.model.INamedModelElement
getJsonNameMethods inherited from interface dev.metaschema.core.model.constraint.IValueConstrained
getSource
-
Field Details
-
MODEL_QNAME
The qualified name for the model property in Metaschema.
-
-
Method Details
-
isRoot
default boolean isRoot()Check if the assembly is a top-level root assembly.- Returns:
trueif the assembly is a top-level root, orfalseotherwise
-
getRootName
Get the root name if this assembly is a top-level root.- Returns:
- the root name if this assembly is a top-level root, or
nullotherwise
-
getRootIndex
Get the root index to use for binary data, if this assembly is a top-level root.- Returns:
- the root index if provided and this assembly is a top-level root, or
nullotherwise
-
getRootQName
Get the XML qualified name to use in XML as the root element.- Returns:
- the root XML qualified name if this assembly is a top-level root, or
nullotherwise
-
getRootJsonName
Get the name used for the associated property in JSON/YAML.- Returns:
- the root JSON property name if this assembly is a top-level root, or
nullotherwise
-
isInline
default boolean isInline()Description copied from interface:IDefinitionDetermine if the definition is defined inline, meaning the definition is declared where it is used.If this method returns
false, thenIDefinition.getInlineInstance()must returnnull.- Specified by:
isInlinein interfaceIDefinition- Returns:
trueif the definition is declared inline orfalseif the definition is able to be globally referenced- See Also:
-
getInlineInstance
Description copied from interface:IDefinitionIfIDefinition.isInline()istrue, return the instance the definition is inlined for.If this method returns
null, thenIDefinition.getInlineInstance()must returnfalse.- Specified by:
getInlineInstancein interfaceIDefinition- Returns:
- the instance or
nullotherwise - See Also:
-
getOwningDefinition
Description copied from interface:IContainerModelRetrieve the Metaschema module definition containing this container.- Specified by:
getOwningDefinitionin interfaceIContainerModel- Returns:
- the containing Metaschema module definition
-
hasChildren
default boolean hasChildren()Description copied from interface:IContainerIdentifies if the container allows child instances or not.This can be the case if the container has flags or a complex model with at least a choice, choice group, field, or assembly instance.
- Specified by:
hasChildrenin interfaceIContainer- Specified by:
hasChildrenin interfaceIContainerModel- Specified by:
hasChildrenin interfaceIModelDefinition- Returns:
trueif there are flags or a model, orfalseotherwise
-
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
-