Interface IModelRepository<M extends IModel>

    • Method Detail

      • getAvailable

        java.util.List<VersionedModelInfos<M>> getAvailable​(java.lang.String name)
        Returns models available for a given model name.
        Parameters:
        name - the name to search for
        Returns:
        the available model or null
      • isOutdated

        boolean isOutdated​(ModelInfo<M> info)
        Returns whether a model information is outdated.
        Parameters:
        info - the object to be tested
        Returns:
        true if it is outdated, false else
      • load

        M load​(ModelInfo<M> info,
               java.util.List<IMessage> messages)
        Loads the model related to info with a new default import resolver.
        Parameters:
        info - the model info to load the model for
        messages - the messages collected so far (modified as a side effect)
        Returns:
        the loaded model or null
      • load

        M load​(ModelInfo<M> info,
               ImportResolver<M> resolver,
               java.util.List<IMessage> messages)
        Loads the model related to info with the given import resolver.
        Parameters:
        info - the model info to load the model for
        resolver - the import resolver to use (null for a new default resolver)
        messages - the messages collected so far (modified as a side effect)
        Returns:
        the loaded model or null
      • getModelInfo

        ModelInfo<M> getModelInfo​(java.lang.String name,
                                  Version version,
                                  java.net.URI uri)
        Returns a known model information object via its URI.
        Parameters:
        name - the name of the model to search for
        version - the version of the model to search for
        uri - the URI to search for
        Returns:
        the related model information object (or null if not found)
      • getLocationFor

        ModelLocations.Location getLocationFor​(java.net.URI uri)
        Returns the location for uri.
        Parameters:
        uri - the URI to search for
        Returns:
        the related location
      • getMatchingModelNames

        java.util.List<java.lang.String> getMatchingModelNames​(java.lang.String name)
        Returns the matching model names for a potential wildcard name.
        Parameters:
        name - the name to return the matches for
        Returns:
        if name is a wildcard name, all known matching names; else, name
      • createModel

        M createModel​(java.lang.String modelName,
                      java.util.List<M> imports)
        Creates an ad-hoc model with given models as imports.
        Parameters:
        modelName - the model name
        imports - the imports
        Returns:
        the model instance