- All Superinterfaces:
IAttributable,IContainer,IDefaultable,IDefinition,IDescribable,IFeatureValueConstrained,IJsonNamed,IModelElement,IModelElementVisitable,INamed,INamedModelElement,IValueConstrained
- All Known Subinterfaces:
IAssemblyDefinition,IBindingDefinitionModel,IBindingDefinitionModelAssembly,IBoundDefinitionModel<ITEM>,IBoundDefinitionModelAssembly,IBoundDefinitionModelComplex,IBoundDefinitionModelField<ITEM>,IBoundDefinitionModelFieldComplex,IBoundInstanceModelFieldScalar,IFeatureContainerFlag<FI>,IFieldDefinition
- All Known Implementing Classes:
AbstractGlobalAssemblyDefinition,AbstractGlobalFieldDefinition,AbstractInlineAssemblyDefinition,AbstractInlineFieldDefinition
Represents a Metaschema definition for a complex object that may contain
flags.
-
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
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 TypeMethodDescriptionstatic booleancomplexObjectFilter(IModelDefinition definition) Tests if the provided definition represents complex data.getFlagInstanceByName(Integer index) Retrieves a flag instance, by the flag's effective name-based qualified name index.Collection<? extends IFlagInstance>Retrieves the flag instances for all flags defined on the containing definition.Retrieves the flag instance to use as the property name for the containing object in JSON whose value will be the object containing the flag.default booleanIdentifies if the container allows child instances or not.Methods inherited from interface dev.metaschema.core.model.IAttributable
getProperties, getPropertyValues, hasProperty, hasPropertyValueMethods inherited from interface dev.metaschema.core.model.IDefaultable
getDefaultValue, getEffectiveDefaultValue, getResolvedDefaultValueMethods inherited from interface dev.metaschema.core.model.IDefinition
getDefinitionQName, getInlineInstance, getLocation, getModuleScope, isInline, toCoordinatesMethods inherited from interface dev.metaschema.core.model.IDescribable
getDescription, getEffectiveDescription, getEffectiveFormalName, getFormalNameMethods inherited from interface dev.metaschema.core.model.constraint.IFeatureValueConstrained
addConstraint, addConstraint, addConstraint, addConstraint, addConstraint, addLetExpression, getAllowedValuesConstraints, getConstraints, getConstraintSupport, getExpectConstraints, getIndexHasKeyConstraints, getLetExpressions, getMatchesConstraints, getReportConstraintsMethods inherited from interface dev.metaschema.core.model.IModelElement
getContainingModule, getModelType, getRemarksMethods inherited from interface dev.metaschema.core.model.IModelElementVisitable
acceptMethods 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
-
Method Details
-
complexObjectFilter
Tests if the provided definition represents complex data. The data is complex if one of the following is true:- The instance is a
IAssemblyDefinition. - The instance is a
IFieldDefinitionthat has flags.
Predicate.- Parameters:
definition- the definition to test- Returns:
trueif the data is complex, orfalseotherwise
- The instance is a
-
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- Returns:
trueif there are flags or a model, orfalseotherwise
-
getFlagInstanceByName
Retrieves a flag instance, by the flag's effective name-based qualified name index.- Parameters:
index- the flag's name-based qualified name index- Returns:
- the matching flag instance, or
nullif there is no flag matching the specified name
-
getFlagInstances
Retrieves the flag instances for all flags defined on the containing definition.- Returns:
- the flags
-
getJsonKey
Retrieves the flag instance to use as the property name for the containing object in JSON whose value will be the object containing the flag.- Returns:
- the flag instance if a JSON key is configured, or
nullotherwise
-