java.lang.Object
dev.metaschema.core.model.AbstractModule<IBoundModule,IBoundDefinitionModelComplex,IBoundDefinitionFlag,IBoundDefinitionModelField<?>,IBoundDefinitionModelAssembly>
dev.metaschema.databind.model.AbstractBoundModule
- All Implemented Interfaces:
IModule,IModuleExtended<IBoundModule,,IBoundDefinitionModelComplex, IBoundDefinitionFlag, IBoundDefinitionModelField<?>, IBoundDefinitionModelAssembly> IBoundModule
- Direct Known Subclasses:
MetaschemaBindingsModule,MetaschemaModelModule,MetaschemaTestSuiteModule
public abstract class AbstractBoundModule
extends AbstractModule<IBoundModule,IBoundDefinitionModelComplex,IBoundDefinitionFlag,IBoundDefinitionModelField<?>,IBoundDefinitionModelAssembly>
implements IBoundModule
An abstract base class for Metaschema modules bound to Java classes.
This class provides the common implementation for modules that are defined through Java annotations on classes, enabling data binding between Metaschema module definitions and Java objects.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractBoundModule(List<? extends IBoundModule> importedModules, IBindingContext bindingContext) Construct a new Module instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<? extends IBoundObject>[]Get the assembly instance annotations associated with this bound choice group.Retrieves the top-level assembly definition in this Metaschema module with the matching name, if it exists.protected Map<Integer,IBoundDefinitionModelAssembly> Get the mapping of assembly definition effective name to definition.Retrieves the top-level assembly definitions in this Metaschema module.Get the Module binding context.protected Class<? extends IBoundObject>[]Get the field instance annotations associated with this bound choice group.Retrieves the top-level field definition in this Metaschema module with the matching name, if it exists.protected Map<Integer,IBoundDefinitionModelField<?>> Get the mapping of field definition effective name to definition.Retrieves the top-level field definitions in this Metaschema module.Retrieves the top-level flag definition in this Metaschema module with the matching name, if it exists.Retrieves the top-level flag definitions in this Metaschema module.Get a hint about where the source is location.Get the Metapath static context for compiling Metapath expressions that query instances of this model.Get the mapping of prefix to namespace URI for use in resolving the namespace of lexical qualified named in Metapath.protected NsBinding[]Get the namespace binding annotations associated with this module.Get the source information for the module.Methods inherited from class dev.metaschema.core.model.AbstractModule
getExportedAssemblyDefinitionByName, getExportedAssemblyDefinitions, getExportedFieldDefinitionByName, getExportedFieldDefinitions, getExportedFlagDefinitionByName, getExportedFlagDefinitions, getExportedRootAssemblyDefinitionByName, getImportedModuleByShortName, getImportedModules, getQNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.metaschema.databind.model.IBoundModule
getLocationMethods inherited from interface dev.metaschema.core.model.IModule
getExportedRootAssemblyDefinitionByName, getJsonBaseUri, getName, getQName, getRemarks, getShortName, getVersion, getXmlNamespaceMethods inherited from interface dev.metaschema.core.model.IModuleExtended
getAssemblyAndFieldDefinitions, getExportedAssemblyDefinitionByName, getExportedAssemblyDefinitions, getExportedFieldDefinitionByName, getExportedFieldDefinitions, getExportedFlagDefinitionByName, getExportedFlagDefinitions, getExportedRootAssemblyDefinitions, getImportedModuleByShortName, getImportedModules, getRootAssemblyDefinitions, getScopedAssemblyDefinitionByName, getScopedFieldDefinitionByName, getScopedFlagDefinitionByName
-
Constructor Details
-
AbstractBoundModule
protected AbstractBoundModule(@NonNull List<? extends IBoundModule> importedModules, @NonNull IBindingContext bindingContext) Construct a new Module instance.- Parameters:
importedModules- Module imports associated with the Metaschema modulebindingContext- the Module binding context
-
-
Method Details
-
getSource
Description copied from interface:IModuleGet the source information for the module. -
getLocationHint
Description copied from interface:IModuleGet a hint about where the source is location.This value will typically be a URI or class name.
- Specified by:
getLocationHintin interfaceIModule- Returns:
- the hint
-
getModuleStaticContext
Description copied from interface:IModuleGet the Metapath static context for compiling Metapath expressions that query instances of this model.- Specified by:
getModuleStaticContextin interfaceIModule- Returns:
- the static context
-
getBindingContext
Description copied from interface:IBoundModuleGet the Module binding context.- Specified by:
getBindingContextin interfaceIBoundModule- Returns:
- the context
-
getNamespaceBindings
Description copied from interface:IModuleGet the mapping of prefix to namespace URI for use in resolving the namespace of lexical qualified named in Metapath.- Specified by:
getNamespaceBindingsin interfaceIModule- Returns:
- the mapping
-
getNsBindings
Get the namespace binding annotations associated with this module.- Returns:
- the namespace bindings array, or an empty array if none are defined
-
getAssemblyClasses
Get the assembly instance annotations associated with this bound choice group.- Returns:
- the annotations
-
getFieldClasses
Get the field instance annotations associated with this bound choice group.- Returns:
- the annotations
-
getAssemblyDefinitionMap
Get the mapping of assembly definition effective name to definition.- Returns:
- the mapping
-
getAssemblyDefinitions
Description copied from interface:IModuleRetrieves the top-level assembly definitions in this Metaschema module.- Specified by:
getAssemblyDefinitionsin interfaceIBoundModule- Specified by:
getAssemblyDefinitionsin interfaceIModule- Specified by:
getAssemblyDefinitionsin interfaceIModuleExtended<IBoundModule,IBoundDefinitionModelComplex, IBoundDefinitionFlag, IBoundDefinitionModelField<?>, IBoundDefinitionModelAssembly> - Returns:
- the collection of assembly definitions
-
getAssemblyDefinitionByName
Description copied from interface:IModuleRetrieves the top-level assembly definition in this Metaschema module with the matching name, if it exists.- Specified by:
getAssemblyDefinitionByNamein interfaceIBoundModule- Specified by:
getAssemblyDefinitionByNamein interfaceIModule- Specified by:
getAssemblyDefinitionByNamein interfaceIModuleExtended<IBoundModule,IBoundDefinitionModelComplex, IBoundDefinitionFlag, IBoundDefinitionModelField<?>, IBoundDefinitionModelAssembly> - Parameters:
name- the definition name- Returns:
- the matching assembly definition, or
nullif none match
-
getFieldDefinitionMap
Get the mapping of field definition effective name to definition.- Returns:
- the mapping
-
getFieldDefinitions
Description copied from interface:IModuleRetrieves the top-level field definitions in this Metaschema module.- Specified by:
getFieldDefinitionsin interfaceIBoundModule- Specified by:
getFieldDefinitionsin interfaceIModule- Specified by:
getFieldDefinitionsin interfaceIModuleExtended<IBoundModule,IBoundDefinitionModelComplex, IBoundDefinitionFlag, IBoundDefinitionModelField<?>, IBoundDefinitionModelAssembly> - Returns:
- the collection of field definitions
-
getFieldDefinitionByName
Description copied from interface:IModuleRetrieves the top-level field definition in this Metaschema module with the matching name, if it exists.- Specified by:
getFieldDefinitionByNamein interfaceIBoundModule- Specified by:
getFieldDefinitionByNamein interfaceIModule- Specified by:
getFieldDefinitionByNamein interfaceIModuleExtended<IBoundModule,IBoundDefinitionModelComplex, IBoundDefinitionFlag, IBoundDefinitionModelField<?>, IBoundDefinitionModelAssembly> - Parameters:
name- the definition name- Returns:
- the matching field definition, or
nullif none match
-
getFlagDefinitions
Description copied from interface:IModuleRetrieves the top-level flag definitions in this Metaschema module.- Specified by:
getFlagDefinitionsin interfaceIModule- Specified by:
getFlagDefinitionsin interfaceIModuleExtended<IBoundModule,IBoundDefinitionModelComplex, IBoundDefinitionFlag, IBoundDefinitionModelField<?>, IBoundDefinitionModelAssembly> - Returns:
- the collection of flag definitions
-
getFlagDefinitionByName
Description copied from interface:IModuleRetrieves the top-level flag definition in this Metaschema module with the matching name, if it exists.- Specified by:
getFlagDefinitionByNamein interfaceIModule- Specified by:
getFlagDefinitionByNamein interfaceIModuleExtended<IBoundModule,IBoundDefinitionModelComplex, IBoundDefinitionFlag, IBoundDefinitionModelField<?>, IBoundDefinitionModelAssembly> - Parameters:
name- the definition name- Returns:
- the matching flag definition, or
nullif none match
-