Class ProjectContainer

  • All Implemented Interfaces:
    net.ssehub.easy.basics.modelManagement.IModelData, net.ssehub.easy.basics.modelManagement.IModelListener<net.ssehub.easy.varModel.model.Project>

    public class ProjectContainer
    extends ModelContainer<net.ssehub.easy.varModel.model.Project>
    ModelContainer for holding a Project and its configuration.
    Author:
    El-Sharkawy
    • Field Detail

      • config

        private net.ssehub.easy.varModel.confModel.Configuration config
    • Constructor Detail

      • ProjectContainer

        public ProjectContainer​(net.ssehub.easy.varModel.model.Project project,
                                Configuration location)
        Default constructor for a created of loaded Project.
        Parameters:
        project - A valid project, which shall be managed by this ModelContainer.
        location - The location (folder) of the managed project.
      • ProjectContainer

        public ProjectContainer​(net.ssehub.easy.varModel.model.Project project,
                                SemanticErrorDescription description,
                                Configuration location)
        Constructor if an Exception occurred during parsing the Project. The Project can be used but not be saved, as long the semantic error is not solved.
        Parameters:
        project - The Project, which should be managed by this container.
        description - description A description of an occurred semantic error while parsing the Project. Can be null, then this constructor has the same behavior as #ProjectContainer(Project).
        location - The location (folder) of the managed project.
    • Method Detail

      • notifyReplaced

        public void notifyReplaced​(net.ssehub.easy.varModel.model.Project oldProject,
                                   net.ssehub.easy.varModel.model.Project newProject)
        If this method is called, the stored ModelContainer.getDescription() will be set to null as this is usually only called if the parser has parsed the model successfully.
        Specified by:
        notifyReplaced in interface net.ssehub.easy.basics.modelManagement.IModelListener<net.ssehub.easy.varModel.model.Project>
        Overrides:
        notifyReplaced in class ModelContainer<net.ssehub.easy.varModel.model.Project>
      • getConfiguration

        public net.ssehub.easy.varModel.confModel.Configuration getConfiguration()
        Returns the configuration related to the stored Project.
        Returns:
        the configuration related to the stored Project.
        See Also:
        ModelContainer.getModel()
      • getLocation

        public java.io.File getLocation()
        Description copied from class: ModelContainer
        Returns the location, where the model is loaded from.
        Specified by:
        getLocation in class ModelContainer<net.ssehub.easy.varModel.model.Project>
        Returns:
        The location of the loaded model.