Class ModelInfo


  • public class ModelInfo
    extends java.lang.Object
    General introspective information about the (meta-)model.
    Author:
    Holger Eichelberger, SSE
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.Map<net.ssehub.easy.varModel.model.Project,​java.lang.Boolean> metaProjects  
    • Constructor Summary

      Constructors 
      Constructor Description
      ModelInfo()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static boolean contains​(java.io.File folder, java.lang.String file)
      Returns whether folder contains a file with name file.
      static java.lang.String getCommentSafe​(net.ssehub.easy.varModel.model.ModelElement elt)
      Returns the comment of elt.
      static java.lang.String getFileName​(net.ssehub.easy.varModel.model.Project prj)
      Returns the conventional file name of a project.
      static java.util.Locale getLocale()
      Returns the actual local.
      static boolean hasComment​(net.ssehub.easy.varModel.model.ModelElement elt)
      Returns whether elt has a comment/description.
      static boolean isMetaProject​(net.ssehub.easy.varModel.model.Project prj)
      Returns whether prj is a meta project, i.e., one defining the IIPEcosphere meta model.
      • Methods inherited from class java.lang.Object

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

      • metaProjects

        private static java.util.Map<net.ssehub.easy.varModel.model.Project,​java.lang.Boolean> metaProjects
    • Constructor Detail

      • ModelInfo

        public ModelInfo()
    • Method Detail

      • getFileName

        public static java.lang.String getFileName​(net.ssehub.easy.varModel.model.Project prj)
        Returns the conventional file name of a project.
        Parameters:
        prj - the project
        Returns:
        the file name
      • isMetaProject

        public static boolean isMetaProject​(net.ssehub.easy.varModel.model.Project prj)
        Returns whether prj is a meta project, i.e., one defining the IIPEcosphere meta model.
        Parameters:
        prj - the project to check
        Returns:
        true for meta project, false if it is no meta but probably a configuration project.
      • contains

        private static boolean contains​(java.io.File folder,
                                        java.lang.String file)
        Returns whether folder contains a file with name file.
        Parameters:
        folder - the folder
        file - the file name
        Returns:
        true if folder contains a file with name file, false else
      • hasComment

        public static boolean hasComment​(net.ssehub.easy.varModel.model.ModelElement elt)
        Returns whether elt has a comment/description.
        Parameters:
        elt - the element to look for
        Returns:
        the comment
        See Also:
        getCommentSafe(ModelElement)
      • getCommentSafe

        public static java.lang.String getCommentSafe​(net.ssehub.easy.varModel.model.ModelElement elt)
        Returns the comment of elt.
        Parameters:
        elt - the comment
        Returns:
        the comment, may be empty for none
      • getLocale

        public static java.util.Locale getLocale()
        Returns the actual local.
        Returns:
        the locale