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 Summary
Modifier and TypeMethodDescriptioncreateModel(String modelName, List<M> imports) Creates an ad-hoc model with given models as imports.getAvailable(String name) Returns models available for a given modelname.Returns the default library locations.getLocationFor(URI uri) Returns the location foruri.getMatchingModelNames(String name) Returns the matching model names for a potential wildcard name.getModelInfo(String name, Version version, URI uri) Returns a known model information object via its URI.booleanisOutdated(ModelInfo<M> info) Returns whether a model information is outdated.Loads the model related toinfowith a new default import resolver.Loads the model related toinfowith the given import resolver.
-
Method Details
-
getAvailable
Returns models available for a given modelname.- Parameters:
name- the name to search for- Returns:
- the available model or null
-
getDefaultLibraryLocations
List<ModelLocations.Location> getDefaultLibraryLocations()Returns the default library locations.- Returns:
- the default library locations
-
isOutdated
Returns whether a model information is outdated.- Parameters:
info- the object to be tested- Returns:
trueif it is outdated,falseelse
-
load
Loads the model related toinfowith a new default import resolver.- Parameters:
info- the model info to load the model formessages- the messages collected so far (modified as a side effect)- Returns:
- the loaded model or null
-
load
Loads the model related toinfowith the given import resolver.- Parameters:
info- the model info to load the model forresolver- 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
Returns a known model information object via its URI.- Parameters:
name- the name of the model to search forversion- the version of the model to search foruri- the URI to search for- Returns:
- the related model information object (or null if not found)
-
getLocationFor
Returns the location foruri.- Parameters:
uri- the URI to search for- Returns:
- the related location
-
getMatchingModelNames
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
Creates an ad-hoc model with given models as imports.- Parameters:
modelName- the model nameimports- the imports- Returns:
- the model instance
-