Class AbstractModelInitializer<M extends IModel>
java.lang.Object
net.ssehub.easy.basics.modelManagement.AbstractModelInitializer<M>
- Type Parameters:
M- the model type
- All Implemented Interfaces:
ModelInitializer.IModelInitializer
public abstract class AbstractModelInitializer<M extends IModel>
extends Object
implements ModelInitializer.IModelInitializer
Implements an abstract model initializer for the language parsers.
- Author:
- Holger Eichelberger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLocation(File location, ProgressObserver observer) Adds a model location to the end of the list of existing locations.voidaddLocationToFront(File location, ProgressObserver observer) Adds a model location to the beginning of the list of existing locations.protected abstract IModelLoader<M> Returns the actual model loader.protected abstract ModelManagement<M> Returns the actual model management instance.voidregisterLoader(ProgressObserver observer) Registers the default model loader instance.voidremoveLocation(File location, ProgressObserver observer) Adds a model location.static FileStrips the file and turns it to the containing folder.voidunregisterLoader(ProgressObserver observer) Unregisters the default model loader.
-
Constructor Details
-
AbstractModelInitializer
public AbstractModelInitializer()
-
-
Method Details
-
getModelManagement
Returns the actual model management instance.- Returns:
- the model management instance
-
getModelLoader
Returns the actual model loader.- Returns:
- the model loader (may be null if registration of the loader is done differently)
-
stripFile
Strips the file and turns it to the containing folder.- Parameters:
file- the file to be stripped- Returns:
- the containing folder in case of a file,
fileelse
-
addLocation
Description copied from interface:ModelInitializer.IModelInitializerAdds a model location to the end of the list of existing locations.- Specified by:
addLocationin interfaceModelInitializer.IModelInitializer- Parameters:
location- the model location. Basically, this is a folder but for serializers, this may be a file.observer- the progress observer- Throws:
ModelManagementException- in case of problems registering the location
-
addLocationToFront
public void addLocationToFront(File location, ProgressObserver observer) throws ModelManagementException Description copied from interface:ModelInitializer.IModelInitializerAdds a model location to the beginning of the list of existing locations.- Specified by:
addLocationToFrontin interfaceModelInitializer.IModelInitializer- Parameters:
location- the model location. Basically, this is a folder but for serializers, this may be a file.observer- the progress observer- Throws:
ModelManagementException- in case of problems registering the location
-
removeLocation
public void removeLocation(File location, ProgressObserver observer) throws ModelManagementException Description copied from interface:ModelInitializer.IModelInitializerAdds a model location.- Specified by:
removeLocationin interfaceModelInitializer.IModelInitializer- Parameters:
location- the model location. Basically, this is a folder but for serializers, this may be a file.observer- the progress observer- Throws:
ModelManagementException- in case of problems registering the location
-
registerLoader
Description copied from interface:ModelInitializer.IModelInitializerRegisters the default model loader instance.- Specified by:
registerLoaderin interfaceModelInitializer.IModelInitializer- Parameters:
observer- the progress observer- Throws:
ModelManagementException- in case of problems registering the location
-
unregisterLoader
Description copied from interface:ModelInitializer.IModelInitializerUnregisters the default model loader.- Specified by:
unregisterLoaderin interfaceModelInitializer.IModelInitializer- Parameters:
observer- the progress observer- Throws:
ModelManagementException- in case of problems registering the location
-