Interface IModule

All Known Subinterfaces:
IBindingMetaschemaModule, IBoundModule, IMetaschemaModule<SELF>, IModuleExtended<M,D,FL,FI,A>
All Known Implementing Classes:
AbstractBoundModule, AbstractModule, MetaschemaBindingsModule, MetaschemaModelModule, MetaschemaTestSuiteModule

public interface IModule
Represents a Metaschema module.
  • Method Details

    • getLocation

      URI getLocation()
      Retrieves the location where the Metaschema module was loaded from.
      Returns:
      the location, or null if this information is not available
    • getLocationHint

      @NonNull String getLocationHint()
      Get a hint about where the source is location.

      This value will typically be a URI or class name.

      Returns:
      the hint
    • getSource

      @NonNull ISource getSource()
      Get the source information for the module.
      Returns:
      the source information
    • getName

      @NonNull MarkupLine getName()
      Get the long name for the Metaschema module.
      Returns:
      the name
    • getVersion

      @NonNull String getVersion()
      Get the revision of the Metaschema module.
      Returns:
      the revision
    • getRemarks

      @Nullable MarkupMultiline getRemarks()
      Retrieve the remarks associated with this Metaschema module, if any.
      Returns:
      the remarks or null if no remarks are defined
    • getShortName

      @NonNull String getShortName()
      Retrieves the unique short name for the Metaschema module, which provides a textual identifier for the Metaschema module.
      Returns:
      the short name
    • getXmlNamespace

      @NonNull URI getXmlNamespace()
      Retrieves the XML namespace associated with the Metaschema module.
      Returns:
      a namespace
    • getJsonBaseUri

      @NonNull URI getJsonBaseUri()
      Retrieve the JSON schema base URI associated with the Metaschema module.
      Returns:
      the base URI
    • getQName

      @NonNull IEnhancedQName getQName()
      Get the qualified name associated with the Metaschema module.
      Returns:
      the qualified name
    • getImportedModules

      @NonNull List<? extends IModule> getImportedModules()
      Retrieves all Metaschema modules imported by this Metaschema module.
      Returns:
      a list of imported Metaschema modules
    • getImportedModuleByShortName

      @Nullable IModule getImportedModuleByShortName(String name)
      Retrieve the imported Metaschema module with the specified name, if it exists.
      Parameters:
      name - the short name of the Metschema module to retrieve
      Returns:
      the imported Metaschema module or null if it doesn't exist
    • getAssemblyDefinitions

      @NonNull Collection<? extends IAssemblyDefinition> getAssemblyDefinitions()
      Retrieves the top-level assembly definitions in this Metaschema module.
      Returns:
      the collection of assembly definitions
    • getAssemblyDefinitionByName

      @Nullable IAssemblyDefinition getAssemblyDefinitionByName(@NonNull Integer name)
      Retrieves the top-level assembly definition in this Metaschema module with the matching name, if it exists.
      Parameters:
      name - the definition name
      Returns:
      the matching assembly definition, or null if none match
    • getFieldDefinitions

      @NonNull Collection<? extends IFieldDefinition> getFieldDefinitions()
      Retrieves the top-level field definitions in this Metaschema module.
      Returns:
      the collection of field definitions
    • getFieldDefinitionByName

      @Nullable IFieldDefinition getFieldDefinitionByName(@NonNull Integer name)
      Retrieves the top-level field definition in this Metaschema module with the matching name, if it exists.
      Parameters:
      name - the definition name
      Returns:
      the matching field definition, or null if none match
    • getAssemblyAndFieldDefinitions

      @NonNull List<? extends IModelDefinition> getAssemblyAndFieldDefinitions()
      Retrieves the top-level assembly and field definitions in this Metaschema module.
      Returns:
      a listing of assembly and field definitions
    • getFlagDefinitions

      @NonNull Collection<? extends IFlagDefinition> getFlagDefinitions()
      Retrieves the top-level flag definitions in this Metaschema module.
      Returns:
      the collection of flag definitions
    • getFlagDefinitionByName

      @Nullable IFlagDefinition getFlagDefinitionByName(@NonNull IEnhancedQName name)
      Retrieves the top-level flag definition in this Metaschema module with the matching name, if it exists.
      Parameters:
      name - the definition name
      Returns:
      the matching flag definition, or null if none match
    • getScopedAssemblyDefinitionByName

      @Nullable IAssemblyDefinition getScopedAssemblyDefinitionByName(@NonNull Integer name)
      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.
      Parameters:
      name - the name of the assembly to find
      Returns:
      the assembly definition
    • getScopedFieldDefinitionByName

      @Nullable IFieldDefinition getScopedFieldDefinitionByName(@NonNull Integer name)
      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.
      Parameters:
      name - the name of the field definition to find
      Returns:
      the field definition
    • getScopedFlagDefinitionByName

      @Nullable IFlagDefinition getScopedFlagDefinitionByName(@NonNull IEnhancedQName name)
      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.
      Parameters:
      name - the name of the flag definition to find
      Returns:
      the flag definition
    • getRootAssemblyDefinitions

      @NonNull Collection<? extends IAssemblyDefinition> getRootAssemblyDefinitions()
      Retrieves the top-level assembly definitions that are marked as roots from the current Metaschema module.
      Returns:
      a listing of assembly definitions marked as root
    • getExportedFlagDefinitions

      @NonNull Collection<? extends IFlagDefinition> getExportedFlagDefinitions()
      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.
      Returns:
      the collection of exported flag definitions
    • getExportedFlagDefinitionByName

      @Nullable IFlagDefinition getExportedFlagDefinitionByName(@NonNull IEnhancedQName name)
      Retrieves the exported named flag definition, if it exists.

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

      Parameters:
      name - the definition name
      Returns:
      the flag definition, or null if it doesn't exist.
    • getExportedFieldDefinitions

      @NonNull Collection<? extends IFieldDefinition> getExportedFieldDefinitions()
      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
      Returns:
      the collection of exported field definitions
    • getExportedFieldDefinitionByName

      @Nullable IFieldDefinition getExportedFieldDefinitionByName(@NonNull Integer name)
      Retrieves the exported named field definition, if it exists.

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

      Parameters:
      name - the definition name
      Returns:
      the field definition, or null if it doesn't exist.
    • getExportedAssemblyDefinitions

      @NonNull Collection<? extends IAssemblyDefinition> getExportedAssemblyDefinitions()
      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
      Returns:
      the collection of exported assembly definitions
    • getExportedAssemblyDefinitionByName

      @Nullable IAssemblyDefinition getExportedAssemblyDefinitionByName(@NonNull Integer name)
      Retrieves the exported named assembly definition, if it exists.

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

      Parameters:
      name - the definition name
      Returns:
      the assembly definition, or null if it doesn't exist.
    • getExportedRootAssemblyDefinitions

      @NonNull Collection<? extends IAssemblyDefinition> getExportedRootAssemblyDefinitions()
      Retrieves the top-level assembly definitions that are marked as roots from the current Metaschema module and any imported Metaschema modules.
      Returns:
      a listing of assembly definitions marked as root
    • getExportedRootAssemblyDefinitionByName

      @Nullable IAssemblyDefinition getExportedRootAssemblyDefinitionByName(Integer name)
      Retrieves the exported named root assembly definition, if it exists.

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

      Parameters:
      name - the root name
      Returns:
      the assembly definition, or null if it doesn't exist.
    • getNamespaceBindings

      @NonNull Map<String,String> getNamespaceBindings()
      Get the mapping of prefix to namespace URI for use in resolving the namespace of lexical qualified named in Metapath.
      Returns:
      the mapping
    • getModuleStaticContext

      @NonNull StaticContext getModuleStaticContext()
      Get the Metapath static context for compiling Metapath expressions that query instances of this model.
      Returns:
      the static context