Interface IModule

    • Method Detail

      • allNonLocalDefinitions

        static <DEF extends IDefinitionPredicate<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 IDefinitionPredicate<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
      • getLocation

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

        default QName getQName()
        Get the qualified name associated with the Metaschema module.
        Returns:
        the qualified name
      • getImportedModules

        @NonNull
        List<? extends IModulegetImportedModules()
        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
      • getAssemblyDefinitionByName

        @Nullable
        IAssemblyDefinition getAssemblyDefinitionByName​(@NonNull
                                                        String 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
      • getFieldDefinitionByName

        @Nullable
        IFieldDefinition getFieldDefinitionByName​(@NonNull
                                                  String 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
        default List<? extends IFlagContainergetAssemblyAndFieldDefinitions()
        Retrieves the top-level assembly and field definitions in this Metaschema module.
        Returns:
        a listing of assembly and field definitions
      • getFlagDefinitionByName

        @Nullable
        IFlagDefinition getFlagDefinitionByName​(@NonNull
                                                String 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
        default IAssemblyDefinition getScopedAssemblyDefinitionByName​(@NonNull
                                                                      String 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
        default IFieldDefinition getScopedFieldDefinitionByName​(@NonNull
                                                                String 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
        default IFlagDefinition getScopedFlagDefinitionByName​(@NonNull
                                                              String 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
      • getExportedRootAssemblyDefinitions

        @NonNull
        default Collection<? extends IAssemblyDefinitiongetExportedRootAssemblyDefinitions()
        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
      • getRootAssemblyDefinitions

        @NonNull
        default Collection<? extends IAssemblyDefinitiongetRootAssemblyDefinitions()
        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 IFlagDefinitiongetExportedFlagDefinitions()
        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
      • getExportedFieldDefinitions

        @NonNull
        Collection<? extends IFieldDefinitiongetExportedFieldDefinitions()
        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
      • getExportedAssemblyDefinitions

        @NonNull
        Collection<? extends IAssemblyDefinitiongetExportedAssemblyDefinitions()
        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