Interface IModule

All Known Subinterfaces:
IMetaschemaModule<SELF>, IModuleExtended<M,D,FL,FI,A>
All Known Implementing Classes:
AbstractModule

public interface IModule
Represents a Metaschema module.
  • Method Details

    • getLocation

      Retrieves the location where the Metaschema module was loaded from.
      Returns:
      the location, or null if this information is not available
    • 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

      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

      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

      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

      Retrieves the top-level assembly definitions in this Metaschema module.
      Returns:
      the collection of assembly definitions
    • getAssemblyDefinitionByName

      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

      Retrieves the top-level field definitions in this Metaschema module.
      Returns:
      the collection of field definitions
    • getFieldDefinitionByName

      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

      Retrieves the top-level assembly and field definitions in this Metaschema module.
      Returns:
      a listing of assembly and field definitions
    • getFlagDefinitions

      Retrieves the top-level flag definitions in this Metaschema module.
      Returns:
      the collection of flag definitions
    • getFlagDefinitionByName

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      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

      Get the mapping of prefix to namespace URI for use in resolving the namespace of lexical qualified named in Metapath.
      Returns:
      the mapping
    • getModuleStaticContext

      Get the Metapath static context for compiling Metapath expressions that query instances of this model.
      Returns:
      the static context