Interface IModuleExtended<M extends IModuleExtended<M,D,FL,FI,A>,D extends IModelDefinition,FL extends IFlagDefinition,FI extends IFieldDefinition,A extends IAssemblyDefinition>

Type Parameters:
M - the imported module Java type
D - the model definition Java type
FL - the flag definition Java type
FI - the field definition Java type
A - the assembly definition Java type
All Superinterfaces:
IModule
All Known Subinterfaces:
IBindingMetaschemaModule, IBoundModule, IMetaschemaModule<SELF>
All Known Implementing Classes:
AbstractBoundModule, AbstractModule, MetaschemaBindingsModule, MetaschemaModelModule, MetaschemaTestSuiteModule

public interface IModuleExtended<M extends IModuleExtended<M,D,FL,FI,A>,D extends IModelDefinition,FL extends IFlagDefinition,FI extends IFieldDefinition,A extends IAssemblyDefinition> extends IModule
The API for accessing information about a given Metaschema module.

A Metaschem module may import another Metaschema module. This import graph can be accessed using getImportedModules().

Global scoped Metaschema definitions can be accessed using getScopedAssemblyDefinitionByName(Integer), getScopedFieldDefinitionByName(Integer), and getScopedFlagDefinitionByName(IEnhancedQName). These methods take into consideration the import order to provide the global definitions that are in scope within the given Metschema module.

Global scoped definitions exported by this Metaschema module, available for use by importing Metaschema modules, can be accessed using getExportedAssemblyDefinitions(), getExportedFieldDefinitions(), and getExportedFlagDefinitions().

