Interface IModelRepository<M extends IModel>

  • Type Parameters:
    M - the specific type of model
    All Known Implementing Classes:
    ModelRepository

    public interface IModelRepository<M extends IModel>
    Defines the interface of a model repository.
    Author:
    Holger Eichelberger
    • 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