Class ProjectsComparator


  • @OpenApiAll
    public class ProjectsComparator
    extends java.lang.Object
    Class for comparing two projects. Model and symbols comparison is supported.
    • Constructor Detail

      • ProjectsComparator

        public ProjectsComparator()
    • Method Detail

      • compare

        public boolean compare​(Project prj1,
                               Project prj2)
        Check if two given MagicDraw projects are equals by comparing their model elements and diagrams.
        Parameters:
        prj1 - first MagicDraw project to compare.
        prj2 - second MagicDraw project to compare.
        Returns:
        true if given MagicDraw projects are equals, false otherwise.
      • getModelComparator

        public ModelComparator getModelComparator()
        ModelComparator implementation used for projects comparison.
        Returns:
        implementation of ModelComparator used for projects comparison or null if projects compared using other criterion.
      • setModelComparator

        public void setModelComparator​(ModelComparator comparator)
        Set implementation of ModelComparator to use for projects comparison.
        Parameters:
        comparator - implementation of ModelComparator to use for projects comparison.
      • getDiagramComparator

        @CheckForNull
        public DiagramComparator getDiagramComparator()
        DiagramComparator used for comparing project diagrams during projects comparison.
        Returns:
        implementation of DiagramComparator used for comparing diagrams or null if projects are compared by other criterion.
      • setDiagramComparator

        public void setDiagramComparator​(@CheckForNull
                                         DiagramComparator diagramComparator)
        Sets DiagramComparator implementation for comparing project diagrams during projects comparison.
        Parameters:
        diagramComparator - implementation of DiagramComparator use for project diagrams comparison.
      • setLogTextEnd

        public void setLogTextEnd​(@CheckForNull
                                  java.lang.String text)
        Text to add before projects comparison log.
        Parameters:
        text - String text to add.