Module dev.metaschema.core
Package dev.metaschema.core.model
Class AbstractModule<M extends IModuleExtended<M,D,FL,FI,A>,D extends IModelDefinition,FL extends IFlagDefinition,FI extends IFieldDefinition,A extends IAssemblyDefinition>
java.lang.Object
dev.metaschema.core.model.AbstractModule<M,D,FL,FI,A>
- Type Parameters:
M- the imported module Java typeD- the definition Java typeFL- the flag definition Java typeFI- the field definition Java typeA- the assembly definition Java type
- All Implemented Interfaces:
IModule,IModuleExtended<M,D, FL, FI, A>
- Direct Known Subclasses:
AbstractBoundModule
public abstract class AbstractModule<M extends IModuleExtended<M,D,FL,FI,A>,D extends IModelDefinition,FL extends IFlagDefinition,FI extends IFieldDefinition,A extends IAssemblyDefinition>
extends Object
implements IModuleExtended<M,D,FL,FI,A>
Provides a common, abstract implementation of a
IModule.-
Constructor Summary
ConstructorsConstructorDescriptionAbstractModule(List<? extends M> importedModules) Construct a new Metaschema module object. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the exported named assembly definition, if it exists.Retrieve the top-level assembly definitions that are marked global in this Metaschema module or in any imported Metaschema module.Retrieves the exported named field definition, if it exists.Retrieve the top-level field definitions that are marked global in this Metaschema module or in any imported Metaschema module.Retrieves the exported named flag definition, if it exists.Retrieve the top-level flag definitions that are marked global in this Metaschema module or in any imported Metaschema modules.Retrieves the exported named root assembly definition, if it exists.Retrieve the imported Metaschema module with the specified name, if it exists.Retrieves all Metaschema modules imported by this Metaschema module.getQName()Get the qualified name associated with the Metaschema module.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.IModule
getJsonBaseUri, getLocation, getLocationHint, getModuleStaticContext, getName, getNamespaceBindings, getRemarks, getShortName, getSource, getVersion, getXmlNamespaceMethods inherited from interface dev.metaschema.core.model.IModuleExtended
getAssemblyAndFieldDefinitions, getAssemblyDefinitionByName, getAssemblyDefinitions, getExportedRootAssemblyDefinitions, getFieldDefinitionByName, getFieldDefinitions, getFlagDefinitionByName, getFlagDefinitions, getRootAssemblyDefinitions, getScopedAssemblyDefinitionByName, getScopedFieldDefinitionByName, getScopedFlagDefinitionByName
-
Constructor Details
-
AbstractModule
Construct a new Metaschema module object.- Parameters:
importedModules- the collection of Metaschema module objects this Metaschema module imports
-
-
Method Details
-
getQName
Description copied from interface:IModuleGet the qualified name associated with the Metaschema module. -
getImportedModules
Description copied from interface:IModuleRetrieves all Metaschema modules imported by this Metaschema module.- Specified by:
getImportedModulesin interfaceIModule- Specified by:
getImportedModulesin interfaceIModuleExtended<M extends IModuleExtended<M,D, FL, FI, A>, D extends IModelDefinition, FL extends IFlagDefinition, FI extends IFieldDefinition, A extends IAssemblyDefinition> - Returns:
- a list of imported Metaschema modules
-
getImportedModuleByShortName
Description copied from interface:IModuleRetrieve the imported Metaschema module with the specified name, if it exists.- Specified by:
getImportedModuleByShortNamein interfaceIModule- Specified by:
getImportedModuleByShortNamein interfaceIModuleExtended<M extends IModuleExtended<M,D, FL, FI, A>, D extends IModelDefinition, FL extends IFlagDefinition, FI extends IFieldDefinition, A extends IAssemblyDefinition> - Parameters:
name- the short name of the Metschema module to retrieve- Returns:
- the imported Metaschema module or
nullif it doesn't exist
-
getExportedFlagDefinitions
Description copied from interface:IModuleRetrieve the top-level flag definitions that are marked global in this Metaschema module or in any imported Metaschema modules. The resulting collection is built by adding global definitions from each imported Metaschema module in order of import, then adding global definitions from the current Metaschema module. Such a map is built in this way for each imported Metaschema module in the chain. Values for clashing keys will be replaced in this order, giving preference to the "closest" definition.- Specified by:
getExportedFlagDefinitionsin interfaceIModule- Specified by:
getExportedFlagDefinitionsin interfaceIModuleExtended<M extends IModuleExtended<M,D, FL, FI, A>, D extends IModelDefinition, FL extends IFlagDefinition, FI extends IFieldDefinition, A extends IAssemblyDefinition> - Returns:
- the collection of exported flag definitions
-
getExportedFlagDefinitionByName
Description copied from interface:IModuleRetrieves the exported named flag definition, if it exists.For information about how flag definitions are exported see
IModule.getExportedFlagDefinitions().- Specified by:
getExportedFlagDefinitionByNamein interfaceIModule- Specified by:
getExportedFlagDefinitionByNamein interfaceIModuleExtended<M extends IModuleExtended<M,D, FL, FI, A>, D extends IModelDefinition, FL extends IFlagDefinition, FI extends IFieldDefinition, A extends IAssemblyDefinition> - Parameters:
name- the definition name- Returns:
- the flag definition, or
nullif it doesn't exist.
-
getExportedFieldDefinitions
Description copied from interface:IModuleRetrieve the top-level field definitions that are marked global in this Metaschema module or in any imported Metaschema module. The resulting collection is built by adding global definitions from each imported Metaschema module in order of import, then adding global definitions from the current Metaschema module. Such a map is built in this way for each imported Metaschema module in the chain. Values for clashing keys will be replaced in this order, giving preference to the "closest" definition- Specified by:
getExportedFieldDefinitionsin interfaceIModule- Specified by:
getExportedFieldDefinitionsin interfaceIModuleExtended<M extends IModuleExtended<M,D, FL, FI, A>, D extends IModelDefinition, FL extends IFlagDefinition, FI extends IFieldDefinition, A extends IAssemblyDefinition> - Returns:
- the collection of exported field definitions
-
getExportedFieldDefinitionByName
Description copied from interface:IModuleRetrieves the exported named field definition, if it exists.For information about how field definitions are exported see
IModule.getExportedFieldDefinitions().- Specified by:
getExportedFieldDefinitionByNamein interfaceIModule- Specified by:
getExportedFieldDefinitionByNamein interfaceIModuleExtended<M extends IModuleExtended<M,D, FL, FI, A>, D extends IModelDefinition, FL extends IFlagDefinition, FI extends IFieldDefinition, A extends IAssemblyDefinition> - Parameters:
name- the definition name- Returns:
- the field definition, or
nullif it doesn't exist.
-
getExportedAssemblyDefinitions
Description copied from interface:IModuleRetrieve the top-level assembly definitions that are marked global in this Metaschema module or in any imported Metaschema module. The resulting collection is built by adding global definitions from each imported Metaschema module in order of import, then adding global definitions from the current Metaschema module. This collection is built in this way for each imported Metaschema module in the chain. Items with duplicate names will be replaced in this order, giving preference to the "closest" definition- Specified by:
getExportedAssemblyDefinitionsin interfaceIModule- Specified by:
getExportedAssemblyDefinitionsin interfaceIModuleExtended<M extends IModuleExtended<M,D, FL, FI, A>, D extends IModelDefinition, FL extends IFlagDefinition, FI extends IFieldDefinition, A extends IAssemblyDefinition> - Returns:
- the collection of exported assembly definitions
-
getExportedAssemblyDefinitionByName
Description copied from interface:IModuleRetrieves the exported named assembly definition, if it exists.For information about how assembly definitions are exported see
IModule.getExportedAssemblyDefinitions().- Specified by:
getExportedAssemblyDefinitionByNamein interfaceIModule- Specified by:
getExportedAssemblyDefinitionByNamein interfaceIModuleExtended<M extends IModuleExtended<M,D, FL, FI, A>, D extends IModelDefinition, FL extends IFlagDefinition, FI extends IFieldDefinition, A extends IAssemblyDefinition> - Parameters:
name- the definition name- Returns:
- the assembly definition, or
nullif it doesn't exist.
-
getExportedRootAssemblyDefinitionByName
Description copied from interface:IModuleRetrieves the exported named root assembly definition, if it exists.For information about how assembly definitions are exported see
IModule.getExportedAssemblyDefinitions().- Specified by:
getExportedRootAssemblyDefinitionByNamein interfaceIModule- Parameters:
name- the root name- Returns:
- the assembly definition, or
nullif it doesn't exist.
-