Global scoped definitions defined directly within the given Metaschema module can be accessed using getAssemblyDefinitions(), getFieldDefinitions(), and getFlagDefinitions(), along with similarly named access methods.

  • Method Details

    • allNonLocalDefinitions

      static <DEF extends IDefinition> Predicate<DEF> allNonLocalDefinitions()
      Get a filter that will match all definitions that are not locally defined.
      Type Parameters:
      DEF - the type of definition
      Returns:
      a predicate implementing the filter
    • allRootAssemblyDefinitions

      static <DEF extends IDefinition> Predicate<DEF> allRootAssemblyDefinitions()
      Get a filter that will match all definitions that are root assemblies.
      Type Parameters:
      DEF - the type of definition
      Returns:
      a predicate implementing the filter
    • getImportedModules

      @NonNull List<? extends M> getImportedModules()
      Description copied from interface: IModule
      Retrieves all Metaschema modules imported by this Metaschema module.
      Specified by:
      getImportedModules in interface IModule
      Returns:
      a list of imported Metaschema modules
    • getImportedModuleByShortName

      @Nullable M getImportedModuleByShortName(String name)
      Description copied from interface: IModule
      Retrieve the imported Metaschema module with the specified name, if it exists.
      Specified by:
      getImportedModuleByShortName in interface IModule
      Parameters:
      name - the short name of the Metschema module to retrieve
      Returns:
      the imported Metaschema module or null if it doesn't exist
    • getFlagDefinitions

      @NonNull Collection<FL> getFlagDefinitions()
      Description copied from interface: IModule
      Retrieves the top-level flag definitions in this Metaschema module.
      Specified by:
      getFlagDefinitions in interface IModule
      Returns:
      the collection of flag definitions
    • getFlagDefinitionByName

      @Nullable FL getFlagDefinitionByName(@NonNull IEnhancedQName name)
      Description copied from interface: IModule
      Retrieves the top-level flag definition in this Metaschema module with the matching name, if it exists.
      Specified by:
      getFlagDefinitionByName in interface IModule
      Parameters:
      name - the definition name
      Returns:
      the matching flag definition, or null if none match
    • getAssemblyDefinitions

      @NonNull Collection<A> getAssemblyDefinitions()
      Description copied from interface: IModule
      Retrieves the top-level assembly definitions in this Metaschema module.
      Specified by:
      getAssemblyDefinitions in interface IModule
      Returns:
      the collection of assembly definitions
    • getAssemblyDefinitionByName

      @Nullable A getAssemblyDefinitionByName(@NonNull Integer name)
      Description copied from interface: IModule
      Retrieves the top-level assembly definition in this Metaschema module with the matching name, if it exists.
      Specified by:
      getAssemblyDefinitionByName in interface IModule
      Parameters:
      name - the definition name
      Returns:
      the matching assembly definition, or null if none match
    • getFieldDefinitions

      @NonNull Collection<FI> getFieldDefinitions()
      Description copied from interface: IModule
      Retrieves the top-level field definitions in this Metaschema module.
      Specified by:
      getFieldDefinitions in interface IModule
      Returns:
      the collection of field definitions
    • getFieldDefinitionByName

      @Nullable FI getFieldDefinitionByName(@NonNull Integer name)
      Description copied from interface: IModule
      Retrieves the top-level field definition in this Metaschema module with the matching name, if it exists.
      Specified by:
      getFieldDefinitionByName in interface IModule
      Parameters:
      name - the definition name
      Returns:
      the matching field definition, or null if none match
    • getAssemblyAndFieldDefinitions

      @NonNull default List<D> getAssemblyAndFieldDefinitions()
      Description copied from interface: IModule
      Retrieves the top-level assembly and field definitions in this Metaschema module.
      Specified by:
      getAssemblyAndFieldDefinitions in interface IModule
      Returns:
      a listing of assembly and field definitions
    • getScopedAssemblyDefinitionByName

      @Nullable default A getScopedAssemblyDefinitionByName(@NonNull Integer name)
      Description copied from interface: IModule
      Retrieves the assembly definition with a matching name from either: 1) the top-level assembly definitions from this Metaschema module, or 2) global assembly definitions from each imported Metaschema module in reverse order of import.
      Specified by:
      getScopedAssemblyDefinitionByName in interface IModule
      Parameters:
      name - the name of the assembly to find
      Returns:
      the assembly definition
    • getScopedFieldDefinitionByName

      @Nullable default FI getScopedFieldDefinitionByName(@NonNull Integer name)
      Description copied from interface: IModule
      Retrieves the field definition with a matching name from either: 1) the top-level field definitions from this Metaschema module, or 2) global field definitions from each imported Metaschema module in reverse order of import.
      Specified by:
      getScopedFieldDefinitionByName in interface IModule
      Parameters:
      name - the name of the field definition to find
      Returns:
      the field definition
    • getScopedFlagDefinitionByName

      @Nullable default FL getScopedFlagDefinitionByName(@NonNull IEnhancedQName name)
      Description copied from interface: IModule
      Retrieves the flag definition with a matching name from either: 1) the top-level flag definitions from this Metaschema module, or 2) global flag definitions from each imported Metaschema module in reverse order of import.
      Specified by:
      getScopedFlagDefinitionByName in interface IModule
      Parameters:
      name - the name of the flag definition to find
      Returns:
      the flag definition
    • getExportedRootAssemblyDefinitions

      @NonNull default Collection<? extends A> getExportedRootAssemblyDefinitions()
      Description copied from interface: IModule
      Retrieves the top-level assembly definitions that are marked as roots from the current Metaschema module and any imported Metaschema modules.
      Specified by:
      getExportedRootAssemblyDefinitions in interface IModule
      Returns:
      a listing of assembly definitions marked as root
    • getRootAssemblyDefinitions

      @NonNull default Collection<? extends A> getRootAssemblyDefinitions()
      Description copied from interface: IModule
      Retrieves the top-level assembly definitions that are marked as roots from the current Metaschema module.
      Specified by:
      getRootAssemblyDefinitions in interface IModule
      Returns:
      a listing of assembly definitions marked as root
    • getExportedFlagDefinitions

      @NonNull Collection<? extends FL> getExportedFlagDefinitions()
      Description copied from interface: IModule
      Retrieve 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:
      getExportedFlagDefinitions in interface IModule
      Returns:
      the collection of exported flag definitions
    • getExportedFlagDefinitionByName

      @Nullable FL getExportedFlagDefinitionByName(IEnhancedQName name)
      Description copied from interface: IModule
      Retrieves the exported named flag definition, if it exists.

      For information about how flag definitions are exported see IModule.getExportedFlagDefinitions().

      Specified by:
      getExportedFlagDefinitionByName in interface IModule
      Parameters:
      name - the definition name
      Returns:
      the flag definition, or null if it doesn't exist.
    • getExportedFieldDefinitions

      @NonNull Collection<? extends FI> getExportedFieldDefinitions()
      Description copied from interface: IModule
      Retrieve 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:
      getExportedFieldDefinitions in interface IModule
      Returns:
      the collection of exported field definitions
    • getExportedFieldDefinitionByName

      @Nullable FI getExportedFieldDefinitionByName(Integer name)
      Description copied from interface: IModule
      Retrieves the exported named field definition, if it exists.

      For information about how field definitions are exported see IModule.getExportedFieldDefinitions().

      Specified by:
      getExportedFieldDefinitionByName in interface IModule
      Parameters:
      name - the definition name
      Returns:
      the field definition, or null if it doesn't exist.
    • getExportedAssemblyDefinitions

      @NonNull Collection<? extends A> getExportedAssemblyDefinitions()
      Description copied from interface: IModule
      Retrieve 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:
      getExportedAssemblyDefinitions in interface IModule
      Returns:
      the collection of exported assembly definitions
    • getExportedAssemblyDefinitionByName

      @Nullable A getExportedAssemblyDefinitionByName(Integer name)
      Description copied from interface: IModule
      Retrieves the exported named assembly definition, if it exists.

      For information about how assembly definitions are exported see IModule.getExportedAssemblyDefinitions().

      Specified by:
      getExportedAssemblyDefinitionByName in interface IModule
      Parameters:
      name - the definition name
      Returns:
      the assembly definition, or null if it doesn't exist.