Class AbstractGlobalDefinition<MODULE extends IModule,INSTANCE extends INamedInstance>
- Type Parameters:
MODULE- the Java type of the containing moduleINSTANCE- the expected Java type of an instance of this definition
- All Implemented Interfaces:
IFeatureValueConstrained,IValueConstrained,IAttributable,IDefaultable,IDefinition,IDescribable,IJsonNamed,IModelElement,IModelElementVisitable,INamed,INamedModelElement
- Direct Known Subclasses:
AbstractGlobalAssemblyDefinition,AbstractGlobalFieldDefinition,AbstractGlobalFlagDefinition
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceProvides a callback for generating a qualified name from a name.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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractGlobalDefinition(MODULE module, AbstractGlobalDefinition.NameInitializer initializer) Construct a new global definition. -
Method Summary
Modifier and TypeMethodDescriptionfinal MODULERetrieves the Metaschema module that contains the information element's declaration.final IEnhancedQNameThe qualified name for the definition.final INSTANCEIfIDefinition.isInline()istrue, return the instance the definition is inlined for.final IEnhancedQNamegetQName()Get the unique XML qualified name for this model element.Get information about the resource the constraints were loaded from.booleanisInline()Determine if the definition is defined inline, meaning the definition is declared where it is used.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
getLocation, getModuleScope, 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
getModelType, getRemarksMethods inherited from interface dev.metaschema.core.model.IModelElementVisitable
acceptMethods inherited from interface dev.metaschema.core.model.INamed
getEffectiveIndex, getEffectiveName, getIndex, getName, getUseIndex, getUseNameMethods inherited from interface dev.metaschema.core.model.INamedModelElement
getJsonName
-
Constructor Details
-
AbstractGlobalDefinition
protected AbstractGlobalDefinition(@NonNull MODULE module, @NonNull AbstractGlobalDefinition.NameInitializer initializer) Construct a new global definition.- Parameters:
module- the parent module containing this instanceinitializer- the callback used to generate qualified names
-
-
Method Details
-
getContainingModule
Description copied from interface:IModelElementRetrieves the Metaschema module that contains the information element's declaration.- Specified by:
getContainingModulein interfaceIModelElement- Returns:
- the Metaschema module
-
getSource
Description copied from interface:IValueConstrainedGet information about the resource the constraints were loaded from.- Specified by:
getSourcein interfaceIValueConstrained- Returns:
- the source information
-
getQName
Description copied from interface:INamedGet the unique XML qualified name for this model element.The qualified name is considered to be unique relative to all sibling elements. For a flag, this name will be unique among all flag instances on the same field or assembly definition. For a field or assembly, this name will be unique among all sibling field or assembly instances on the same assembly definition.
Multiple calls to this method are expected to produce the same, deterministic return value.
If the namespace is not specified, then the resulting QName will have the namespace
XMLConstants.NULL_NS_URI.This implementation may be overridden by implementation that cache the QName or provide for a more efficient method for QName creation.
-
getDefinitionQName
Description copied from interface:IDefinitionThe qualified name for the definition.This name is the combination of the definition's namespace, which is the module's namespace, and the definition's name.
- Specified by:
getDefinitionQNamein interfaceIDefinition- Returns:
- the definition's qualified name
-
isInline
public 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:
-