Class ImportTranslator


  • public class ImportTranslator
    extends java.lang.Object
    A class which specifically does the import translations. The methods are available for reuse.
    Author:
    Holger Eichelberger
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static net.ssehub.easy.varModel.model.ProjectImport processConflict​(de.uni_hildesheim.sse.ivml.ConflictStmt conflictStmt)
      Processes a conflict statement including import restrictions.
      static net.ssehub.easy.varModel.model.ProjectImport processConflict​(de.uni_hildesheim.sse.ivml.ConflictStmt conflictStmt, ExpressionTranslator translator, TypeContext context)
      Processes a conflict statement including import restrictions.
      static net.ssehub.easy.varModel.model.ProjectImport processImport​(de.uni_hildesheim.sse.ivml.ImportStmt importStmt)
      Processes an import statement including import restrictions.
      static net.ssehub.easy.varModel.model.ProjectImport processImport​(de.uni_hildesheim.sse.ivml.ImportStmt importStmt, ExpressionTranslator translator, TypeContext context)
      Processes an import statement including import restrictions.
      private static net.ssehub.easy.basics.modelManagement.IVersionRestriction processRestrictionExpression​(java.lang.String name, de.uni_hildesheim.sse.ivml.Expression expr, ExpressionTranslator translator, TypeContext context, net.ssehub.easy.basics.messages.IMessageHandler handler)
      Turns an ECore expression into a version restriction.
      • Methods inherited from class java.lang.Object

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

      • ImportTranslator

        public ImportTranslator()
    • Method Detail

      • processRestrictionExpression

        private static net.ssehub.easy.basics.modelManagement.IVersionRestriction processRestrictionExpression​(java.lang.String name,
                                                                                                               de.uni_hildesheim.sse.ivml.Expression expr,
                                                                                                               ExpressionTranslator translator,
                                                                                                               TypeContext context,
                                                                                                               net.ssehub.easy.basics.messages.IMessageHandler handler)
                                                                                                        throws net.ssehub.easy.dslCore.translation.TranslatorException,
                                                                                                               net.ssehub.easy.basics.modelManagement.RestrictionEvaluationException
        Turns an ECore expression into a version restriction.
        Parameters:
        name - the name of the element being processed
        expr - the expression to be turned into a version restriction (may be null but then the result will also be null).
        translator - the expression translator (may be null but then the result will also be null)
        context - the current type context (may be null but then the result will also be null)
        handler - an optional message handler (may be null)
        Returns:
        the related version restriction (may be null)
        Throws:
        net.ssehub.easy.dslCore.translation.TranslatorException - in case of translation problems
        net.ssehub.easy.basics.modelManagement.RestrictionEvaluationException - in case of problems while creating the restriction
      • processConflict

        public static net.ssehub.easy.varModel.model.ProjectImport processConflict​(de.uni_hildesheim.sse.ivml.ConflictStmt conflictStmt)
                                                                            throws net.ssehub.easy.dslCore.translation.TranslatorException
        Processes a conflict statement including import restrictions. In case of errors the respective element is not added to the resulting project. Anyway, no restriction expressions are produced!
        Parameters:
        conflictStmt - the conflict statement
        Returns:
        the related IVML model instance
        Throws:
        net.ssehub.easy.dslCore.translation.TranslatorException - in case of semantic errors
      • processConflict

        public static net.ssehub.easy.varModel.model.ProjectImport processConflict​(de.uni_hildesheim.sse.ivml.ConflictStmt conflictStmt,
                                                                                   ExpressionTranslator translator,
                                                                                   TypeContext context)
                                                                            throws net.ssehub.easy.dslCore.translation.TranslatorException
        Processes a conflict statement including import restrictions. In case of errors the respective element is not added to the resulting project.
        Parameters:
        conflictStmt - the conflict statement
        translator - the expression translator (may be null but then no restriction expressions are produced)
        context - the current type context (may be null but then no restriction expressions are produced)
        Returns:
        the related IVML model instance
        Throws:
        net.ssehub.easy.dslCore.translation.TranslatorException - in case of semantic errors
      • processImport

        public static net.ssehub.easy.varModel.model.ProjectImport processImport​(de.uni_hildesheim.sse.ivml.ImportStmt importStmt)
                                                                          throws net.ssehub.easy.dslCore.translation.TranslatorException
        Processes an import statement including import restrictions. In case of errors the respective element is not added to the resulting project. Anyway, no restriction expressions are produced!
        Parameters:
        importStmt - the import statement
        Returns:
        the related IVML model instance
        Throws:
        net.ssehub.easy.dslCore.translation.TranslatorException - in case of semantic errors
      • processImport

        public static net.ssehub.easy.varModel.model.ProjectImport processImport​(de.uni_hildesheim.sse.ivml.ImportStmt importStmt,
                                                                                 ExpressionTranslator translator,
                                                                                 TypeContext context)
                                                                          throws net.ssehub.easy.dslCore.translation.TranslatorException
        Processes an import statement including import restrictions. In case of errors the respective element is not added to the resulting project.
        Parameters:
        importStmt - the import statement
        translator - the expression translator (may be null but then no restriction expressions are produced)
        context - the current type context (may be null but then no restriction expressions are produced)
        Returns:
        the related IVML model instance
        Throws:
        net.ssehub.easy.dslCore.translation.TranslatorException - in case of semantic errors