Class ModelConnector


  • public class ModelConnector
    extends java.lang.Object
    This class is used to get information out of the variability model that cannot be accessed via the ECore model directly. This connector is required to display information in the outline view appropriately.
    Author:
    kroeher
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String CONSTRAINT_ENDING  
      private de.uni_hildesheim.sse.ivml.Project ivmlProject  
    • Constructor Summary

      Constructors 
      Constructor Description
      ModelConnector()
      The constructor of the model connector.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addIvmlProject​(de.uni_hildesheim.sse.ivml.Project iProject)
      Add the IVML (Ecore) project to the connector, which is required to get (and load) to corresponding variability model project.
      private java.lang.String beautifyConstraintString​(java.lang.String constraint)  
      java.lang.String getConstraint​(int numOfConstraint)  
      java.lang.String[] getEvaluationBlocksElements​(int evalNum)
      Returns the set of evaluation block elements of an evaluation expression.
      java.lang.String getTypeDefRestriction​(java.lang.String typeName)  
      private Project getVarModelProject()
      This method returns the project of the variability model based on the added IVML model project.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ivmlProject

        private de.uni_hildesheim.sse.ivml.Project ivmlProject
      • CONSTRAINT_ENDING

        private static final java.lang.String CONSTRAINT_ENDING
        See Also:
        Constant Field Values
    • Constructor Detail

      • ModelConnector

        public ModelConnector()
        The constructor of the model connector.
    • Method Detail

      • addIvmlProject

        public void addIvmlProject​(de.uni_hildesheim.sse.ivml.Project iProject)
        Add the IVML (Ecore) project to the connector, which is required to get (and load) to corresponding variability model project.
        Parameters:
        iProject - The IVML project for which information should be retrieved
      • getEvaluationBlocksElements

        public java.lang.String[] getEvaluationBlocksElements​(int evalNum)
        Returns the set of evaluation block elements of an evaluation expression. The evaluation expression is identified by the number of its occurrence in the IVML file. More precise, if the elements of the second evaluation expression shall be returned, add "2" as a parameter to this method.
        Parameters:
        evalNum - The number of the evaluation expression for which the elements should be returned.
        Returns:
        A String array including all evaluation block elements or null if no element is included.
      • beautifyConstraintString

        private java.lang.String beautifyConstraintString​(java.lang.String constraint)
      • getConstraint

        public java.lang.String getConstraint​(int numOfConstraint)
      • getTypeDefRestriction

        public java.lang.String getTypeDefRestriction​(java.lang.String typeName)
      • getVarModelProject

        private Project getVarModelProject()
        This method returns the project of the variability model based on the added IVML model project. If the project is currently not loaded, it will load the project as well.
        Returns:
        the variability model project.