// calculating results for the "entire meta-model"
        private void CalculateResultsModel(MetaModel model1, MetaModel model2, Results[][] resultsMatrix, int i, int j)
        {
            model1.ResetCalculation();
            model2.ResetCalculation();

            resultsMatrix[i][j].NumOfChanges          = model2.CompareModels(model1, relevancy);
            resultsMatrix[i][j].NumOfChangedElements  = model2.NumberOfModifiedElements() + model2.NumberOfAddedElements() + model2.NumberOfRemovedElements();
            resultsMatrix[i][j].NumOfModifiedElements = model2.NumberOfModifiedElements();
            resultsMatrix[i][j].NumOfAddedElements    = model2.NumberOfAddedElements();
            resultsMatrix[i][j].NumOfRemovedElements  = model2.NumberOfRemovedElements();

            resultsMatrix[i][j].NumOfChangedConnectors  = model2.NumberOfModifiedConnectors() + model2.NumberOfAddedConnectors() + model2.NumberOfRemovedConnectors();
            resultsMatrix[i][j].NumOfModifiedConnectors = model2.NumberOfModifiedConnectors();
            resultsMatrix[i][j].NumOfAddedConnectors    = model2.NumberOfAddedConnectors();
            resultsMatrix[i][j].NumOfRemovedConnectors  = model2.NumberOfRemovedConnectors();

            resultsMatrix[i][j].NumOfChangedAttributes  = model2.NumberOfModifiedAttributes() + model2.NumberOfAddedAttributes() + model2.NumberOfRemovedAttributes();
            resultsMatrix[i][j].NumOfModifiedAttributes = model2.NumberOfModifiedAttributes();
            resultsMatrix[i][j].NumOfAddedAttributes    = model2.NumberOfAddedAttributes();
            resultsMatrix[i][j].NumOfRemovedAttributes  = model2.NumberOfRemovedAttributes();
            resultsMatrix[i][j].NumOfChangedPackages    = model2.NumberOfModifiedPackages() + model2.NumberOfAddedPackages() + model2.NumberOfRemovedPackages();
            resultsMatrix[i][j].NumOfModifiedPackages   = model2.NumberOfModifiedPackages();
            resultsMatrix[i][j].NumOfAddedPackages      = model2.NumberOfAddedPackages();
            resultsMatrix[i][j].NumOfRemovedPackages    = model2.NumberOfRemovedPackages();
        }
예제 #2
0
        // calculating results from comparing two models
        public void CalculateModels(MetaModel model1, MetaModel model2, bool relevancy)
        {
            model2.CompareModels(model1, relevancy);

            NumOfElementsMod1   = model1.NumberOfElements(relevancy);
            NumOfElementsMod2   = model2.NumberOfElements(relevancy);
            NumOfAttributesMod1 = model1.NumberOfAttributes(relevancy);
            NumOfAttributesMod2 = model2.NumberOfAttributes(relevancy);
            numOfConnectorsMod1 = model1.NumberOfConnectors(relevancy);
            numOfConnectorsMod2 = model2.NumberOfConnectors(relevancy);
            NumOfPackagesMod1   = model1.NumberOfPackages(relevancy);
            NumOfPackagedMod2   = model2.NumberOfPackages(relevancy);

            NumOfChanges            = model2.NumOfChanges;
            NumOfModifiedPackages   = model2.NumberOfModifiedPackages();
            NumOfAddedPackages      = model2.NumberOfAddedPackages();
            NumOfRemovedPackages    = model2.NumberOfRemovedPackages();
            NumOfModifiedElements   = model2.NumberOfModifiedElements();
            NumOfAddedElements      = model2.NumberOfAddedElements();
            NumOfRemovedElements    = model2.NumberOfRemovedElements();
            NumOfModifiedConnectors = model2.NumberOfModifiedConnectors();
            NumOfAddedConnectors    = model2.NumberOfAddedConnectors();
            NumOfRemovedConnectors  = model2.NumberOfRemovedConnectors();
            NumOfModifiedAttributes = model2.NumberOfModifiedAttributes();
            NumOfAddedAttributes    = model2.NumberOfAddedAttributes();
            NumOfRemovedAttributes  = model2.NumberOfRemovedAttributes();

            Changes            = model2.GetChanges();
            ModifiedPackages   = model2.GetAllModifiedPackages();
            AddedPackages      = model2.GetAllAddedPackages();
            RemovedPackages    = model2.GetAllRemovedPackages();
            ModifiedElements   = model2.GetAllModifiedElements();
            AddedElements      = model2.GetAllAddedElements();
            RemovedElements    = model2.GetAllRemovedElements();
            ModifiedConnectors = model2.GetAllModifiedConnectors();
            AddedConnectors    = model2.GetAllAddedConnectors();
            RemovedConnectors  = model2.GetAllRemovedConnectors();
            ModifiedAttributes = model2.GetAllModifiedAttributes();
            AddedAttributes    = model2.GetAllAddedAttributes();
            RemovedAttributes  = model2.GetAllRemovedAttributes();
        }