diff options
author | rbrooks | 2010-08-29 05:02:11 +0000 |
---|---|---|
committer | rbrooks | 2010-08-29 05:02:11 +0000 |
commit | 5a4058affbff23e1fad7c559eeb691161ea94b57 (patch) | |
tree | 709ca8587ec038ecdd4bfbcaff50bb6379e2fa6a /plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ChangeReportComparer.java | |
parent | c850774504ad977892dfece2dc330ab769b234f1 (diff) | |
download | org.eclipse.osee-5a4058affbff23e1fad7c559eeb691161ea94b57.tar.gz org.eclipse.osee-5a4058affbff23e1fad7c559eeb691161ea94b57.tar.xz org.eclipse.osee-5a4058affbff23e1fad7c559eeb691161ea94b57.zip |
Eclipse source cleanup and format
Diffstat (limited to 'plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ChangeReportComparer.java')
-rw-r--r-- | plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ChangeReportComparer.java | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ChangeReportComparer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ChangeReportComparer.java index e746cedb906..8795a911d80 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ChangeReportComparer.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ChangeReportComparer.java @@ -1,56 +1,56 @@ -/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ats.health;
-
-import java.util.ArrayList;
-import java.util.logging.Level;
-import org.eclipse.osee.ats.health.change.DataChangeReportComparer;
-import org.eclipse.osee.ats.health.change.ValidateChangeReportParser;
-import org.eclipse.osee.ats.internal.AtsPlugin;
-import org.eclipse.osee.framework.logging.OseeLog;
-
-/**
- * Compares two change reports to see if the match.
- *
- * @author Jeff C. Phillips
- */
-public class ChangeReportComparer {
-
- /**
- * Compares two change report strings by parsing them and comparing each artifact change, attribute change and
- * relation change.
- *
- * @return Returns true if the change reports matches else false.
- */
- public boolean compare(String currentData, String storedData) {
- boolean success = true;
- ValidateChangeReportParser parser = new ValidateChangeReportParser();
- ArrayList<ArrayList<DataChangeReportComparer>> currentList = parser.parse(currentData);
- ArrayList<ArrayList<DataChangeReportComparer>> storedList = parser.parse(storedData);
-
- if (currentList.size() != storedList.size() || currentList.get(0).size() != storedList.get(0).size() || currentList.get(
- 1).size() != storedList.get(1).size() || currentList.get(2).size() != storedList.get(2).size()) {
- OseeLog.log(AtsPlugin.class, Level.SEVERE, "The change reports must have the same number of items");
- return false;
- }
- for (int i = 0; i < currentList.size(); i++) {
- for (int j = 0; j < currentList.get(i).size(); j++) {
- if (!currentList.get(i).get(j).getContent().equals(storedList.get(i).get(j).getContent())) {
- success = false;
- System.err.println(currentList.get(i).get(j).getContent());
- System.err.println(storedList.get(i).get(j).getContent());
- System.err.println("---------------------------------------------------");
- }
- }
- }
- return success;
- }
-}
+/******************************************************************************* + * Copyright (c) 2004, 2007 Boeing. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Boeing - initial API and implementation + *******************************************************************************/ +package org.eclipse.osee.ats.health; + +import java.util.ArrayList; +import java.util.logging.Level; +import org.eclipse.osee.ats.health.change.DataChangeReportComparer; +import org.eclipse.osee.ats.health.change.ValidateChangeReportParser; +import org.eclipse.osee.ats.internal.AtsPlugin; +import org.eclipse.osee.framework.logging.OseeLog; + +/** + * Compares two change reports to see if the match. + * + * @author Jeff C. Phillips + */ +public class ChangeReportComparer { + + /** + * Compares two change report strings by parsing them and comparing each artifact change, attribute change and + * relation change. + * + * @return Returns true if the change reports matches else false. + */ + public boolean compare(String currentData, String storedData) { + boolean success = true; + ValidateChangeReportParser parser = new ValidateChangeReportParser(); + ArrayList<ArrayList<DataChangeReportComparer>> currentList = parser.parse(currentData); + ArrayList<ArrayList<DataChangeReportComparer>> storedList = parser.parse(storedData); + + if (currentList.size() != storedList.size() || currentList.get(0).size() != storedList.get(0).size() || currentList.get( + 1).size() != storedList.get(1).size() || currentList.get(2).size() != storedList.get(2).size()) { + OseeLog.log(AtsPlugin.class, Level.SEVERE, "The change reports must have the same number of items"); + return false; + } + for (int i = 0; i < currentList.size(); i++) { + for (int j = 0; j < currentList.get(i).size(); j++) { + if (!currentList.get(i).get(j).getContent().equals(storedList.get(i).get(j).getContent())) { + success = false; + System.err.println(currentList.get(i).get(j).getContent()); + System.err.println(storedList.get(i).get(j).getContent()); + System.err.println("---------------------------------------------------"); + } + } + } + return success; + } +} |