Class IModelAccess

java.lang.Object
net.ssehub.easy.integration.common.IModelAccess
net.ssehub.easy.integration.common.eclipse.IModelAccess

public abstract class IModelAccess extends net.ssehub.easy.integration.common.IModelAccess
A basic class providing access to models. Specific tool integrations shall add specific methods on how to access or even create models.
Author:
Holger Eichelberger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.eclipse.core.runtime.IPath
    absoluteToWorkspaceRoot(org.eclipse.core.runtime.IPath path)
    Makes the given project-relative path absolute to the workspace root.
    List<net.ssehub.easy.integration.common.IModelInfo>
    getAvailableModels(org.eclipse.core.resources.IProject project)
    Returns the models which are available for and visible from project.
    net.ssehub.easy.integration.common.IModelInfo
    getMostRecentTopLevelModel(org.eclipse.core.resources.IProject project)
    Returns the most recent (regarding its version number) top-level model.
    List<net.ssehub.easy.integration.common.IModelInfo>
    getTopLevelModels(org.eclipse.core.resources.IProject project)
    Returns the top-level models in project according to EASy conventions.
    protected net.ssehub.easy.varModel.model.Project
    obtainProject(net.ssehub.easy.integration.common.IModelInfo info)
    Obtains a project.
    void
    updateModelInfo(org.eclipse.core.resources.IProject project)
    Updates the available model information in project.

    Methods inherited from class net.ssehub.easy.integration.common.IModelAccess

    checkInfo, createInfo, getInfo, getMostRecentModel, matchesOrigin

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IModelAccess

      public IModelAccess()
  • Method Details

    • absoluteToWorkspaceRoot

      public static org.eclipse.core.runtime.IPath absoluteToWorkspaceRoot(org.eclipse.core.runtime.IPath path)
      Makes the given project-relative path absolute to the workspace root.
      Parameters:
      path - the path to make absolute
      Returns:
      the absolute path
    • getMostRecentTopLevelModel

      public net.ssehub.easy.integration.common.IModelInfo getMostRecentTopLevelModel(org.eclipse.core.resources.IProject project)
      Returns the most recent (regarding its version number) top-level model.
      Parameters:
      project - the project to return the modle for
      Returns:
      the most recent model (may be null if there is none)
    • getTopLevelModels

      public List<net.ssehub.easy.integration.common.IModelInfo> getTopLevelModels(org.eclipse.core.resources.IProject project)
      Returns the top-level models in project according to EASy conventions.
      Parameters:
      project - the project to return the default models for
      Returns:
      the top-level models as considered by EASy
    • getAvailableModels

      public List<net.ssehub.easy.integration.common.IModelInfo> getAvailableModels(org.eclipse.core.resources.IProject project)
      Returns the models which are available for and visible from project. The result of this method may change over time, e.g. when models are created.
      Parameters:
      project - the project where to start searching / considering models
      Returns:
      the model information objects representing available projects
    • obtainProject

      protected net.ssehub.easy.varModel.model.Project obtainProject(net.ssehub.easy.integration.common.IModelInfo info) throws net.ssehub.easy.integration.common.ModelException
      Obtains a project.
      Overrides:
      obtainProject in class net.ssehub.easy.integration.common.IModelAccess
      Parameters:
      info - the model information instance representing the project to obtain
      Returns:
      the project instance
      Throws:
      net.ssehub.easy.integration.common.ModelException - in case of errors during obtaining/loading the model
      IllegalArgumentException - in case that info is null or does not match to this implementation
    • updateModelInfo

      public void updateModelInfo(org.eclipse.core.resources.IProject project) throws net.ssehub.easy.integration.common.ModelException
      Updates the available model information in project.
      Parameters:
      project - the project to update the information for
      Throws:
      net.ssehub.easy.integration.common.ModelException - in case of errors during the update