You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(7) |
Aug
|
Sep
(46) |
Oct
(102) |
Nov
(10) |
Dec
(21) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(1) |
Feb
(3) |
Mar
(14) |
Apr
(9) |
May
(12) |
Jun
(4) |
Jul
(40) |
Aug
(60) |
Sep
(38) |
Oct
(2) |
Nov
(1) |
Dec
(42) |
| 2008 |
Jan
(23) |
Feb
(29) |
Mar
(107) |
Apr
(27) |
May
(3) |
Jun
(1) |
Jul
(15) |
Aug
(7) |
Sep
(19) |
Oct
|
Nov
(2) |
Dec
|
| 2009 |
Jan
(36) |
Feb
(4) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(15) |
Jul
(30) |
Aug
(32) |
Sep
(11) |
Oct
(21) |
Nov
(12) |
Dec
(15) |
| 2010 |
Jan
(29) |
Feb
(9) |
Mar
(25) |
Apr
|
May
(7) |
Jun
(5) |
Jul
(21) |
Aug
(32) |
Sep
(10) |
Oct
(8) |
Nov
(29) |
Dec
(8) |
| 2011 |
Jan
(9) |
Feb
(35) |
Mar
(11) |
Apr
(4) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(30) |
| 2012 |
Jan
(5) |
Feb
(7) |
Mar
(10) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Revision: 479
http://cishell.svn.sourceforge.net/cishell/?rev=479&view=rev
Author: mwlinnem
Date: 2007-08-16 15:10:02 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
Test files are now expected to be in nwb/converter_test_files/. Solves problem of the file path previously being platform-dependent.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-16 21:06:26 UTC (rev 478)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-16 22:10:02 UTC (rev 479)
@@ -25,23 +25,9 @@
"org" + fs + "cishell" + fs + "testing" + fs +
"convertertester" + fs + "core" + fs + "test_files" + fs;
*/
- File currentDir = null;
- currentDir = new File(System.getProperty("user.dir") + fs + "converter_test_files");
-
- if (!currentDir.exists()) {
- currentDir = new File(System.getProperty("user.home") + fs + "anything");
- } else {
- currentDir = new File(System.getProperty("user.dir") + fs + "converter_test_files" + File.separator + "anything");
- }
-
- if (currentDir.exists()) {
- DEFAULT_ROOT_DIR = currentDir.getPath()+fs;
- }
- else{
- System.err.println(">>>Error, didn't find test_files directory.");
- DEFAULT_ROOT_DIR = null;
- }
+ System.out.println("osgi.install.area:"+System.getProperty("osgi.install.area"));
+ DEFAULT_ROOT_DIR = System.getProperty("osgi.install.area").replace("file:","") + fs + "converter_test_files" + fs;
}
public static final String DEFAULT_ROOT_DIR;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-16 21:06:32
|
Revision: 478
http://cishell.svn.sourceforge.net/cishell/?rev=478&view=rev
Author: mwlinnem
Date: 2007-08-16 14:06:26 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
Cleaned up.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java
Modified: trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-16 20:36:06 UTC (rev 477)
+++ trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-16 21:06:26 UTC (rev 478)
@@ -32,22 +32,17 @@
import org.osgi.framework.ServiceReference;
import org.osgi.service.log.LogService;
-//TODO: Only just barely usable to run converter tester from GUI.
-//TODO: Make it nice eventually
+//TODO: Maybe let the user specify which converters he/she wants to test, or other things
+//TODO: Make it progress-trackable
public class ConverterTesterAlgorithm implements Algorithm, AlgorithmProperty {
- private static File currentDir;
-
- private Data[] data;
- private Dictionary parameters;
+
private CIShellContext cContext;
private BundleContext bContext;
private LogService log;
public ConverterTesterAlgorithm(Data[] data, Dictionary parameters,
CIShellContext cContext, BundleContext bContext ) {
- this.data = data;
- this.parameters = parameters;
this.cContext = cContext;
this.bContext = bContext;
@@ -58,12 +53,13 @@
public Data[] execute() {
- this.log.log(LogService.LOG_WARNING, "-------NOTICE-------" + "\n" +
+ this.log.log(LogService.LOG_WARNING,
+ "-------NOTICE-------" + "\n" +
"The Converter Tester will take " +
"approximately 30 seconds to run all the tests, and around " +
"20 seconds to display all the results. Thank you for " +
"waiting :)" + "\n" +
- "-----END NOTICE-----");
+ "-----END NOTICE-----");
Data[] returnDM;
@@ -95,17 +91,7 @@
}
- public static String getFileExtension(File theFile) {
- String fileName = theFile.getName() ;
- String extension ;
- if (fileName.lastIndexOf(".") != -1)
- extension = fileName.substring(fileName.lastIndexOf(".")+1) ;
- else
- extension = "" ;
- return extension ;
- }
-
- final class DataUpdater implements Runnable{
+ final class DataUpdater implements Runnable {
boolean loadFileSuccess = false;
IWorkbenchWindow window;
ArrayList returnList = new ArrayList();
@@ -116,46 +102,46 @@
this.window = window;
}
- public void run (){
-// if (currentDir == null) {
-// currentDir = new File(System.getProperty("user.dir") + File.separator + "sampledata");
-//
-// if (!currentDir.exists()) {
-// currentDir = new File(System.getProperty("user.home") + File.separator + "anything");
-// } else {
-// currentDir = new File(System.getProperty("user.dir") + File.separator + "sampledata" + File.separator + "anything");
-// }
-// }
-// dialog.setFilterPath(currentDir.getPath());
-// dialog.setText("Select a File: Too bad we aren't using it, haha!");
-// String fileName = dialog.open();
-// if (fileName == null) {
-// return;
-// }
-
- try {
- ConverterTester2 ct = new ConverterTester2(log);
- ServiceReference[] refs = getServiceReferences();
+ public void run () {
+
+ try {
+ //get all the converters
+ ServiceReference[] convRefs = getConverterReferences();
- ConverterGraph converterGraph = new ConverterGraph(refs, bContext, log);
+ //generate converter paths inside converter graph, for use in executing the test
+ ConverterGraph converterGraph = new ConverterGraph(convRefs, bContext, log);
+ //extract converter graph in nwb file format.
File nwbGraph = converterGraph.asNWB();
+ //initialize all the report generators
+
AllTestsReportGenerator allGen = new AllTestsReportGenerator(this.log);
AllConvsReportGenerator allConvGen = new AllConvsReportGenerator(this.log);
GraphReportGenerator graphGen = new GraphReportGenerator(nwbGraph, this.log);
ReadMeReportGenerator readmeGen = new ReadMeReportGenerator();
- ct.execute(converterGraph, new ReportGenerator[] {allGen, allConvGen, graphGen, readmeGen}, cContext, bContext);
+ //execute the tests, and provide the results to the report generators
+ ConverterTester2 ct = new ConverterTester2(log);
+ ct.execute(converterGraph,
+ new ReportGenerator[]
+ {allGen, allConvGen, graphGen, readmeGen},
+ cContext, bContext);
+ /*
+ * report generators have now been supplied with the test
+ * results, and their reports can now be extracted.
+ */
- // readme report
+ //return readme report
+
ReadMeReport readmeReport = readmeGen.getReadMe();
File readmeFile = readmeReport.getReportFile();
Data readMeData = createReportData(readmeFile,
readmeReport.getName(), null);
addReturn(readMeData);
- //all tests report
+ //return all tests report
+
AllTestsReport allReport = allGen.getAllTestsReport();
File allReportFile = allReport.getAllTestsReport();
Data allReportData = createReportData(allReportFile,
@@ -171,7 +157,7 @@
TestReport[] fTestReports = allReport.getFailedTestReports();
addFilePasses(fTestReports, allReportData);
- //all conv report
+ //return all converters report
AllConvsReport allConvReport = allConvGen.getAllConvsReport();
File allConvReportFile = allConvReport.getReport();
@@ -179,6 +165,7 @@
null);
addReturn(allConvReportData);
+ //return each converter report
ConvReport[] convReports = allConvReport.getConverterReports();
for (int ii = 0; ii < convReports.length; ii++) {
ConvReport convReport = convReports[ii];
@@ -190,33 +177,39 @@
addFilePasses(trs, convReportData);
}
+ //return annotated graph report
+
File graphReportFile = graphGen.getGraphReport();
Data graphReport = createReportData(graphReportFile, "Annotated Graph Report", null,
"file:text/nwb", DataProperty.NETWORK_TYPE);
addReturn(graphReport);
-
-
-
- } catch (Exception e) {
- System.out.println("Why oh why am I catching type Exception?");
- System.out.println(e);
- e.printStackTrace();
- }
+ } catch (Exception e) {
+ this.log.log(LogService.LOG_ERROR, "Converter Tester Failed.", e);
+ }
}
+ /**
+ * Add a report to a list of reports that are later returned.
+ * @param report the report to be returned from this algorithm
+ */
private void addReturn(Data report) {
this.returnList.add(report);
}
- private void addFilePasses(TestReport[] testReports, Data allReportData) {
+ /**
+ * Returns file pass reports associated with tests or converters.
+ * @param testReports reports to be returned as children or test or converter
+ * @param parent the parent of the file pass
+ */
+ private void addFilePasses(TestReport[] testReports, Data parent) {
for (int ii = 0; ii < testReports.length; ii++) {
TestReport tr = testReports[ii];
File testReportFile = tr.getTestReport();
- System.out.println("In algorithm, file pass name is : " + tr.getName());
- System.out.println("In algorithm FILE name is : " + testReportFile.getName());
+// System.out.println("In algorithm, file pass name is : " + tr.getName());
+// System.out.println("In algorithm FILE name is : " + testReportFile.getName());
Data testReportData = createReportData(testReportFile,
- tr.getName(), allReportData);
+ tr.getName(), parent);
addReturn(testReportData);
FilePassReport[] sFilePassReports = tr.getSuccessfulFilePassReports();
@@ -239,6 +232,18 @@
}
}
+ /**
+ * Wraps the report with metadata in a form that is ready to be
+ * returned from the algorithm.
+ *
+ * @param report the report to be turned into data
+ * @param label how the report will be labeled in the data manager window
+ * @param parent which report this report will hang from
+ * (null if it is not a child of any report)
+ * @param format The file format or class name of the report
+ * @param type whether the report is a network or text file
+ * @return the report encapsulated in data, ready to be returned.
+ */
private Data createReportData(Object report, String label, Data parent, String format, String type) {
Data reportData = new BasicData(report, format);
Dictionary metadata = reportData.getMetaData();
@@ -250,6 +255,14 @@
return reportData;
}
+ /**
+ * Alternate version of createReportData that assumes the report is a plain text file
+ * @param report the report to be turned into data
+ * @param label how the report will be labeled in the data manager window
+ * @param parent which report this report will hang from
+ * (null if it is not a child of any report)
+ * @return the report encapsulated in data, ready to be returned.
+ */
private Data createReportData(Object report, String label, Data parent) {
return createReportData(report, label, parent, "file:text/plain", DataProperty.TEXT_TYPE);
}
@@ -257,7 +270,7 @@
- private ServiceReference[] getServiceReferences() {
+ private ServiceReference[] getConverterReferences() {
String filter = "(&("+ALGORITHM_TYPE+"="+TYPE_CONVERTER+"))";// +
try {
Modified: trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java 2007-08-16 20:36:06 UTC (rev 477)
+++ trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java 2007-08-16 21:06:26 UTC (rev 478)
@@ -13,19 +13,13 @@
public class ConverterTesterAlgorithmFactory implements AlgorithmFactory {
- private MetaTypeProvider provider;
private BundleContext bContext;
protected void activate(ComponentContext ctxt) {
- //You may delete all references to metatype service if
- //your algorithm does not require parameters and return
- //null in the createParameters() method
- MetaTypeService mts = (MetaTypeService)ctxt.locateService("MTS");
- this.bContext = ctxt.getBundleContext();
- provider = mts.getMetaTypeInformation(this.bContext.getBundle());
+ this.bContext = ctxt.getBundleContext();;
}
+
protected void deactivate(ComponentContext ctxt) {
- provider = null;
}
public Algorithm createAlgorithm(Data[] data, Dictionary parameters, CIShellContext context) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 477
http://cishell.svn.sourceforge.net/cishell/?rev=477&view=rev
Author: huangb
Date: 2007-08-16 13:36:06 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
try to make the change work on linux
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-16 20:14:27 UTC (rev 476)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-16 20:36:06 UTC (rev 477)
@@ -26,17 +26,21 @@
"convertertester" + fs + "core" + fs + "test_files" + fs;
*/
File currentDir = null;
- currentDir = new File(System.getProperty("user.dir") + File.separator + "converter_test_files");
+ currentDir = new File(System.getProperty("user.dir") + fs + "converter_test_files");
- if (currentDir.exists()) {
- DEFAULT_ROOT_DIR = currentDir.getPath()+fs;
- }
- else{
- System.err.println(">>>Error, didn't find test_files directory.");
- DEFAULT_ROOT_DIR = null;
- }
-
-
+ if (!currentDir.exists()) {
+ currentDir = new File(System.getProperty("user.home") + fs + "anything");
+ } else {
+ currentDir = new File(System.getProperty("user.dir") + fs + "converter_test_files" + File.separator + "anything");
+ }
+
+ if (currentDir.exists()) {
+ DEFAULT_ROOT_DIR = currentDir.getPath()+fs;
+ }
+ else{
+ System.err.println(">>>Error, didn't find test_files directory.");
+ DEFAULT_ROOT_DIR = null;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 476
http://cishell.svn.sourceforge.net/cishell/?rev=476&view=rev
Author: huangb
Date: 2007-08-16 13:14:27 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
This is a quick fix. The previous implementation tries to find
test_files directory under default Eclipse workspace directory.
We change it to point to converter_test_files subfolder under
nwb installation directory.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-16 20:09:25 UTC (rev 475)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-16 20:14:27 UTC (rev 476)
@@ -19,10 +19,25 @@
static {
String fs = File.separator;
- DEFAULT_ROOT_DIR = "workspace" + fs + "org.cishell."
+//Replaced by Bonnie
+/* DEFAULT_ROOT_DIR = "My Documents"+fs+"workspace" + fs + "org.cishell."
+ "testing.convertertester.core.new" + fs + "src" + fs +
"org" + fs + "cishell" + fs + "testing" + fs +
"convertertester" + fs + "core" + fs + "test_files" + fs;
+*/
+ File currentDir = null;
+ currentDir = new File(System.getProperty("user.dir") + File.separator + "converter_test_files");
+
+ if (currentDir.exists()) {
+ DEFAULT_ROOT_DIR = currentDir.getPath()+fs;
+ }
+ else{
+ System.err.println(">>>Error, didn't find test_files directory.");
+ DEFAULT_ROOT_DIR = null;
+ }
+
+
+
}
public static final String DEFAULT_ROOT_DIR;
@@ -51,9 +66,11 @@
try {
//open config file that maps formats to test file directories
-
- String filePath = System.getProperty("user.home") + File.separator + rootDir
- + CONF_FILE_NAME;
+
+// Replaced by Bonnie
+// String filePath = System.getProperty("user.home") + File.separator + rootDir
+// + CONF_FILE_NAME;
+ String filePath = rootDir + CONF_FILE_NAME;
reader = new BufferedReader(new FileReader(filePath));
//map formats to test files found in specified directories
@@ -71,9 +88,12 @@
String fileFormat = splitLine[0];
String dir = splitLine[1];
- String testFileDirPath = System.getProperty("user.home")
- + "/" + rootDir + dir;
-
+// Replaced by Bonnie
+// String testFileDirPath = System.getProperty("user.home")
+// + "/" + rootDir + dir;
+
+ String testFileDirPath =rootDir + dir;
+
//use directory name to get names of test files inside it.
String[] testFileNames =
getVisibleFileNames(testFileDirPath);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 475
http://cishell.svn.sourceforge.net/cishell/?rev=475&view=rev
Author: mwlinnem
Date: 2007-08-16 13:09:25 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
Information previous in File Pass Reports is not incorporated into Test Reports.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java 2007-08-15 23:04:17 UTC (rev 474)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java 2007-08-16 20:09:25 UTC (rev 475)
@@ -27,27 +27,15 @@
boolean succeeded = fpr.succeeded();
- String summary = null;
if (succeeded) {
- summary = "Succeeded";
- report.println(summary);
+ report.println("Succeeded");
} else {
- summary = "Failed";
- report.println(summary);
+ report.println("Failed");
}
- report.println("");
- report.println("File used : " + fpr.getOriginalFileLabel());
+ writeReport(report, fpr);
- if (! fpr.getExplanation().trim().equals("")) {
- report.println("Explanation :" + fpr.getExplanation());
- }
-
- report.println("");
-
- report.flush();
-
-
+ String summary = "";
this.filePassReport = new FilePassReport(reportFile, fpr.getName(),
summary);
@@ -59,6 +47,8 @@
closeStream(reportOutStream);
}
+
+
}
@@ -66,6 +56,20 @@
return this.filePassReport;
}
+ public void writeReport(PrintStream report, FilePassResult fpr) {
+
+ report.println("");
+ report.println("File used : " + fpr.getOriginalFileLabel());
+
+ if (! fpr.getExplanation().trim().equals("")) {
+ report.println("Explanation :" + fpr.getExplanation());
+ }
+
+ report.println("");
+
+ report.flush();
+ }
+
private void closeStream(FileOutputStream stream) {
try {
if (stream != null)
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-15 23:04:17 UTC (rev 474)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-16 20:09:25 UTC (rev 475)
@@ -43,13 +43,6 @@
float percentSuccessful = tr.getNumFilePassSuccesses() / tr.getNumFilePasses();
-// name them all
-// FilePassResult[] allFPs = tr.getFilePassResults();
-// for (int ii = 0; ii < allFPs.length; ii++) {
-// FilePassResult fp = allFPs[ii];
-// fp.setName("Pass " + ii + " of " + tr.getName() + " . ");
-// }
-
report.println("");
report.println("---------------");
report.println("");
@@ -79,7 +72,8 @@
for (int ii = 0; ii < successfulFPs.length; ii++) {
FilePassResult successfulFP = successfulFPs[ii];
namePass("Successful", successfulFP, tr, ii);
- report.println(" " + successfulFP.getName() + successfulFP.getShortSummary());
+ report.println(successfulFP.getName() + successfulFP.getShortSummary());
+ filePassSubGen.writeReport(report, successfulFP);
}
report.println("");
@@ -88,7 +82,10 @@
for (int ii = 0; ii < failedFPs.length; ii++) {
FilePassResult failedFP = failedFPs[ii];
namePass("Failed", failedFP, tr, ii);
- report.println(" " + failedFP.getName() + failedFP.getShortSummary());
+ report.println("--------");
+ report.println(failedFP.getName() + failedFP.getShortSummary());
+ filePassSubGen.writeReport(report, failedFP);
+ report.println("");
}
report.println("");
@@ -115,8 +112,10 @@
// String summary = "%" + percentSuccessful + " Successful";
String summary = "";
this.testReport = new TestReport(reportFile, tr.getName(),
- (FilePassReport[]) successfulFPReports.toArray(new FilePassReport[0]),
- (FilePassReport[]) failedFPReports.toArray(new FilePassReport[0]),
+ new FilePassReport[0],
+ new FilePassReport[0],
+// (FilePassReport[]) successfulFPReports.toArray(new FilePassReport[0]),
+// (FilePassReport[]) failedFPReports.toArray(new FilePassReport[0]),
summary);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-15 23:04:23
|
Revision: 474
http://cishell.svn.sourceforge.net/cishell/?rev=474&view=rev
Author: mwlinnem
Date: 2007-08-15 16:04:17 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Reports no longer dumped into users home directory. Removed platform specific file separators. (Once again).
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2007-08-15 22:44:39 UTC (rev 473)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2007-08-15 23:04:17 UTC (rev 474)
@@ -38,6 +38,10 @@
private TestRunner testRunner;
public ConverterTester2(LogService log) {
+
+ //TODO: Make this not a huge hack
+ new File(ReportGenerator.TEMP_DIR).mkdir();
+
this.log = log;
this.testFileKeeper =
new TestFileKeeper(TestFileKeeper.DEFAULT_ROOT_DIR, log);
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-15 22:44:39 UTC (rev 473)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-15 23:04:17 UTC (rev 474)
@@ -52,7 +52,7 @@
try {
//open config file that maps formats to test file directories
- String filePath = System.getProperty("user.home") + "/" + rootDir
+ String filePath = System.getProperty("user.home") + File.separator + rootDir
+ CONF_FILE_NAME;
reader = new BufferedReader(new FileReader(filePath));
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-15 22:44:39 UTC (rev 473)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-15 23:04:17 UTC (rev 474)
@@ -36,7 +36,6 @@
FileOutputStream reportOutStream = null;
try {
- new File(TEMP_DIR);
File reportFile = new File(TEMP_DIR + TEMP_FILE_PATH);
reportOutStream = new FileOutputStream(reportFile);
PrintStream report = new PrintStream(reportOutStream);
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-15 22:44:39 UTC (rev 473)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-15 23:04:17 UTC (rev 474)
@@ -27,9 +27,6 @@
public AllTestsReportGenerator(LogService log) {
this.log = log;
this.testResultSubGen = new TestReportSubGenerator();
-
- //TODO: Make this not a huge hack
- new File(TEMP_DIR).mkdir();
}
public void generateReport(AllTestsResult atr) {
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java 2007-08-15 22:44:39 UTC (rev 473)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java 2007-08-15 23:04:17 UTC (rev 474)
@@ -14,7 +14,7 @@
public void generateReport(AllTestsResult atr) {
//TODO: TOTAL HACK, CHANCE AS SOON AS POSSIBLE
- String readmePath = (System.getProperty("user.home") + "/" +
+ String readmePath = (System.getProperty("user.home") + File.separator +
TestFileKeeper.DEFAULT_ROOT_DIR + "ReportREADME.txt");
System.out.println("ReadMe path is: " + readmePath);
File readmeFile = new File(readmePath);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-15 22:45:12
|
Revision: 473
http://cishell.svn.sourceforge.net/cishell/?rev=473&view=rev
Author: mwlinnem
Date: 2007-08-15 15:44:39 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Added readme report that explains some basic stuff about all the reports.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
trunk/testing/org.cishell.testing.convertertester.core.new/META-INF/MANIFEST.MF
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java
Added Paths:
-----------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/ReportREADME.txt
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/ReadMeReport.java
Modified: trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-15 21:16:01 UTC (rev 472)
+++ trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-15 22:44:39 UTC (rev 473)
@@ -17,10 +17,12 @@
import org.cishell.testing.convertertester.core.tester2.reportgen.allconvs.AllConvsReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.alltests.AllTestsReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.convgraph.GraphReportGenerator;
+import org.cishell.testing.convertertester.core.tester2.reportgen.readme.ReadMeReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.AllConvsReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.AllTestsReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.ConvReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.FilePassReport;
+import org.cishell.testing.convertertester.core.tester2.reportgen.reports.ReadMeReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.TestReport;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchWindow;
@@ -142,9 +144,18 @@
AllTestsReportGenerator allGen = new AllTestsReportGenerator(this.log);
AllConvsReportGenerator allConvGen = new AllConvsReportGenerator(this.log);
GraphReportGenerator graphGen = new GraphReportGenerator(nwbGraph, this.log);
+ ReadMeReportGenerator readmeGen = new ReadMeReportGenerator();
- ct.execute(converterGraph, new ReportGenerator[] {allGen, allConvGen, graphGen}, cContext, bContext);
+ ct.execute(converterGraph, new ReportGenerator[] {allGen, allConvGen, graphGen, readmeGen}, cContext, bContext);
+ // readme report
+ ReadMeReport readmeReport = readmeGen.getReadMe();
+ File readmeFile = readmeReport.getReportFile();
+ Data readMeData = createReportData(readmeFile,
+ readmeReport.getName(), null);
+ addReturn(readMeData);
+
+ //all tests report
AllTestsReport allReport = allGen.getAllTestsReport();
File allReportFile = allReport.getAllTestsReport();
Data allReportData = createReportData(allReportFile,
@@ -184,6 +195,8 @@
"file:text/nwb", DataProperty.NETWORK_TYPE);
addReturn(graphReport);
+
+
} catch (Exception e) {
System.out.println("Why oh why am I catching type Exception?");
System.out.println(e);
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/META-INF/MANIFEST.MF
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/META-INF/MANIFEST.MF 2007-08-15 21:16:01 UTC (rev 472)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/META-INF/MANIFEST.MF 2007-08-15 22:44:39 UTC (rev 473)
@@ -26,6 +26,7 @@
org.cishell.testing.convertertester.core.tester2.reportgen.allconvs,
org.cishell.testing.convertertester.core.tester2.reportgen.alltests,
org.cishell.testing.convertertester.core.tester2.reportgen.convgraph,
+ org.cishell.testing.convertertester.core.tester2.reportgen.readme,
org.cishell.testing.convertertester.core.tester2.reportgen.reports,
org.cishell.testing.convertertester.core.tester2.reportgen.results,
org.cishell.testing.convertertester.core.tester2.reportgen.results.converter,
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/ReportREADME.txt
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/ReportREADME.txt (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/ReportREADME.txt 2007-08-15 22:44:39 UTC (rev 473)
@@ -0,0 +1,78 @@
+So I used to have a pretty long readme but it was
+accidentally deleted, so now I'll just cover the basics
+until I get motivated to do this thing all over again.
+
+There are three major reports: All Tests Report,
+ All Converters Report, and Annotated Graph Report.
+
+Bug Notes: The following problems (as well as others)
+are known, and should be corrected.
+
+1. Data Manager is unable to collapse trees of
+ data by default.
+
+2. Some annoying converters output their
+exceptions to the logger directly instead
+of returning them. We need to redirect this
+information into the reports.
+
+3. CIShell sometimes goofs with the numbering
+of the reports, and either changes the last
+digit or adds ".1" to the end of everything.
+
+
+ALL TESTS REPORT
+
+All Tests Report provides results test by test.
+It is hierarchically structured, with a general
+overview at the root, which has each of the
+test reports hanging from it, which in turn
+have each of their file pass reports hanging
+from them.
+
+Each test tests a single conversion path by
+running a bunch of files through it then
+comparing the original file to the resulting
+file (just like how we used to do it with
+the configuration files).
+
+Each file pass report represents the
+results from a single test file being
+passed through the test's converters.
+File pass reports hang from their
+corresponding test reports.
+
+ALL CONVERTERS REPORT
+
+All Converters Report provides results
+from the point of view of each converter.
+It has a general overview at the root,
+with details about each converter
+hanging from it.
+
+The two most interesting pieces of information
+generated by this report are whether or
+not a converter is "Trusted" and its
+"Chance of Flaw" of "Chance Correct".
+Converters are said to be trusted if they
+are involved in a test where all the file passes
+are successful. Chance correct is calculated
+using an interesting algorithm involving trust.
+For each failed file pass it looks at all the
+converters involved, removes those that are
+trusted, and says that the resulting converters
+each have an equal likelihood of being at fault.
+If a converter is not trusted, the more
+failures it is involved in the more likely it
+is to be broken, increasing its "Chance of Flaw".
+
+ANNOTATED GRAPH REPORT
+
+This is basically the converter graph annotated
+with converter test results, allowing us to
+visualize how likely to be broken each converter
+is. Each converter has attributes for how likely
+it is to be correct, and whether or not it is
+trusted.
+
+
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java 2007-08-15 21:16:01 UTC (rev 472)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java 2007-08-15 22:44:39 UTC (rev 473)
@@ -106,7 +106,7 @@
if (trusted && fprs.length > 0) {
//mark all converters involved as trusted.
- ConverterPath allConvs = tr.getAllConverters();
+ ConverterPath allConvs = tr.getTestConverters();
for (int kk = 0; kk < allConvs.size(); kk++) {
ConvResult ctr = getResult(rh, allConvs.getRef(kk));
ctr.setTrusted(true);
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java 2007-08-15 22:44:39 UTC (rev 473)
@@ -0,0 +1,29 @@
+package org.cishell.testing.convertertester.core.tester2.reportgen.readme;
+
+import java.io.File;
+
+import org.cishell.testing.convertertester.core.tester2.TestFileKeeper;
+import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
+import org.cishell.testing.convertertester.core.tester2.reportgen.reports.ReadMeReport;
+import org.cishell.testing.convertertester.core.tester2.reportgen.reports.Report;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllTestsResult;
+
+public class ReadMeReportGenerator implements ReportGenerator {
+
+ private ReadMeReport readme;
+
+ public void generateReport(AllTestsResult atr) {
+ //TODO: TOTAL HACK, CHANCE AS SOON AS POSSIBLE
+ String readmePath = (System.getProperty("user.home") + "/" +
+ TestFileKeeper.DEFAULT_ROOT_DIR + "ReportREADME.txt");
+ System.out.println("ReadMe path is: " + readmePath);
+ File readmeFile = new File(readmePath);
+
+ this.readme = new ReadMeReport(readmeFile, "README", "");
+ }
+
+ public ReadMeReport getReadMe() {
+ return this.readme;
+ }
+
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/ReadMeReport.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/ReadMeReport.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/ReadMeReport.java 2007-08-15 22:44:39 UTC (rev 473)
@@ -0,0 +1,29 @@
+package org.cishell.testing.convertertester.core.tester2.reportgen.reports;
+
+import java.io.File;
+
+
+public class ReadMeReport implements Report {
+
+ private File file;
+ private String name;
+ private String summary;
+
+ public ReadMeReport(File file, String name, String summary) {
+ this.file = file;
+ this.name = name;
+ this.summary = summary;
+ }
+ public String getName() {
+ return this.name;
+ }
+
+ public String getShortSummary() {
+ return this.summary;
+ }
+
+ public File getReportFile() {
+ return this.file;
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-15 21:16:04
|
Revision: 472
http://cishell.svn.sourceforge.net/cishell/?rev=472&view=rev
Author: mwlinnem
Date: 2007-08-15 14:16:01 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Reports no longer dumped into users home directory. Removed platform specific file separators.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java
Modified: trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-15 20:29:01 UTC (rev 471)
+++ trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-15 21:16:01 UTC (rev 472)
@@ -51,10 +51,18 @@
this.log = (LogService) cContext.getService(
LogService.class.getName());
+
}
public Data[] execute() {
+ this.log.log(LogService.LOG_WARNING, "-------NOTICE-------" + "\n" +
+ "The Converter Tester will take " +
+ "approximately 30 seconds to run all the tests, and around " +
+ "20 seconds to display all the results. Thank you for " +
+ "waiting :)" + "\n" +
+ "-----END NOTICE-----");
+
Data[] returnDM;
final IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
@@ -107,8 +115,6 @@
}
public void run (){
-
-// FileDialog dialog = new FileDialog(window.getShell(), SWT.OPEN);
// if (currentDir == null) {
// currentDir = new File(System.getProperty("user.dir") + File.separator + "sampledata");
//
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-15 20:29:01 UTC (rev 471)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-15 21:16:01 UTC (rev 472)
@@ -16,9 +16,16 @@
public class TestFileKeeper {
//TODO: How should we expose this to the user?
- public static final String DEFAULT_ROOT_DIR = "workspace/org.cishell."
- + "testing.convertertester.core.new/src/org/cishell/testing/"
- + "convertertester/core/test_files/";
+ static {
+ String fs = File.separator;
+
+ DEFAULT_ROOT_DIR = "workspace" + fs + "org.cishell."
+ + "testing.convertertester.core.new" + fs + "src" + fs +
+ "org" + fs + "cishell" + fs + "testing" + fs +
+ "convertertester" + fs + "core" + fs + "test_files" + fs;
+ }
+
+ public static final String DEFAULT_ROOT_DIR;
public static final String CONF_FILE_NAME = "filetypes.conf";
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ReportGenerator.java 2007-08-15 20:29:01 UTC (rev 471)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ReportGenerator.java 2007-08-15 21:16:01 UTC (rev 472)
@@ -1,9 +1,14 @@
package org.cishell.testing.convertertester.core.tester2.reportgen;
+import java.io.File;
+
import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllTestsResult;
public interface ReportGenerator {
+ public static final String FS = File.separator;
+ public static final String TEMP_DIR = "tmp" + FS;
+
public void generateReport(AllTestsResult atr);
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-15 20:29:01 UTC (rev 471)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-15 21:16:01 UTC (rev 472)
@@ -36,7 +36,8 @@
FileOutputStream reportOutStream = null;
try {
- File reportFile = new File(TEMP_FILE_PATH);
+ new File(TEMP_DIR);
+ File reportFile = new File(TEMP_DIR + TEMP_FILE_PATH);
reportOutStream = new FileOutputStream(reportFile);
PrintStream report = new PrintStream(reportOutStream);
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-15 20:29:01 UTC (rev 471)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-15 21:16:01 UTC (rev 472)
@@ -7,11 +7,10 @@
import java.util.ArrayList;
import java.util.List;
+import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.ConvReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.TestReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.ConvResult;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.TestResult;
import org.osgi.framework.ServiceReference;
public class ConvReportSubGenerator {
@@ -25,7 +24,7 @@
ConvResult convResult = cr;
ServiceReference conv = convResult.getRef();
- File reportFile = new File(cr.getName());
+ File reportFile = new File(ReportGenerator.TEMP_DIR + cr.getName());
reportOutStream = new FileOutputStream(reportFile);
PrintStream report = new PrintStream(reportOutStream);
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-15 20:29:01 UTC (rev 471)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-15 21:16:01 UTC (rev 472)
@@ -27,12 +27,15 @@
public AllTestsReportGenerator(LogService log) {
this.log = log;
this.testResultSubGen = new TestReportSubGenerator();
+
+ //TODO: Make this not a huge hack
+ new File(TEMP_DIR).mkdir();
}
public void generateReport(AllTestsResult atr) {
FileOutputStream reportOutStream = null;
try {
- File reportFile = new File(TEMP_FILE_PATH);
+ File reportFile = new File(TEMP_DIR + TEMP_FILE_PATH);
reportOutStream = new FileOutputStream(reportFile);
PrintStream report = new PrintStream(reportOutStream);
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java 2007-08-15 20:29:01 UTC (rev 471)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java 2007-08-15 21:16:01 UTC (rev 472)
@@ -5,9 +5,9 @@
import java.io.IOException;
import java.io.PrintStream;
+import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.FilePassReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.TestResult;
public class FilePassSubGenerator {
@@ -17,7 +17,7 @@
public void generateSubreport(FilePassResult fpr) {
FileOutputStream reportOutStream = null;
try {
- File reportFile = new File(fpr.getName());
+ File reportFile = new File(ReportGenerator.TEMP_DIR + fpr.getName());
reportOutStream = new FileOutputStream(reportFile);
PrintStream report = new PrintStream(reportOutStream);
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-15 20:29:01 UTC (rev 471)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-15 21:16:01 UTC (rev 472)
@@ -8,6 +8,7 @@
import java.util.List;
import org.cishell.testing.convertertester.core.converter.graph.ConverterPath;
+import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.FilePassReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.TestReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
@@ -27,7 +28,7 @@
public void generateSubreport(TestResult tr) {
FileOutputStream reportOutStream = null;
try {
- File reportFile = new File(tr.getName());
+ File reportFile = new File(ReportGenerator.TEMP_DIR + tr.getName());
reportOutStream = new FileOutputStream(reportFile);
PrintStream report = new PrintStream(reportOutStream);
@@ -144,6 +145,6 @@
private void namePass(String prefix, FilePassResult fp, TestResult parent,
int index) {
- fp.setName(prefix + " Pass " + index + " of " + fp);
+ fp.setName(prefix + " Pass " + index + " of " + parent.getName() + " . ");
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java 2007-08-15 20:29:01 UTC (rev 471)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java 2007-08-15 21:16:01 UTC (rev 472)
@@ -19,7 +19,7 @@
private ConvResultMaker convGen = new ConvResultMaker();
private LogService log;
- private File annotatedNWBGraph = new File("annotated-converter-graph.nwb");
+ private File annotatedNWBGraph = new File(TEMP_DIR + "annotated-converter-graph.nwb");
private String NODE_LINE = "^\\d+? \".*?\"$";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 471
http://cishell.svn.sourceforge.net/cishell/?rev=471&view=rev
Author: mwlinnem
Date: 2007-08-15 13:29:01 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Changed report names for test report and file pass report to indicate whether they were successful or not.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-15 19:57:19 UTC (rev 470)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-15 20:29:01 UTC (rev 471)
@@ -55,16 +55,16 @@
TestResult[] allTRs = atr.getAllTestResults();
for (int ii = 0; ii < allTRs.length; ii++) {
TestResult tr = allTRs[ii];
- tr.setName("Test " + ii);
+ tr.setName("Test");
}
TestResult[] passedTRs = atr.getPassedTestResults();
report.println("Completely Passed Tests...");
for (int ii = 0; ii < passedTRs.length; ii++) {
TestResult passedTR = passedTRs[ii];
-
- report.println(" " + passedTR.getName() + " - " +
- passedTR.getShortSummary());
+ passedTR.setName("Successful " + passedTR.getName() +
+ " " + ii);
+ report.println(" " + passedTR.getName());
}
report.println("");
@@ -72,8 +72,9 @@
report.println("Partially Passed Tests...");
for (int ii = 0; ii < pPassedTRs.length; ii++) {
TestResult pPassedTR = pPassedTRs[ii];
- report.println(" " + pPassedTR.getName() + " - " +
- pPassedTR.getShortSummary());
+ pPassedTR.setName("Partially Successful " +
+ pPassedTR.getName() + " " + ii);
+ report.println(" " + pPassedTR.getName());
}
report.println("");
@@ -82,9 +83,10 @@
TestResult[] failedTRs = atr.getFailedTestResults();
for (int ii = 0; ii < failedTRs.length; ii++) {
TestResult failedTR = failedTRs[ii];
-
- report.println(" " + failedTR.getName() + " - " +
- failedTR.getShortSummary());
+
+ failedTR.setName("Failed " + failedTR.getName()
+ + " " + ii);
+ report.println(" " + failedTR.getName());
}
report.println("");
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-15 19:57:19 UTC (rev 470)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-15 20:29:01 UTC (rev 471)
@@ -43,11 +43,11 @@
float percentSuccessful = tr.getNumFilePassSuccesses() / tr.getNumFilePasses();
// name them all
- FilePassResult[] allFPs = tr.getFilePassResults();
- for (int ii = 0; ii < allFPs.length; ii++) {
- FilePassResult fp = allFPs[ii];
- fp.setName("Pass " + ii + " of " + tr.getName() + " . ");
- }
+// FilePassResult[] allFPs = tr.getFilePassResults();
+// for (int ii = 0; ii < allFPs.length; ii++) {
+// FilePassResult fp = allFPs[ii];
+// fp.setName("Pass " + ii + " of " + tr.getName() + " . ");
+// }
report.println("");
report.println("---------------");
@@ -77,6 +77,7 @@
report.println("Successful File Passes...");
for (int ii = 0; ii < successfulFPs.length; ii++) {
FilePassResult successfulFP = successfulFPs[ii];
+ namePass("Successful", successfulFP, tr, ii);
report.println(" " + successfulFP.getName() + successfulFP.getShortSummary());
}
report.println("");
@@ -85,6 +86,7 @@
report.println("Failed File Passes...");
for (int ii = 0; ii < failedFPs.length; ii++) {
FilePassResult failedFP = failedFPs[ii];
+ namePass("Failed", failedFP, tr, ii);
report.println(" " + failedFP.getName() + failedFP.getShortSummary());
}
report.println("");
@@ -139,4 +141,9 @@
e2.printStackTrace();
}
}
+
+ private void namePass(String prefix, FilePassResult fp, TestResult parent,
+ int index) {
+ fp.setName(prefix + " Pass " + index + " of " + fp);
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-15 19:57:23
|
Revision: 470
http://cishell.svn.sourceforge.net/cishell/?rev=470&view=rev
Author: mwlinnem
Date: 2007-08-15 12:57:19 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Now prints to screen that it is not yet ready for use.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.commandline/src/org/cishell/testing/convertertester/commandline/Activator.java
Modified: trunk/testing/org.cishell.testing.convertertester.commandline/src/org/cishell/testing/convertertester/commandline/Activator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.commandline/src/org/cishell/testing/convertertester/commandline/Activator.java 2007-08-15 19:55:26 UTC (rev 469)
+++ trunk/testing/org.cishell.testing.convertertester.commandline/src/org/cishell/testing/convertertester/commandline/Activator.java 2007-08-15 19:57:19 UTC (rev 470)
@@ -9,8 +9,6 @@
import org.cishell.framework.algorithm.AlgorithmFactory;
import org.cishell.framework.algorithm.AlgorithmProperty;
import org.cishell.testing.convertertester.core.tester2.ConverterTester2;
-import org.cishell.testing.convertertester.core.tester2.reportgen.OverviewReportGenerator;
-import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.InvalidSyntaxException;
@@ -91,8 +89,9 @@
try {
ServiceReference[] refs = getServiceReferences();
ct = new ConverterTester2(this.logger);
- ReportGenerator overview = new OverviewReportGenerator();
- ct.execute(refs, c, b, logger, new ReportGenerator[] {overview});
+ System.out.println("NOT YET READY FOR USE.");
+// ReportGenerator overview = new OverviewReportGenerator();
+// ct.execute(new ReportGenerator[] {overview}, logger, c, b);
System.out.println(ct);
} catch (Exception ex) {
System.out.println("Failed to create " + "ConverterTester\n\n");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-15 19:55:29
|
Revision: 469
http://cishell.svn.sourceforge.net/cishell/?rev=469&view=rev
Author: mwlinnem
Date: 2007-08-15 12:55:26 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Massive update for Converter Tester Phase II.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java
trunk/testing/org.cishell.testing.convertertester.core.new/META-INF/MANIFEST.MF
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterTesterImpl.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile3.net
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile4.net
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile5.net
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile6.net
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile7.net
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile8.net
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile9.net
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/filetypes.conf
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConverterTester.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestConfigData.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestRunner.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ReportGenerator.java
Added Paths:
-----------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/AllConvsReport.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/AllTestsReport.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/ConvReport.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/FilePassReport.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/Report.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/TestReport.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/AllTestsResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/FilePassResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/converter/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/converter/ConvFailureInfo.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/converter/ConvFilePass.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/converter/ConvFilePassFailure.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/converter/ConvFilePassSuccess.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/filepass/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/filepass/ComparePhaseFailure.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/filepass/ConvertPhaseFailure.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/filepass/FilePassFailure.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/filepass/FilePassSuccess.java
Removed Paths:
-------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile9.net
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConverterReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/OverviewReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/SampleResultReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/TestSuiteReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvBasedResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvFailureInfo.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvFilePass.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvFilePassFailure.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvFilePassSuccess.java
Modified: trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-15 19:55:26 UTC (rev 469)
@@ -11,14 +11,18 @@
import org.cishell.framework.data.BasicData;
import org.cishell.framework.data.Data;
import org.cishell.framework.data.DataProperty;
+import org.cishell.testing.convertertester.core.converter.graph.ConverterGraph;
import org.cishell.testing.convertertester.core.tester2.ConverterTester2;
-import org.cishell.testing.convertertester.core.tester2.reportgen.ConverterReportGenerator;
-import org.cishell.testing.convertertester.core.tester2.reportgen.OverviewReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
-import org.cishell.testing.convertertester.core.tester2.reportgen.SampleResultReportGenerator;
-import org.eclipse.swt.SWT;
+import org.cishell.testing.convertertester.core.tester2.reportgen.allconvs.AllConvsReportGenerator;
+import org.cishell.testing.convertertester.core.tester2.reportgen.alltests.AllTestsReportGenerator;
+import org.cishell.testing.convertertester.core.tester2.reportgen.convgraph.GraphReportGenerator;
+import org.cishell.testing.convertertester.core.tester2.reportgen.reports.AllConvsReport;
+import org.cishell.testing.convertertester.core.tester2.reportgen.reports.AllTestsReport;
+import org.cishell.testing.convertertester.core.tester2.reportgen.reports.ConvReport;
+import org.cishell.testing.convertertester.core.tester2.reportgen.reports.FilePassReport;
+import org.cishell.testing.convertertester.core.tester2.reportgen.reports.TestReport;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.osgi.framework.BundleContext;
@@ -36,7 +40,7 @@
private Dictionary parameters;
private CIShellContext cContext;
private BundleContext bContext;
- private LogService logger;
+ private LogService log;
public ConverterTesterAlgorithm(Data[] data, Dictionary parameters,
CIShellContext cContext, BundleContext bContext ) {
@@ -45,7 +49,7 @@
this.cContext = cContext;
this.bContext = bContext;
- this.logger = (LogService) cContext.getService(
+ this.log = (LogService) cContext.getService(
LogService.class.getName());
}
@@ -59,7 +63,7 @@
}
Display display = PlatformUI.getWorkbench().getDisplay();
- DataUpdater dataUpdater = new DataUpdater (windows[0]);
+ DataUpdater dataUpdater = new DataUpdater (windows[0], this.log);
if (Thread.currentThread() != display.getThread()) {
display.syncExec(dataUpdater);
@@ -95,76 +99,145 @@
boolean loadFileSuccess = false;
IWorkbenchWindow window;
ArrayList returnList = new ArrayList();
+ LogService log;
- DataUpdater (IWorkbenchWindow window){
+ DataUpdater (IWorkbenchWindow window, LogService log){
+ this.log = log;
this.window = window;
}
public void run (){
- FileDialog dialog = new FileDialog(window.getShell(), SWT.OPEN);
- if (currentDir == null) {
- currentDir = new File(System.getProperty("user.dir") + File.separator + "sampledata");
-
- if (!currentDir.exists()) {
- currentDir = new File(System.getProperty("user.home") + File.separator + "anything");
- } else {
- currentDir = new File(System.getProperty("user.dir") + File.separator + "sampledata" + File.separator + "anything");
- }
- }
- dialog.setFilterPath(currentDir.getPath());
- dialog.setText("Select a File: Too bad we aren't using it, haha!");
- String fileName = dialog.open();
- if (fileName == null) {
- return;
- }
+// FileDialog dialog = new FileDialog(window.getShell(), SWT.OPEN);
+// if (currentDir == null) {
+// currentDir = new File(System.getProperty("user.dir") + File.separator + "sampledata");
+//
+// if (!currentDir.exists()) {
+// currentDir = new File(System.getProperty("user.home") + File.separator + "anything");
+// } else {
+// currentDir = new File(System.getProperty("user.dir") + File.separator + "sampledata" + File.separator + "anything");
+// }
+// }
+// dialog.setFilterPath(currentDir.getPath());
+// dialog.setText("Select a File: Too bad we aren't using it, haha!");
+// String fileName = dialog.open();
+// if (fileName == null) {
+// return;
+// }
try {
- ConverterTester2 ct = new ConverterTester2(logger);
+ ConverterTester2 ct = new ConverterTester2(log);
ServiceReference[] refs = getServiceReferences();
- OverviewReportGenerator overviewGen =
- new OverviewReportGenerator();
- SampleResultReportGenerator sampleGen =
- new SampleResultReportGenerator(10, 5);
- ConverterReportGenerator convGen =
- new ConverterReportGenerator();
-
- ct.execute(refs, cContext, bContext, logger,
- new ReportGenerator[] {overviewGen, sampleGen, convGen});
- File overviewReport = overviewGen.getReport();
- BasicData overviewReportData =
- createReportData(overviewReport, "Overview");
- returnList.add(overviewReportData);
+ ConverterGraph converterGraph = new ConverterGraph(refs, bContext, log);
+ File nwbGraph = converterGraph.asNWB();
- File sampleReport = sampleGen.getReport();
- BasicData sampleReportData =
- createReportData(sampleReport, "Sample Test Results");
- returnList.add(sampleReportData);
+ AllTestsReportGenerator allGen = new AllTestsReportGenerator(this.log);
+ AllConvsReportGenerator allConvGen = new AllConvsReportGenerator(this.log);
+ GraphReportGenerator graphGen = new GraphReportGenerator(nwbGraph, this.log);
-
- File convReport = convGen.getReport();
- BasicData convReportData =
- createReportData(convReport, "Basic Converter Results");
- returnList.add(convReportData);
+ ct.execute(converterGraph, new ReportGenerator[] {allGen, allConvGen, graphGen}, cContext, bContext);
+ AllTestsReport allReport = allGen.getAllTestsReport();
+ File allReportFile = allReport.getAllTestsReport();
+ Data allReportData = createReportData(allReportFile,
+ allReport.getName() , null);
+ addReturn(allReportData);
+
+ TestReport[] sTestReports = allReport.getSuccessfulTestReports();
+ addFilePasses(sTestReports, allReportData);
+
+ TestReport[] ppTestReports = allReport.getPartialSuccessTestReports();
+ addFilePasses(ppTestReports, allReportData);
+
+ TestReport[] fTestReports = allReport.getFailedTestReports();
+ addFilePasses(fTestReports, allReportData);
+
+ //all conv report
+
+ AllConvsReport allConvReport = allConvGen.getAllConvsReport();
+ File allConvReportFile = allConvReport.getReport();
+ Data allConvReportData = createReportData(allConvReportFile, allConvReport.getName(),
+ null);
+ addReturn(allConvReportData);
+
+ ConvReport[] convReports = allConvReport.getConverterReports();
+ for (int ii = 0; ii < convReports.length; ii++) {
+ ConvReport convReport = convReports[ii];
+ File convReportFile = convReport.getReport();
+ Data convReportData = createReportData(convReportFile, convReport.getName(), allConvReportData);
+ addReturn(convReportData);
+
+ TestReport[] trs = convReport.getTestReports();
+ addFilePasses(trs, convReportData);
+ }
+
+ File graphReportFile = graphGen.getGraphReport();
+ Data graphReport = createReportData(graphReportFile, "Annotated Graph Report", null,
+ "file:text/nwb", DataProperty.NETWORK_TYPE);
+ addReturn(graphReport);
+
} catch (Exception e) {
System.out.println("Why oh why am I catching type Exception?");
System.out.println(e);
e.printStackTrace();
}
}
- }
-
- private BasicData createReportData(Object report, String label) {
- BasicData reportData = new BasicData(report, "file:text/plain");
+
+ private void addReturn(Data report) {
+ this.returnList.add(report);
+ }
+
+
+ private void addFilePasses(TestReport[] testReports, Data allReportData) {
+ for (int ii = 0; ii < testReports.length; ii++) {
+ TestReport tr = testReports[ii];
+ File testReportFile = tr.getTestReport();
+ System.out.println("In algorithm, file pass name is : " + tr.getName());
+ System.out.println("In algorithm FILE name is : " + testReportFile.getName());
+ Data testReportData = createReportData(testReportFile,
+ tr.getName(), allReportData);
+ addReturn(testReportData);
+
+ FilePassReport[] sFilePassReports = tr.getSuccessfulFilePassReports();
+ for (int kk = 0; kk < sFilePassReports.length; kk++) {
+ FilePassReport fp = sFilePassReports[kk];
+ File fpFile = fp.getFilePassReport();
+ Data fpData = createReportData(fpFile, fp.getName(),
+ testReportData);
+ addReturn(fpData);
+ }
+
+ FilePassReport[] fFilePassReports = tr.getFailedFilePassReports();
+ for (int kk = 0; kk < fFilePassReports.length; kk++) {
+ FilePassReport fp = fFilePassReports[kk];
+ File fpFile = fp.getFilePassReport();
+ Data fpData = createReportData(fpFile, fp.getName(),
+ testReportData);
+ addReturn(fpData);
+ }
+ }
+ }
+
+ private Data createReportData(Object report, String label, Data parent, String format, String type) {
+ Data reportData = new BasicData(report, format);
Dictionary metadata = reportData.getMetaData();
metadata.put(DataProperty.LABEL, label);
- metadata.put(DataProperty.TYPE, DataProperty.TEXT_TYPE);
+ metadata.put(DataProperty.TYPE, type);
+ if (parent != null) {
+ metadata.put(DataProperty.PARENT, parent);
+ }
return reportData;
- }
+ }
+
+ private Data createReportData(Object report, String label, Data parent) {
+ return createReportData(report, label, parent, "file:text/plain", DataProperty.TEXT_TYPE);
+ }
+ }
+
+
private ServiceReference[] getServiceReferences() {
String filter = "(&("+ALGORITHM_TYPE+"="+TYPE_CONVERTER+"))";// +
@@ -179,5 +252,8 @@
return null;
}
}
+
+
+
}
\ No newline at end of file
Modified: trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java 2007-08-15 19:55:26 UTC (rev 469)
@@ -32,6 +32,6 @@
return new ConverterTesterAlgorithm(data, parameters, context, bContext);
}
public MetaTypeProvider createParameters(Data[] data) {
- return provider;
+ return null;
}
}
\ No newline at end of file
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/META-INF/MANIFEST.MF
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/META-INF/MANIFEST.MF 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/META-INF/MANIFEST.MF 2007-08-15 19:55:26 UTC (rev 469)
@@ -15,7 +15,18 @@
org.osgi.service.metatype;version="1.1.0",
org.osgi.service.prefs;version="1.1.0"
Require-Bundle: org.prefuse.lib
-Export-Package: org.cishell.testing.convertertester.core.tester,
+Export-Package: org.cishell.testing.convertertester.core.converter,
+ org.cishell.testing.convertertester.core.converter.graph,
+ org.cishell.testing.convertertester.core.service,
+ org.cishell.testing.convertertester.core.tester,
+ org.cishell.testing.convertertester.core.tester.graphcomparison,
org.cishell.testing.convertertester.core.tester2,
+ org.cishell.testing.convertertester.core.tester2.graphcomparison,
org.cishell.testing.convertertester.core.tester2.reportgen,
- org.cishell.testing.convertertester.core.tester2.reportgen.results
+ org.cishell.testing.convertertester.core.tester2.reportgen.allconvs,
+ org.cishell.testing.convertertester.core.tester2.reportgen.alltests,
+ org.cishell.testing.convertertester.core.tester2.reportgen.convgraph,
+ org.cishell.testing.convertertester.core.tester2.reportgen.reports,
+ org.cishell.testing.convertertester.core.tester2.reportgen.results,
+ org.cishell.testing.convertertester.core.tester2.reportgen.results.converter,
+ org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java 2007-08-15 19:55:26 UTC (rev 469)
@@ -15,6 +15,7 @@
import org.osgi.framework.ServiceEvent;
import org.osgi.framework.ServiceListener;
import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
@@ -23,12 +24,14 @@
public final static String SERVICE_LIST = "SERVICE_LIST";
private Map converterList;
private BundleContext bContext;
+ private LogService log;
private CIShellContext ciContext;
- public ConverterLoaderImpl(BundleContext bContext, CIShellContext cContext){
+ public ConverterLoaderImpl(BundleContext bContext, CIShellContext cContext, LogService log){
this.ciContext = cContext;
this.bContext = bContext;
+ this.log = log;
converterList = new Hashtable();
@@ -51,20 +54,8 @@
ServiceReference[] refs = bContext.getServiceReferences(
AlgorithmFactory.class.getName(), filter);
- // ConverterGraph g = new ConverterGraph(refs);
- // System.out.println(g.printComparisonConverterPaths());
- /* System.out.println(g.printComparisonConverterPaths() + "\n" +
- g.getComparePaths().length + "\n" + g.printTestConverterPaths() + "\n");
- int length = 0;
- for(int i = 0; i < g.getTestPaths().length; i++){
- for(int j = 0; j < g.getTestPaths()[i].length; j++){
- length++;
- }
- }
- System.out.println(length + " " + g.getTestPaths().length);
- */
- // System.out.println(g);
-
+ ConverterGraph g = new ConverterGraph(refs, bContext, this.log);
+
if (refs != null) {
for (int i = 0; i < refs.length; ++i) {
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterTesterImpl.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterTesterImpl.java 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterTesterImpl.java 2007-08-15 19:55:26 UTC (rev 469)
@@ -117,7 +117,7 @@
if (factory != null) {
Algorithm alg = factory.createAlgorithm(dm, parameters, context);
- System.out.println("Entering: " + refs[i].getProperty(Constants.SERVICE_PID)+ "-->");
+// System.out.println("Entering: " + refs[i].getProperty(Constants.SERVICE_PID)+ "-->");
dm = alg.execute();
if(dm == null){
throw new RuntimeException("Error after " + refs[i].getProperty(Constants.SERVICE_PID));
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-15 19:55:26 UTC (rev 469)
@@ -6,13 +6,13 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
public class ConverterGraph {
prefuse.data.Graph converterGraph;
@@ -21,11 +21,13 @@
Map fileExtensionCompareConverters;
ServiceReference[] converters;
BundleContext bContext;
+ private LogService log;
private static final String testOutData = "prefuse.data.Graph";
- public ConverterGraph(ServiceReference[] converters, BundleContext bContext){
+ public ConverterGraph(ServiceReference[] converters, BundleContext bContext, LogService log){
this.converters = converters;
this.bContext = bContext;
+ this.log = log;
inDataToAlgorithm = new HashMap();//<String, ArrayList<ServiceReference>>();
fileExtensionTestConverters = new ConcurrentHashMap();//<String, ArrayList<ConverterPath>>();
fileExtensionCompareConverters = new ConcurrentHashMap();//<String, ConverterPath>();
@@ -59,7 +61,7 @@
if(s.startsWith("file-ext")){
- ConverterPath test = new ConverterPath(this.bContext);
+ ConverterPath test = new ConverterPath(this.bContext, this.log);
test.setInData(s);
@@ -93,7 +95,6 @@
String firstOutData, lastInData;
firstOutData = ((ServiceReference)cp.getPath().get(0)).getProperty("out_data").toString();
lastInData = ((ServiceReference)cp.getPath().get(cp.getPath().size()-1)).getProperty("in_data").toString();
- //System.out.println(firstOutData + " " + lastInData);
if(firstOutData.equals(lastInData)){
addTestPath(cp);
}
@@ -255,7 +256,7 @@
return this.fileExtensionTestConverters;
}
- public File asNWB(){
+ public File asNWB() {
File f = getTempFile();
Map nodes = assembleNodesSet();
TreeSet output = assembleEdges(nodes);
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java 2007-08-15 19:55:26 UTC (rev 469)
@@ -7,18 +7,25 @@
import org.cishell.framework.algorithm.AlgorithmProperty;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
public class ConverterPath implements AlgorithmProperty {
- private String in_data;
+
+ private BundleContext bContext;
+ private LogService log;
+ private String in_data = null;
private String out_data = null;
+
private ArrayList path;
- private BundleContext bContext;
- boolean algPathCached = false;
- ArrayList algPath;
+ private boolean algPathCached = false;
+ private ArrayList algPath;
- public ConverterPath(BundleContext bContext){
+
+ public ConverterPath(BundleContext bContext, LogService log){
this.bContext = bContext;
+ this.log = log;
+
path = new ArrayList();
}
@@ -69,6 +76,17 @@
return this.out_data;
}
+ public String getAcceptedFileFormat() {
+ if (size() > 0) {
+ return (String) getRef(0).getProperty(AlgorithmProperty.OUT_DATA);
+ } else {
+ this.log.log(LogService.LOG_ERROR, "Converter Path cannot " +
+ "determine accepted file format if there are no " +
+ "converters inside it. Returning null String.");
+ return "";
+ }
+ }
+
public List getPath(){
return this.path;
@@ -138,7 +156,7 @@
List thisConvPathCopy = new ArrayList(thisConvPath);
thisConvPathCopy.addAll(otherConvPath);
- ConverterPath combinedPath = new ConverterPath(this.bContext);
+ ConverterPath combinedPath = new ConverterPath(this.bContext, this.log);
List combinedConvPath = thisConvPathCopy;
for (int ii = 0; ii < combinedConvPath.size(); ii++) {
@@ -154,6 +172,10 @@
return this.path.size();
}
+
+ public String getConverterName(int index) {
+ return (String) getRef(index).getProperty("service.pid");
+ }
private void cacheAlgPath() {
@@ -173,5 +195,4 @@
this.algPathCached = false;
}
-
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile3.net
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile3.net 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile3.net 2007-08-15 19:55:26 UTC (rev 469)
@@ -11,7 +11,6 @@
550 "ph"
551 "SMO"
552 "ci"
-//I thought I would add a comment here.
553 "CI"
554 "CIA"
555 "CIR"
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile4.net
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile4.net 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile4.net 2007-08-15 19:55:26 UTC (rev 469)
@@ -11,7 +11,6 @@
550 "ph"
551 "SMO"
552 "ci"
-//I thought I would add a comment here.
553 "CI"
554 "CIA"
555 "CIR"
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile5.net
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile5.net 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile5.net 2007-08-15 19:55:26 UTC (rev 469)
@@ -11,7 +11,6 @@
550 "ph"
551 "SMO"
552 "ci"
-//I thought I would add a comment here.
553 "CI"
554 "CIA"
555 "CIR"
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile6.net
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile6.net 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile6.net 2007-08-15 19:55:26 UTC (rev 469)
@@ -1,5 +1,5 @@
*Vertices
-541 "SLP Friend" ellipse 0.987 0.5
+541 "SLP Friend" 0.987 0.5 ellipse
542 "wg"
543 "WG"
544 "en"
@@ -11,7 +11,6 @@
550 "ph"
551 "SMO"
552 "ci"
-//I thought I would add a comment here.
553 "CI"
554 "CIA"
555 "CIR"
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile7.net
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile7.net 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile7.net 2007-08-15 19:55:26 UTC (rev 469)
@@ -6,12 +6,11 @@
545 "EN"
546 "hh"
547 "HH"
-548 "ptc" 0.987 ellipse 0.5 0.7
+548 "ptc" 0.987 0.5 0.7
549 "PTC"
550 "ph"
551 "SMO"
552 "ci"
-//I thought I would add a comment here.
553 "CI"
554 "CIA"
555 "CIR"
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile8.net
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile8.net 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile8.net 2007-08-15 19:55:26 UTC (rev 469)
@@ -5,7 +5,7 @@
544 "en"
545 "EN"
546 "hh"
-547 "HH" 0.987 0.5 0.5 box r 3.5 x_fact 7 s_size 1 lc red font "Arial Black" lphi 5 lr 3
+547 "HH" 0.987 0.5 0.5 box r 3.5 x_fact 7 s_size 1 lc red lphi 5 lr 3
549 "PTC"
550 "ph"
551 "SMO"
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile9.net
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile9.net 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/TestFile9.net 2007-08-15 19:55:26 UTC (rev 469)
@@ -5,11 +5,10 @@
544 "en"
545 "EN"
546 "hh"
-547 "HH" 0.987 0.5 0.5 box r 3.5 x_fact 7 s_size 1 lc red font "Arial Black" lphi 5 lr 3
+547 "HH" 0.987 0.5 0.5 box r 3.5 x_fact 7 s_size 1 lc red lphi 5 lr 3
549 "PTC"
550 "ph"
551 "SMO"
-//I thought I would add a comment here.
552 "ci"
553 "CI"
554 "CIA"
@@ -35,7 +34,6 @@
574 "en"
575 "EN"
576 "hh"
-577
578 "ptc"
579 "PTC"
580 "ph"
Deleted: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile9.net
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile9.net 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile9.net 2007-08-15 19:55:26 UTC (rev 469)
@@ -1,11 +0,0 @@
-*Vertices 6
- 1 "Ada" 0.1646 0.2144 0.5000
- 2 "Cora" 0.0481 0.3869 0.5000
- 3 "Louise" 0.3472 0.1913 0.5000
- 4 "Jean" 0.1063 0.5935 0.5000
- 5 "Helen" 0.2892 0.6688 0.5000
- 6 "Martha" 0.4630 0.5179 0.5000
-*Arcs
-1 2
-2 5 2.5
-4 5
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/filetypes.conf
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/filetypes.conf 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/filetypes.conf 2007-08-15 19:55:26 UTC (rev 469)
@@ -1,6 +1,6 @@
file:text/edge=Edge Files
file:text/graphml+xml=GraphML Files
-file:application/pajek=NET Files
+file:application/pajeknet=NET Files
file:text/nwb=NWB Files
file:text/treeml+xml=TreeML Files
-file:text/xgmml_xml=XGMML Files
+file:text/xgmml+xml=XGMML Files
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConverterTester.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConverterTester.java 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConverterTester.java 2007-08-15 19:55:26 UTC (rev 469)
@@ -18,6 +18,7 @@
import org.cishell.testing.convertertester.core.tester.graphcomparison.DefaultGraphComparer;
import org.cishell.testing.convertertester.core.tester.graphcomparison.GraphComparer;
import org.osgi.framework.BundleContext;
+import org.osgi.service.log.LogService;
import prefuse.data.Graph;
@@ -27,6 +28,7 @@
private ConverterLoaderImpl cli;
private Converter comparisonConverters;
private GraphComparer dgc;
+ private LogService log;
//private Map<String, Exception> fileErrors;
private static final String tempDir = "converterTesterTemp";
private File temporaryStorage;
@@ -34,9 +36,10 @@
//string, comparisonresult
private Map results;
- public ConverterTester(BundleContext b, CIShellContext c){
+ public ConverterTester(BundleContext b, CIShellContext c, LogService log){
this.cContext = c;
- cli = new ConverterLoaderImpl(b, this.cContext);
+ this.log = log;
+ cli = new ConverterLoaderImpl(b, this.cContext, this.log);
cfp = new ConfigurationFileParser();
}
@@ -50,7 +53,7 @@
public ConverterTester(BundleContext b, CIShellContext c, File configFile) throws Exception{
cContext = c;
- cli = new ConverterLoaderImpl(b, cContext);
+ cli = new ConverterLoaderImpl(b, cContext, this.log);
cfp = new ConfigurationFileParser(configFile);
testConverters = cli.getConverter(cfp.getTestConverters());
comparisonConverters = cli.getConverter(cfp.getComparisonConverters());
@@ -60,7 +63,7 @@
public ConverterTester(BundleContext b, CIShellContext c, String configFileName) throws Exception {
cContext = c;
- cli = new ConverterLoaderImpl(b,cContext);
+ cli = new ConverterLoaderImpl(b,cContext, this.log);
cfp = new ConfigurationFileParser(new File(configFileName));
testConverters = cli.getConverter(cfp.getTestConverters());
comparisonConverters = cli.getConverter(cfp.getComparisonConverters());
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2007-08-15 19:55:26 UTC (rev 469)
@@ -2,33 +2,31 @@
import java.io.File;
import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.Iterator;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
import org.cishell.framework.CIShellContext;
-import org.cishell.framework.algorithm.AlgorithmFactory;
import org.cishell.framework.algorithm.AlgorithmProperty;
import org.cishell.framework.data.BasicData;
import org.cishell.framework.data.Data;
+import org.cishell.framework.data.DataProperty;
import org.cishell.testing.convertertester.core.converter.graph.ConverterGraph;
import org.cishell.testing.convertertester.core.converter.graph.ConverterPath;
-import org.cishell.testing.convertertester.core.tester2.filepassresults.FilePassResult;
import org.cishell.testing.convertertester.core.tester2.graphcomparison.IdsNotPreservedComparer;
import org.cishell.testing.convertertester.core.tester2.graphcomparison.IdsPreservedComparer;
import org.cishell.testing.convertertester.core.tester2.graphcomparison.LossyComparer;
import org.cishell.testing.convertertester.core.tester2.graphcomparison.NewGraphComparer;
import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllTestsResult;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.TestResult;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
import org.osgi.service.log.LogService;
/**
- * Test Suites are arrays of test paths, where each test path starts
- * from the same file format.
- *
- * Compare Paths are paths of converters that convert from the original file
- * format to the in-memory comparison format. For each test suite there
- * is a single corresponding compare path.
- *
* @author mwlinnem
*
*/
@@ -39,7 +37,6 @@
private TestFileKeeper testFileKeeper;
private TestRunner testRunner;
-
public ConverterTester2(LogService log) {
this.log = log;
this.testFileKeeper =
@@ -47,71 +44,80 @@
this.testRunner = new DefaultTestRunner(log);
}
-
/**
* Tests the provided converters, and passes the results of those tests to
* the report generators. Report Generators are side-effected, which takes
* the place of a return value.
- *
- * @param converterRefs the converters to be tested
+ * @param reportGenerators process the test results.
* @param cContext the CIShell Context
* @param bContext the Bundle Context
- * @param log The log written to should an error occur (other than the
- * errors resulting from the converters, which are included in the test
- * results)
- * @param reportGenerators process the test results.
*/
- public void execute(ServiceReference[] converterRefs,
+ public void execute(
+ ConverterGraph converterGraph,
+ ReportGenerator[] reportGenerators,
CIShellContext cContext,
- BundleContext bContext,
- LogService log,
- ReportGenerator[] reportGenerators) {
+ BundleContext bContext) {
- this.log = log;
+ //run the tests
- //generate test paths
+ TestResult[] rawResults =
+ runAllTests(converterGraph, cContext, bContext);
+ AllTestsResult allTestsResult = new AllTestsResult(rawResults);
- ConverterGraph converterGraph = new ConverterGraph(converterRefs);
+ //feed test results to the report generators
- ConverterPath[][] testSuites = converterGraph.getTestPaths();
- ConverterPath[] comparePaths = converterGraph.getComparePaths();
-
- //run tests on test paths
-
- TestResult[] results = runTests(testSuites, comparePaths,
- cContext, bContext);
-
- //generate reports based on test results
-
for (int ii = 0; ii < reportGenerators.length; ii++) {
ReportGenerator reportGenerator = reportGenerators[ii];
- reportGenerator.generateReport(results);
+ reportGenerator.generateReport(allTestsResult);
}
}
-
- public TestResult[] runTests(ConverterPath[][] testSuites,
- ConverterPath[] comparePaths, CIShellContext cContext,
- BundleContext bContext) {
+ public TestResult[] runAllTests(ConverterGraph convGraph,
+ CIShellContext cContext, BundleContext bContext) {
+
+
+ Map fileFormatToTestConvs = convGraph.getTestMap();
+ Map fileFormatToCompareConvs = convGraph.getCompareMap();
+
List testResults = new ArrayList();
- for (int ii = 0; ii < testSuites.length; ii++) {
- ConverterPath[] testSuite = testSuites[ii];
- ConverterPath testSuiteComparePath = comparePaths[ii];
+ Set fileFormats = fileFormatToTestConvs.keySet();
+
+ /*
+ * for each file format, get the corresponding test converter paths
+ * and comparison converter path.
+ */
+
+ Iterator iter = fileFormats.iterator();
+ while(iter.hasNext()) {
+ String fileFormat = (String) iter.next();
- for (int jj = 0; jj < testSuite.length; jj++) {
- ConverterPath testPath = testSuite[jj];
+ ArrayList testConvList =
+ (ArrayList) fileFormatToTestConvs.get(fileFormat);
+
+ ConverterPath[] testConvs =
+ (ConverterPath[]) testConvList.toArray(new ConverterPath[0]);
+
+ ConverterPath compareConv =
+ (ConverterPath) fileFormatToCompareConvs.get(fileFormat);
+
+ /*
+ * For each test converter, use that test converter and
+ * the corresponding comparison converter to run a test.
+ */
+
+ for (int kk = 0; kk < testConvs.length; kk++) {
+ ConverterPath testConv = testConvs[kk];
- TestResult testResult = runATest(testPath,
- testSuiteComparePath, cContext, bContext);
+ TestResult testResult =
+ runATest(testConv, compareConv, cContext, bContext);
if (testResult != null) {
testResults.add(testResult);
}
}
-
}
return (TestResult[]) testResults.toArray(new TestResult[0]);
@@ -119,57 +125,34 @@
private TestResult runATest(ConverterPath testConvs,
- ConverterPath comparisonConvs, CIShellContext cContext,
+ ConverterPath compareConvs, CIShellContext cContext,
BundleContext bContext) {
- ServiceReference[] testConvRefs = testConvs.getPathAsArray();
- ServiceReference[] compareConvRefs = comparisonConvs.getPathAsArray();
+ //get test file data corresponding to the format these converters accept.
- AlgorithmFactory[] testConvAlgs = extractAlgorithms(
- testConvRefs, bContext);
- AlgorithmFactory[] compareConvAlgs = extractAlgorithms(
- compareConvRefs, bContext);
-
- if (testConvRefs.length <= 0) {
- System.out.println("Must have at least one test converter..");
- return null;
- }
-
- //get test files corresponding to the format these converters accept.
-
- String fileFormat =
- (String) testConvRefs[0].getProperty(AlgorithmProperty.OUT_DATA);
+ String fileFormat = testConvs.getAcceptedFileFormat();
String[] testFilePaths = testFileKeeper.getTestFilePaths(fileFormat);
- Data[][] fileData = wrapInData(testFilePaths, fileFormat);
+ Data[][] testFileData = wrapInData(testFilePaths, fileFormat);
//determine how we will compare the graphs
- boolean areLossy = areLossy(testConvRefs) && areLossy(compareConvRefs);
- boolean preserveIds = false; //TODO: determine this somehow
- NewGraphComparer comparer = getComparer(areLossy, preserveIds);
+ boolean isLossy = testConvs.isLossy() && compareConvs.isLossy();
+ boolean preserveIDs = testConvs.preservesIDs() &&
+ compareConvs.preservesIDs();
+
+ NewGraphComparer comparer = getComparer(isLossy, preserveIDs);
//pack all the data relevant to the test into a single object.
- TestConfigData testData = new TestConfigData(comparer, testConvAlgs,
- compareConvAlgs, cContext, fileData);
+ TestConfigData testBasicData = new TestConfigData(comparer, testConvs,
+ compareConvs, cContext, testFileData);
//run the test
- FilePassResult[] results = this.testRunner.runTest(testData);
+ FilePassResult[] results = this.testRunner.runTest(testBasicData);
//return the results of the test
- return new TestResult(results);
+ return new TestResult(results, testConvs, compareConvs);
}
-
-
- private AlgorithmFactory[] extractAlgorithms(ServiceReference[] convRefs,
- BundleContext bContext) {
- AlgorithmFactory[] results = new AlgorithmFactory[convRefs.length];
- for (int ii = 0; ii < convRefs.length; ii++) {
- results[ii] = (AlgorithmFactory) bContext.getService(convRefs[ii]);
- }
- return results;
- }
-
-
+
private Data[][] wrapInData(String[] testFilePaths, String format) {
Data[][] results = new Data[testFilePaths.length][1];
@@ -178,26 +161,14 @@
results[ii] =
new Data[] {new BasicData(new File(filePath), format)};
+
+ Dictionary metadata = results[ii][0].getMetaData();
+ metadata.put(DataProperty.LABEL, filePath);
}
return results;
}
-
- private boolean areLossy(ServiceReference[] refs) {
-
- String lossiness = LOSSLESS;
- for (int i=0; i < refs.length; i++) {
- if (LOSSY.equals(refs[i].getProperty(CONVERSION))) {
- lossiness = LOSSY;
- }
- }
-
- boolean result = lossiness.equals(LOSSY);
- return result;
- }
-
-
private NewGraphComparer getComparer(boolean areLossy,
boolean idsPreserved) {
@@ -210,5 +181,4 @@
}
}
-
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2007-08-15 19:55:26 UTC (rev 469)
@@ -13,13 +13,14 @@
import org.cishell.framework.algorithm.AlgorithmFactory;
import org.cishell.framework.data.BasicData;
import org.cishell.framework.data.Data;
+import org.cishell.testing.convertertester.core.converter.graph.ConverterPath;
import org.cishell.testing.convertertester.core.tester.graphcomparison.ComparisonResult;
-import org.cishell.testing.convertertester.core.tester2.filepassresults.ComparePhaseFailure;
-import org.cishell.testing.convertertester.core.tester2.filepassresults.ConvertPhaseFailure;
-import org.cishell.testing.convertertester.core.tester2.filepassresults.FilePassResult;
-import org.cishell.testing.convertertester.core.tester2.filepassresults.FilePassSuccess;
import org.cishell.testing.convertertester.core.tester2.graphcomparison.NewGraphComparer;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.ConvFailureInfo;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.converter.ConvFailureInfo;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.ComparePhaseFailure;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.ConvertPhaseFailure;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.FilePassSuccess;
import org.osgi.service.log.LogService;
import prefuse.data.Graph;
@@ -35,14 +36,12 @@
public FilePassResult[] runTest(TestConfigData testData) {
Data[][] testFileData = testData.getTestFileData();
- AlgorithmFactory[] testConverters = testData.getTestConverters();
- AlgorithmFactory[] comparisonConverters = testData
+ ConverterPath testConverters = testData.getTestConverters();
+ ConverterPath comparisonConverters = testData
.getComparisonConverters();
+ List testResults = new ArrayList();
- // list of FilePassResult
- final List testResults = new ArrayList();
-
for (int ii = 0; ii < testFileData.length; ii++) {
Data[] originalFileData = testFileData[ii];
@@ -53,8 +52,7 @@
if (!testPhaseResult.succeeded()) {
ConvertPhaseFailure failure = new ConvertPhaseFailure(
- originalFileData, testConverters, comparisonConverters,
- testPhaseResult.getFailInfo(),
+ originalFileData, testPhaseResult.getFailInfo(),
ConvertPhaseFailure.TEST_PHASE);
testResults.add(failure);
continue;
@@ -68,7 +66,7 @@
if (!comparisonPhaseResult1.succeeded()) {
ConvertPhaseFailure failure = new ConvertPhaseFailure(
- originalFileData, testConverters, comparisonConverters,
+ originalFileData,
comparisonPhaseResult1.getFailInfo(),
ConvertPhaseFailure.TEST_PHASE);
testResults.add(failure);
@@ -81,7 +79,7 @@
if (!comparisonPhaseResult2.succeeded()) {
ConvertPhaseFailure failure = new ConvertPhaseFailure(
- originalFileData, testConverters, comparisonConverters,
+ originalFileData,
comparisonPhaseResult2.getFailInfo(),
ConvertPhaseFailure.COMPARISON_PHASE);
testResults.add(failure);
@@ -101,14 +99,13 @@
if (!graphComparisonPhaseResult.comparisonSucceeded()) {
String explanation = graphComparisonPhaseResult.getLog();
ComparePhaseFailure failure = new ComparePhaseFailure(
- originalFileData, testConverters, comparisonConverters,
+ originalFileData,
explanation);
testResults.add(failure);
continue;
}
- FilePassSuccess success = new FilePassSuccess(originalFileData,
- testConverters, comparisonConverters);
+ FilePassSuccess success = new FilePassSuccess(originalFileData);
testResults.add(success);
}
@@ -118,38 +115,45 @@
}
private ConvertResult convert(Data[] startData,
- AlgorithmFactory[] converters, TestConfigData testData) {
+ ConverterPath converters, TestConfigData testData) {
- // validator takes a string file path, all others just take files or
- // graphs or whatever);
Data[] currentData = getFilePathData(startData);
-
- AlgorithmFactory currentConverter = converters[0];
+ AlgorithmFactory[] converterAlgs = converters.getPathAsAlgorithms();
+
+ AlgorithmFactory currentConverterAlg = converterAlgs[0];
try {
- for (int ii = 0; ii < converters.length; ii++) {
- currentConverter = converters[ii];
- Algorithm currentAlgorithm = currentConverter.createAlgorithm(
- currentData, new Hashtable(), testData.getContext());
+ for (int ii = 0; ii < converterAlgs.length; ii++) {
+ currentConverterAlg = converterAlgs[ii];
+ Algorithm currentAlgorithm =
+ currentConverterAlg.createAlgorithm(currentData,
+ new Hashtable(), testData.getContext());
currentData = currentAlgorithm.execute();
if (currentData == null) {
+ String converterName = converters.getConverterName(ii);
ConvFailureInfo failInfo = new ConvFailureInfo(
- "null result data", currentConverter);
+ "Result data is null. " +
+ "Check NWB GUI Console for specific error.",
+ converterName);
ConvertResult result = new ConvertResult(failInfo);
return result;
}
- BasicData currentDataImpl = (BasicData) currentData[0];
+ Data currentDataImpl = (Data) currentData[0];
if (currentDataImpl.getData() == null) {
+ String converterName = converters.getConverterName(ii);
ConvFailureInfo failInfo = new ConvFailureInfo(
- "null result data contents", currentConverter);
+ "Contents of result data is null. " +
+ "Check NWB GUI Console for specific error.",
+ converterName);
ConvertResult result = new ConvertResult(failInfo);
return result;
}
}
} catch (Throwable t) {
ConvFailureInfo failInfo = new ConvFailureInfo(t.toString()
- + getStackTrace(t), currentConverter);
+ + getStackTrace(t),
+ currentConverterAlg.getClass().toString());
ConvertResult result = new ConvertResult(failInfo);
return result;
}
@@ -201,12 +205,12 @@
}
private Data[] getFilePathData(Data[] fileData) {
- BasicData basicData = (BasicData) fileData[0];
- String format = basicData.getFormat();
- File actualFile = (File) basicData.getData();
+ Data Data = (Data) fileData[0];
+ String format = Data.getFormat();
+ File actualFile = (File) Data.getData();
try {
String filePath = actualFile.getCanonicalPath();
- BasicData result = new BasicData(filePath, format);
+ Data result = new BasicData(filePath, format);
return new Data[] { result };
} catch (IOException e) {
this.log.log(LogService.LOG_ERROR, "Could not get file path " +
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestConfigData.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestConfigData.java 2007-08-10 17:32:32 UTC (rev 468)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestConfigData.java 2007-08-15 19:55:26 UTC (rev 469)
@@ -1,21 +1,21 @@
package org.cishell.testing.convertertester.core.tester2;
import org.cishell.framework.CIShellContext;
-import org.cishell.framework.algorithm.AlgorithmFactory;
import org.cishell.framework.data.Data;
+import org.cishell.testing.convertertester.core.converter.graph.ConverterPath;
import org.cishell.testing.convertertester.core.tester2.graphcomparison.NewGraphComparer;
public class TestConfigData {
private NewGraphComparer comparer;
- private AlgorithmFactory[] testConverters;
- private AlgorithmFactory[] comparisonConverters;
+ priva...
[truncated message content] |
|
From: <mwl...@us...> - 2007-08-10 17:32:39
|
Revision: 468
http://cishell.svn.sourceforge.net/cishell/?rev=468&view=rev
Author: mwlinnem
Date: 2007-08-10 10:32:32 -0700 (Fri, 10 Aug 2007)
Log Message:
-----------
Removed blank lines at end of files, and added appropriate header lines.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile1.nwb
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile2.nwb
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile3.nwb
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile4.nwb
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile5.nwb
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile6.nwb
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile7.nwb
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile8.nwb
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile1.nwb
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile1.nwb 2007-08-09 20:16:20 UTC (rev 467)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile1.nwb 2007-08-10 17:32:32 UTC (rev 468)
@@ -197,4 +197,4 @@
599 576
599 583
599 587
-599 598
+599 598
\ No newline at end of file
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile2.nwb
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile2.nwb 2007-08-09 20:16:20 UTC (rev 467)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile2.nwb 2007-08-10 17:32:32 UTC (rev 468)
@@ -166,4 +166,4 @@
599 576
599 583
599 587
-599 598
+599 598
\ No newline at end of file
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile3.nwb
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile3.nwb 2007-08-09 20:16:20 UTC (rev 467)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile3.nwb 2007-08-10 17:32:32 UTC (rev 468)
@@ -1,4 +1,5 @@
*Nodes
+id*int label*string
541 "SLP"
542 "wg"
543 "WG"
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile4.nwb
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile4.nwb 2007-08-09 20:16:20 UTC (rev 467)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile4.nwb 2007-08-10 17:32:32 UTC (rev 468)
@@ -1,4 +1,4 @@
-
+*Nodes
id*int label*string
541 "SLP"
542 "wg"
@@ -197,4 +197,4 @@
599 576
599 583
599 587
-599 598
+599 598
\ No newline at end of file
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile5.nwb
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile5.nwb 2007-08-09 20:16:20 UTC (rev 467)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile5.nwb 2007-08-10 17:32:32 UTC (rev 468)
@@ -197,4 +197,4 @@
599 576
599 583
599 587
-599 598
+599 598
\ No newline at end of file
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile6.nwb
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile6.nwb 2007-08-09 20:16:20 UTC (rev 467)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile6.nwb 2007-08-10 17:32:32 UTC (rev 468)
@@ -1,4 +1,5 @@
*Nodes
+id*int label*string
541 "SLP"
542 "wg"
543 "WG"
@@ -59,6 +60,7 @@
598 "CI"
599 "CIA"
600 "CIR"
+*DirectedEdges
source*int target*int
541 544
541 557
@@ -195,4 +197,4 @@
599 576
599 583
599 587
-599 598
+599 598
\ No newline at end of file
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile7.nwb
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile7.nwb 2007-08-09 20:16:20 UTC (rev 467)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile7.nwb 2007-08-10 17:32:32 UTC (rev 468)
@@ -197,4 +197,4 @@
599 576
599 583
599 587
-599 598
+599 598
\ No newline at end of file
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile8.nwb
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile8.nwb 2007-08-09 20:16:20 UTC (rev 467)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NWB Files/TestFile8.nwb 2007-08-10 17:32:32 UTC (rev 468)
@@ -1,5 +1,5 @@
*Nodes
-//this is crap idint labelstring
+id*int label*string
541 "SLP"
542 "wg"
543 "WG"
@@ -197,4 +197,4 @@
599 576
599 583
599 587
-599 598
+599 598
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 467
http://cishell.svn.sourceforge.net/cishell/?rev=467&view=rev
Author: teakettle22
Date: 2007-08-09 13:16:20 -0700 (Thu, 09 Aug 2007)
Log Message:
-----------
caught an extra System.out.println
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-09 19:44:36 UTC (rev 466)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-09 20:16:20 UTC (rev 467)
@@ -190,7 +190,7 @@
keySet = (String[])this.fileExtensionCompareConverters.keySet().toArray(keySet);
for(int i = 0; i < keySet.length; i++){
String s = keySet[i];
- System.out.println(s);
+ //System.out.println(s);
sb.append(printComparisonConverterPath(s));
}
sb.trimToSize();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tea...@us...> - 2007-08-09 19:44:40
|
Revision: 466
http://cishell.svn.sourceforge.net/cishell/?rev=466&view=rev
Author: teakettle22
Date: 2007-08-09 12:44:36 -0700 (Thu, 09 Aug 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java 2007-08-09 19:13:21 UTC (rev 465)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java 2007-08-09 19:44:36 UTC (rev 466)
@@ -51,8 +51,9 @@
ServiceReference[] refs = bContext.getServiceReferences(
AlgorithmFactory.class.getName(), filter);
- /* ConverterGraph g = new ConverterGraph(refs);
- System.out.println(g.printComparisonConverterPaths() + "\n" +
+ // ConverterGraph g = new ConverterGraph(refs);
+ // System.out.println(g.printComparisonConverterPaths());
+ /* System.out.println(g.printComparisonConverterPaths() + "\n" +
g.getComparePaths().length + "\n" + g.printTestConverterPaths() + "\n");
int length = 0;
for(int i = 0; i < g.getTestPaths().length; i++){
@@ -61,10 +62,10 @@
}
}
System.out.println(length + " " + g.getTestPaths().length);
+ */
+ // System.out.println(g);
- // System.out.println(g);
- *
-*/ if (refs != null) {
+ if (refs != null) {
for (int i = 0; i < refs.length; ++i) {
this.converterList.put(refs[i].getProperty("service.pid").toString(), refs[i]);
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-09 19:13:21 UTC (rev 465)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-09 19:44:36 UTC (rev 466)
@@ -6,6 +6,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.Map;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
@@ -66,6 +67,7 @@
}
}
+
}
private ConverterPath createPaths(ArrayList algorithms, ConverterPath path, String dataType){
@@ -91,6 +93,7 @@
String firstOutData, lastInData;
firstOutData = ((ServiceReference)cp.getPath().get(0)).getProperty("out_data").toString();
lastInData = ((ServiceReference)cp.getPath().get(cp.getPath().size()-1)).getProperty("in_data").toString();
+ //System.out.println(firstOutData + " " + lastInData);
if(firstOutData.equals(lastInData)){
addTestPath(cp);
}
@@ -100,6 +103,7 @@
if(cp.getOutData() != null){
if(cp.getOutData().equals(ConverterGraph.testOutData)){
String key = cp.getInData() + " " + ((ServiceReference)cp.getPath().get(0)).getProperty("out_data").toString();
+ //System.out.println(key);
if(this.fileExtensionCompareConverters.get(key) == null){
@@ -134,16 +138,19 @@
}
private void addTestPath(ConverterPath p){
- if(this.fileExtensionTestConverters.get(p.getInData()) == null){
+ String key = p.getInData();
+ key += " ";
+ key += ((ServiceReference)p.getPath().get(0)).getProperty("out_data").toString();
+ if(this.fileExtensionTestConverters.get(key) == null){
ArrayList paths = new ArrayList();
paths.add(p);
- this.fileExtensionTestConverters.put(p.getInData(), paths);
+ this.fileExtensionTestConverters.put(key, paths);
}
else{
- ((ArrayList)this.fileExtensionTestConverters.get((p.getInData()))).add(p);
+ ((ArrayList)this.fileExtensionTestConverters.get(key)).add(p);
}
}
@@ -154,7 +161,7 @@
ArrayList al = (ArrayList)this.fileExtensionTestConverters.get(s);
for(int i = 0; i < al.size(); i++){
ConverterPath cp = (ConverterPath)al.get(i);
- sb.append(s + cp.toString());
+ sb.append(cp.toString());
}
sb.trimToSize();
return sb.toString();
@@ -179,11 +186,12 @@
public String printComparisonConverterPaths(){
StringBuffer sb = new StringBuffer();
- String[] keySet = new String[this.fileExtensionTestConverters.keySet().size()];
- keySet = (String[])this.fileExtensionTestConverters.keySet().toArray(keySet);
+ String[] keySet = new String[this.fileExtensionCompareConverters.keySet().size()];
+ keySet = (String[])this.fileExtensionCompareConverters.keySet().toArray(keySet);
for(int i = 0; i < keySet.length; i++){
String s = keySet[i];
- sb.append(printTestConverterPath(s));
+ System.out.println(s);
+ sb.append(printComparisonConverterPath(s));
}
sb.trimToSize();
return sb.toString();
@@ -229,6 +237,7 @@
return (ConverterPath)this.fileExtensionCompareConverters.get(s);
}
+
public ConverterPath[] getComparePaths(){
String[] fileExtensions = (String[])this.fileExtensionCompareConverters.keySet().toArray(new String[0]);
ArrayList graphs = new ArrayList();
@@ -238,6 +247,14 @@
return (ConverterPath[])graphs.toArray(new ConverterPath[0]);
}
+ public Map getCompareMap(){
+ return this.fileExtensionCompareConverters;
+ }
+
+ public Map getTestMap(){
+ return this.fileExtensionTestConverters;
+ }
+
public File asNWB(){
File f = getTempFile();
Map nodes = assembleNodesSet();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-09 19:13:35
|
Revision: 465
http://cishell.svn.sourceforge.net/cishell/?rev=465&view=rev
Author: mwlinnem
Date: 2007-08-09 12:13:21 -0700 (Thu, 09 Aug 2007)
Log Message:
-----------
Added a bunch of extra functionality used in the main part of the Converter Tester.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-06 20:37:40 UTC (rev 464)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-09 19:13:21 UTC (rev 465)
@@ -10,6 +10,7 @@
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
+import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
public class ConverterGraph {
@@ -18,10 +19,12 @@
Map fileExtensionTestConverters;
Map fileExtensionCompareConverters;
ServiceReference[] converters;
+ BundleContext bContext;
private static final String testOutData = "prefuse.data.Graph";
- public ConverterGraph(ServiceReference[] converters){
+ public ConverterGraph(ServiceReference[] converters, BundleContext bContext){
this.converters = converters;
+ this.bContext = bContext;
inDataToAlgorithm = new HashMap();//<String, ArrayList<ServiceReference>>();
fileExtensionTestConverters = new ConcurrentHashMap();//<String, ArrayList<ConverterPath>>();
fileExtensionCompareConverters = new ConcurrentHashMap();//<String, ConverterPath>();
@@ -55,7 +58,7 @@
if(s.startsWith("file-ext")){
- ConverterPath test = new ConverterPath();
+ ConverterPath test = new ConverterPath(this.bContext);
test.setInData(s);
@@ -75,7 +78,7 @@
return path;
}
while(!refs.isEmpty()){
- ConverterPath p = new ConverterPath(path);
+ ConverterPath p = new ConverterPath(path, this.bContext);
p.addAlgorithm((ServiceReference)refs.get(0));
refs.remove(0);
createPaths((ArrayList)this.inDataToAlgorithm.get(p.getOutData()), p, p.getOutData());
@@ -100,14 +103,14 @@
if(this.fileExtensionCompareConverters.get(key) == null){
- this.fileExtensionCompareConverters.put(key, new ConverterPath(cp));
+ this.fileExtensionCompareConverters.put(key, new ConverterPath(cp, this.bContext));
}
else {
ConverterPath tempPath = (ConverterPath)this.fileExtensionCompareConverters.get(key);
int pathSize = tempPath.getPath().size();
if(pathSize > cp.getPath().size()){
- this.fileExtensionCompareConverters.put(key, new ConverterPath(cp));
+ this.fileExtensionCompareConverters.put(key, new ConverterPath(cp, this.bContext));
}
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java 2007-08-06 20:37:40 UTC (rev 464)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java 2007-08-09 19:13:21 UTC (rev 465)
@@ -3,18 +3,28 @@
import java.util.ArrayList;
import java.util.List;
+import org.cishell.framework.algorithm.AlgorithmFactory;
+import org.cishell.framework.algorithm.AlgorithmProperty;
+import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
-public class ConverterPath {
- String in_data;
- String out_data = null;
- ArrayList path;
+public class ConverterPath implements AlgorithmProperty {
+ private String in_data;
+ private String out_data = null;
+ private ArrayList path;
+ private BundleContext bContext;
- public ConverterPath(){
+ boolean algPathCached = false;
+ ArrayList algPath;
+
+ public ConverterPath(BundleContext bContext){
+ this.bContext = bContext;
path = new ArrayList();
}
- public ConverterPath(ConverterPath p){
+ public ConverterPath(ConverterPath p, BundleContext bContext) {
+ this.bContext = bContext;
+
in_data = p.getInData();
out_data = p.getOutData();
@@ -23,14 +33,17 @@
}
public void setInData(String s){
+
this.in_data = s;
}
public void setOutData(String s){
+
this.out_data = s;
}
public boolean addAlgorithm(ServiceReference sr){
+
boolean val = true;
if(path.contains(sr)){
@@ -39,28 +52,53 @@
return false;
}
+
path.add(sr);
+ invalidateAlgPath();
this.setOutData(sr.getProperty("out_data").toString());
return val;
}
public String getInData(){
+
return this.in_data;
}
public String getOutData(){
+
return this.out_data;
}
public List getPath(){
+
return this.path;
}
+ public ServiceReference getRef(int index) {
+
+ return (ServiceReference) this.path.get(index);
+ }
+
+ public AlgorithmFactory getAlg(int index) {
+
+ if (! algPathCached) cacheAlgPath();
+ return (AlgorithmFactory) this.algPath.get(index);
+ }
+
public ServiceReference[] getPathAsArray(){
+
return (ServiceReference[])this.path.toArray(new ServiceReference[0]);
}
+ public AlgorithmFactory[] getPathAsAlgorithms(){
+
+ if (! algPathCached) cacheAlgPath();
+
+ return (AlgorithmFactory[]) this.algPath.toArray(new AlgorithmFactory[0]);
+ }
+
public String toString(){
+
String val = this.in_data +" -->\n";
for(int i = 0; i < this.path.size(); i++){
@@ -70,5 +108,70 @@
val += "--> " + this.out_data + "\n";
return val;
}
+
+ public boolean isLossy() {
+ String lossiness = LOSSLESS;
+ for (int i = 0; i < this.path.size(); i++) {
+ ServiceReference sr = (ServiceReference) this.path.get(i);
+
+ if (LOSSY.equals(sr.getProperty(CONVERSION))) {
+ lossiness = LOSSY;
+ }
+ }
+
+ boolean result = lossiness.equals(LOSSY);
+ return result;
+ }
+
+ public boolean preservesIDs() {
+
+ //TODO: Determine this somehow.
+ return false;
+ }
+
+
+ public ConverterPath appendNonMutating(ConverterPath otherPath) {
+
+ List thisConvPath = this.path;
+ List otherConvPath = otherPath.getPath();
+
+ List thisConvPathCopy = new ArrayList(thisConvPath);
+ thisConvPathCopy.addAll(otherConvPath);
+ ConverterPath combinedPath = new ConverterPath(this.bContext);
+
+ List combinedConvPath = thisConvPathCopy;
+ for (int ii = 0; ii < combinedConvPath.size(); ii++) {
+ ServiceReference sr = (ServiceReference) combinedConvPath.get(ii);
+
+ combinedPath.addAlgorithm(sr);
+ }
+
+ return combinedPath;
+ }
+
+ public int size() {
+
+ return this.path.size();
+ }
+
+
+ private void cacheAlgPath() {
+ this.algPath = new ArrayList();
+
+ for (int i = 0; i < this.path.size(); i++){
+ ServiceReference sr = (ServiceReference)this.path.get(i);
+
+ AlgorithmFactory alg = (AlgorithmFactory) this.bContext.getService(sr);
+ this.algPath.add(alg);
+ }
+
+ this.algPathCached = true;
+ }
+
+ private void invalidateAlgPath() {
+
+ this.algPathCached = false;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-06 20:38:10
|
Revision: 464
http://cishell.svn.sourceforge.net/cishell/?rev=464&view=rev
Author: mwlinnem
Date: 2007-08-06 13:37:40 -0700 (Mon, 06 Aug 2007)
Log Message:
-----------
Fixed typo.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-06 20:17:28 UTC (rev 463)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-06 20:37:40 UTC (rev 464)
@@ -76,7 +76,7 @@
}
while(!refs.isEmpty()){
ConverterPath p = new ConverterPath(path);
- p.addAlgoritm((ServiceReference)refs.get(0));
+ p.addAlgorithm((ServiceReference)refs.get(0));
refs.remove(0);
createPaths((ArrayList)this.inDataToAlgorithm.get(p.getOutData()), p, p.getOutData());
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java 2007-08-06 20:17:28 UTC (rev 463)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java 2007-08-06 20:37:40 UTC (rev 464)
@@ -30,7 +30,7 @@
this.out_data = s;
}
- public boolean addAlgoritm(ServiceReference sr){
+ public boolean addAlgorithm(ServiceReference sr){
boolean val = true;
if(path.contains(sr)){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 463
http://cishell.svn.sourceforge.net/cishell/?rev=463&view=rev
Author: mwlinnem
Date: 2007-08-06 13:17:28 -0700 (Mon, 06 Aug 2007)
Log Message:
-----------
Converted System.out.println to logger.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2007-08-06 20:13:50 UTC (rev 462)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2007-08-06 20:17:28 UTC (rev 463)
@@ -209,9 +209,8 @@
BasicData result = new BasicData(filePath, format);
return new Data[] { result };
} catch (IOException e) {
- System.out.println(e);
- e.printStackTrace();
-
+ this.log.log(LogService.LOG_ERROR, "Could not get file path " +
+ "from file " + actualFile, e);
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 462
http://cishell.svn.sourceforge.net/cishell/?rev=462&view=rev
Author: mwlinnem
Date: 2007-08-06 13:13:50 -0700 (Mon, 06 Aug 2007)
Log Message:
-----------
Prettied up TestFileKeeper and fixed a type causing .net test files not to be loaded.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-06 20:13:00 UTC (rev 461)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-06 20:13:50 UTC (rev 462)
@@ -15,53 +15,74 @@
public class TestFileKeeper {
+ //TODO: How should we expose this to the user?
public static final String DEFAULT_ROOT_DIR = "workspace/org.cishell."
+ "testing.convertertester.core.new/src/org/cishell/testing/"
+ "convertertester/core/test_files/";
public static final String CONF_FILE_NAME = "filetypes.conf";
-
- public static final Pattern LINE_FORMAT =
- Pattern.compile("^file:[^=]*?=[^=]*$");
-
- private Map formatToDir = new HashMap();
+
+ public static final Pattern LINE_FORMAT = Pattern
+ .compile("^file:[^=]*?=[^=]*$");
+
+ private Map formatToTestFileNames = new HashMap();
+
private LogService log;
-
+
public TestFileKeeper(String rootDir, LogService log) {
this.log = log;
-
+ loadTestFileNames(rootDir);
+ }
+
+ public void loadTestFileNames(String rootDir) {
String line;
BufferedReader reader = null;
+
try {
- String filePath = System.getProperty("user.home") + "/" +
- rootDir + CONF_FILE_NAME;
+ //open config file that maps formats to test file directories
+
+ String filePath = System.getProperty("user.home") + "/" + rootDir
+ + CONF_FILE_NAME;
reader = new BufferedReader(new FileReader(filePath));
+
+ //map formats to test files found in specified directories
+
+ //for each file format...
while ((line = reader.readLine()) != null) {
-
Matcher matcher = LINE_FORMAT.matcher(line);
+
if (matcher.matches()) {
+
+ //get the file format and directory name from config file.
+
String[] splitLine = line.split("=");
-
+
String fileFormat = splitLine[0];
- String dir = splitLine[1];
+ String dir = splitLine[1];
+
+ String testFileDirPath = System.getProperty("user.home")
+ + "/" + rootDir + dir;
+
+ //use directory name to get names of test files inside it.
+ String[] testFileNames =
+ getVisibleFileNames(testFileDirPath);
- String testFilePath = System.getProperty("user.home") +
- "/" + rootDir + dir;
+ //associate the file format with the names of test files.
+ this.formatToTestFileNames.put(fileFormat, testFileNames);
- formatToDir.put(fileFormat, testFilePath);
} else {
- this.log.log(LogService.LOG_ERROR, "the line '" + line +
- "' is not formatted correctly");
+ this.log.log(LogService.LOG_ERROR, "the line '" + line
+ + "' is not formatted correctly");
}
}
} catch (IOException e) {
- this.log.log(LogService.LOG_ERROR, "Incorrect directory for " +
- "test file specified", e);
+ this.log.log(LogService.LOG_ERROR, "Incorrect directory for "
+ + "test file specified", e);
e.printStackTrace();
} finally {
- if (reader != null) {
+ if (reader != null) {
try {
- reader.close();
+ reader.close();
} catch (IOException e) {
this.log.log(LogService.LOG_ERROR, "Cannot close reader.",
e);
@@ -69,29 +90,37 @@
}
}
}
-
- //TODO: maybe make it cache the files instead of getting them every time?
+
public String[] getTestFilePaths(String format) {
- List results = new ArrayList();
-
- String testFileDirPath = (String) this.formatToDir.get(format);
- if (testFileDirPath == null) {
- this.log.log(LogService.LOG_ERROR, "Could not load directory " +
- "for files of format " + format);
+ String[] testFileNames = (String[]) this.formatToTestFileNames
+ .get(format);
+ if (testFileNames == null) {
+ this.log.log(LogService.LOG_ERROR, "Could not load directory "
+ + "for files of format " + format);
return new String[0];
}
- File testFileDir = new File(testFileDirPath);
- File[] dirContents = testFileDir.listFiles();
+ return testFileNames;
+ }
+
+ private String[] getVisibleFileNames(String dirName) {
+ List results = new ArrayList();
+
+ File dir = new File(dirName);
+
+ File[] dirContents = dir.listFiles();
for (int ii = 0; ii < dirContents.length; ii++) {
- if (! dirContents[ii].isHidden()) {
+
+ if (!dirContents[ii].isHidden()) {
try {
- String fullTestFilePath = dirContents[ii].getCanonicalPath();
- results.add(fullTestFilePath);
+ String testFilePath = dirContents[ii]
+ .getCanonicalPath();
+ results.add(testFilePath);
} catch (IOException e) {
- this.log.log(LogService.LOG_ERROR, "Could not open " +
- "file " + dirContents[ii], e);
+ this.log.log(LogService.LOG_ERROR,
+ "Could not open " + "file "
+ + dirContents[ii], e);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-06 20:13:03
|
Revision: 461
http://cishell.svn.sourceforge.net/cishell/?rev=461&view=rev
Author: mwlinnem
Date: 2007-08-06 13:13:00 -0700 (Mon, 06 Aug 2007)
Log Message:
-----------
Prettied up TestFileKeeper and fixed a type causing .net test files not to be loaded.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/filetypes.conf
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/filetypes.conf
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/filetypes.conf 2007-08-06 19:14:53 UTC (rev 460)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/filetypes.conf 2007-08-06 20:13:00 UTC (rev 461)
@@ -1,6 +1,6 @@
file:text/edge=Edge Files
file:text/graphml+xml=GraphML Files
-file:application/pajek=Net Files
+file:application/pajek=NET Files
file:text/nwb=NWB Files
file:text/treeml+xml=TreeML Files
file:text/xgmml_xml=XGMML Files
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-06 19:14:56
|
Revision: 460
http://cishell.svn.sourceforge.net/cishell/?rev=460&view=rev
Author: mwlinnem
Date: 2007-08-06 12:14:53 -0700 (Mon, 06 Aug 2007)
Log Message:
-----------
Initial commit for most of this. Converter Tester Phase II rough working version. Needs lots of improvement but does the basics.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
trunk/testing/org.cishell.testing.convertertester.commandline/src/org/cishell/testing/convertertester/commandline/Activator.java
trunk/testing/org.cishell.testing.convertertester.core.new/META-INF/MANIFEST.MF
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConverterTester.java
Added Paths:
-----------
trunk/testing/org.cishell.testing.convertertester.commandline/src/org/cishell/testing/convertertester/commandline/OldActivator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/filetypes.conf
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/OldTestResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestConfigData.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestRunner.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/ComparePhaseFailure.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/ConvertPhaseFailure.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/FilePassResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/FilePassSuccess.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsNotPreservedComparer.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsPreservedComparer.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/LossyComparer.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/NewGraphComparer.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/SimpleGraphComparer.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConverterReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/OverviewReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/SampleResultReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/TestSuiteReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvBasedResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvFailureInfo.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvFilePass.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvFilePassFailure.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvFilePassSuccess.java
Modified: trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-06 15:41:41 UTC (rev 459)
+++ trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -6,45 +6,55 @@
import org.cishell.framework.CIShellContext;
import org.cishell.framework.algorithm.Algorithm;
+import org.cishell.framework.algorithm.AlgorithmFactory;
+import org.cishell.framework.algorithm.AlgorithmProperty;
+import org.cishell.framework.data.BasicData;
import org.cishell.framework.data.Data;
-import org.cishell.testing.convertertester.core.tester.ConverterTester;
+import org.cishell.framework.data.DataProperty;
+import org.cishell.testing.convertertester.core.tester2.ConverterTester2;
+import org.cishell.testing.convertertester.core.tester2.reportgen.ConverterReportGenerator;
+import org.cishell.testing.convertertester.core.tester2.reportgen.OverviewReportGenerator;
+import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
+import org.cishell.testing.convertertester.core.tester2.reportgen.SampleResultReportGenerator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
-//TODO: OMG Fix this whole thing as soon as possible.
+//TODO: Only just barely usable to run converter tester from GUI.
+//TODO: Make it nice eventually
-public class ConverterTesterAlgorithm implements Algorithm {
+public class ConverterTesterAlgorithm implements Algorithm, AlgorithmProperty {
private static File currentDir;
- Data[] data;
- Dictionary parameters;
- CIShellContext context;
- ConverterTester tester;
+ private Data[] data;
+ private Dictionary parameters;
+ private CIShellContext cContext;
+ private BundleContext bContext;
+ private LogService logger;
public ConverterTesterAlgorithm(Data[] data, Dictionary parameters,
- CIShellContext csContext, BundleContext bContext ) {
+ CIShellContext cContext, BundleContext bContext ) {
this.data = data;
this.parameters = parameters;
- this.context = csContext;
+ this.cContext = cContext;
+ this.bContext = bContext;
- this.tester = new ConverterTester(bContext, csContext);
-// ServiceReference ctReference = bContext.getServiceReference(ConverterTester.class.getName());
-// this.tester = (ConverterTester) bContext.getService(ctReference);
+ this.logger = (LogService) cContext.getService(
+ LogService.class.getName());
}
public Data[] execute() {
-// int counter = PlatformUI.getWorkbench().getWorkbenchWindowCount();
-// System.out.println("counter is "+counter);
-// ?? why getActiveWorkbenchWindow() didn't work??
Data[] returnDM;
final IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- if (windows.length ==0){
+ if (windows.length == 0) {
return null;
}
@@ -103,21 +113,71 @@
}
}
dialog.setFilterPath(currentDir.getPath());
- dialog.setText("Select a File");
+ dialog.setText("Select a File: Too bad we aren't using it, haha!");
String fileName = dialog.open();
if (fileName == null) {
return;
}
-
- File file = new File(fileName);
try {
- tester.runTests(file);
+ ConverterTester2 ct = new ConverterTester2(logger);
+ ServiceReference[] refs = getServiceReferences();
+ OverviewReportGenerator overviewGen =
+ new OverviewReportGenerator();
+ SampleResultReportGenerator sampleGen =
+ new SampleResultReportGenerator(10, 5);
+ ConverterReportGenerator convGen =
+ new ConverterReportGenerator();
+
+ ct.execute(refs, cContext, bContext, logger,
+ new ReportGenerator[] {overviewGen, sampleGen, convGen});
+
+ File overviewReport = overviewGen.getReport();
+ BasicData overviewReportData =
+ createReportData(overviewReport, "Overview");
+ returnList.add(overviewReportData);
+
+
+ File sampleReport = sampleGen.getReport();
+ BasicData sampleReportData =
+ createReportData(sampleReport, "Sample Test Results");
+ returnList.add(sampleReportData);
+
+
+ File convReport = convGen.getReport();
+ BasicData convReportData =
+ createReportData(convReport, "Basic Converter Results");
+ returnList.add(convReportData);
+
} catch (Exception e) {
System.out.println("Why oh why am I catching type Exception?");
System.out.println(e);
+ e.printStackTrace();
}
}
}
+ private BasicData createReportData(Object report, String label) {
+ BasicData reportData = new BasicData(report, "file:text/plain");
+ Dictionary metadata = reportData.getMetaData();
+ metadata.put(DataProperty.LABEL, label);
+ metadata.put(DataProperty.TYPE, DataProperty.TEXT_TYPE);
+ return reportData;
+ }
+
+ private ServiceReference[] getServiceReferences() {
+ String filter = "(&("+ALGORITHM_TYPE+"="+TYPE_CONVERTER+"))";// +
+
+ try {
+ ServiceReference[] refs = bContext.getServiceReferences(
+ AlgorithmFactory.class.getName(), filter);
+
+ return refs;
+ } catch (InvalidSyntaxException e) {
+ System.out.println("OOPS!");
+ System.out.println(e);
+ return null;
+ }
+ }
+
}
\ No newline at end of file
Modified: trunk/testing/org.cishell.testing.convertertester.commandline/src/org/cishell/testing/convertertester/commandline/Activator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.commandline/src/org/cishell/testing/convertertester/commandline/Activator.java 2007-08-06 15:41:41 UTC (rev 459)
+++ trunk/testing/org.cishell.testing.convertertester.commandline/src/org/cishell/testing/convertertester/commandline/Activator.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -6,16 +6,24 @@
import org.cishell.framework.CIShellContext;
import org.cishell.framework.LocalCIShellContext;
-import org.cishell.testing.convertertester.core.tester.ConverterTester;
+import org.cishell.framework.algorithm.AlgorithmFactory;
+import org.cishell.framework.algorithm.AlgorithmProperty;
+import org.cishell.testing.convertertester.core.tester2.ConverterTester2;
+import org.cishell.testing.convertertester.core.tester2.reportgen.OverviewReportGenerator;
+import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
-public class Activator implements BundleActivator{
- private ConverterTester ct;
+public class Activator implements BundleActivator, AlgorithmProperty {
+ private ConverterTester2 ct;
private BundleContext b;
private CIShellContext c;
private File configFile;
+ private LogService logger;
public static final String QUIT = "q";
@@ -23,11 +31,27 @@
this.b = b;
this.c = new LocalCIShellContext(b);
+ this.logger = (LogService) c.getService(
+ LogService.class.getName());
startCommandLine();
}
+ public ServiceReference[] getServiceReferences() {
+ String filter = "(&("+ALGORITHM_TYPE+"="+TYPE_CONVERTER+"))";// +
+ try {
+ ServiceReference[] refs = b.getServiceReferences(
+ AlgorithmFactory.class.getName(), filter);
+
+ return refs;
+ } catch (InvalidSyntaxException e) {
+ System.out.println("OOPS!");
+ System.out.println(e);
+ return null;
+ }
+ }
+
public void stop(BundleContext b){
System.out.println("Goodbye!");
@@ -62,29 +86,17 @@
}
}
- private void processConfigurationFile(File f)
- throws FileNotFoundException {
+ private void processConfigurationFile(File f) throws FileNotFoundException {
System.out.println("Processing " + f.getName());
- if(!f.isHidden() && (f.getName().charAt(0) != '.')){
- if(f.isDirectory()){
- File[] files = f.listFiles();
- for (int ii = 0; ii < files.length; ii++) {
- File ff = files[ii];
- processConfigurationFile(ff);
- }
- }
- else{
- try{
- ct = new ConverterTester(b, c, f);
- System.out.println(ct);
- ct.testFiles();
- ct.printResults();
- }catch(Exception ex){
- System.out.println("Failed to create " +
- "ConverterTester\n\n");
- ex.printStackTrace();
- }
- }
+ try {
+ ServiceReference[] refs = getServiceReferences();
+ ct = new ConverterTester2(this.logger);
+ ReportGenerator overview = new OverviewReportGenerator();
+ ct.execute(refs, c, b, logger, new ReportGenerator[] {overview});
+ System.out.println(ct);
+ } catch (Exception ex) {
+ System.out.println("Failed to create " + "ConverterTester\n\n");
+ ex.printStackTrace();
}
}
}
Added: trunk/testing/org.cishell.testing.convertertester.commandline/src/org/cishell/testing/convertertester/commandline/OldActivator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.commandline/src/org/cishell/testing/convertertester/commandline/OldActivator.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.commandline/src/org/cishell/testing/convertertester/commandline/OldActivator.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,91 @@
+package org.cishell.testing.convertertester.commandline;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.Scanner;
+
+import org.cishell.framework.CIShellContext;
+import org.cishell.framework.LocalCIShellContext;
+import org.cishell.testing.convertertester.core.tester.ConverterTester;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+
+public class OldActivator implements BundleActivator{
+ private ConverterTester ct;
+ private BundleContext b;
+ private CIShellContext c;
+ private File configFile;
+
+ public static final String QUIT = "q";
+
+ public void start(BundleContext b){
+ this.b = b;
+ this.c = new LocalCIShellContext(b);
+
+ startCommandLine();
+ }
+
+
+
+ public void stop(BundleContext b){
+ System.out.println("Goodbye!");
+
+ b = null;
+ c = null;
+ configFile = null;
+ ct = null;
+ }
+
+ public void startCommandLine(){
+ Scanner in = new Scanner(System.in);
+ while(true) {
+ System.out.println("Welcome to NWB's Converter Tester");
+ System.out.println( "Please enter the name of a configuration " +
+ "file or\n a directory of configuration files (" + QUIT +
+ ") to quit): ");
+
+ String s = in.nextLine();
+ if(s.trim().equalsIgnoreCase(QUIT))
+ break;
+ try{
+ configFile = new File(s);
+ processConfigurationFile(configFile);
+ }
+ catch (NullPointerException ex){
+ System.out.println("Invalid file name");;
+ }
+ catch(FileNotFoundException fnfe){
+ System.out.println("Could not find the specified " +
+ "configuration file");
+ }
+ }
+ }
+
+ private void processConfigurationFile(File f)
+ throws FileNotFoundException {
+ System.out.println("Processing " + f.getName());
+ if(!f.isHidden() && (f.getName().charAt(0) != '.')){
+ if(f.isDirectory()){
+ File[] files = f.listFiles();
+ for (int ii = 0; ii < files.length; ii++) {
+ File ff = files[ii];
+ processConfigurationFile(ff);
+ }
+ }
+ else{
+ try{
+ ct = new ConverterTester(b, c, f);
+ System.out.println(ct);
+ ct.testFiles();
+ ct.printResults();
+ }catch(Exception ex){
+ System.out.println("Failed to create " +
+ "ConverterTester\n\n");
+ ex.printStackTrace();
+ }
+ }
+ }
+ }
+}
+
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/META-INF/MANIFEST.MF
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/META-INF/MANIFEST.MF 2007-08-06 15:41:41 UTC (rev 459)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/META-INF/MANIFEST.MF 2007-08-06 19:14:53 UTC (rev 460)
@@ -15,4 +15,7 @@
org.osgi.service.metatype;version="1.1.0",
org.osgi.service.prefs;version="1.1.0"
Require-Bundle: org.prefuse.lib
-Export-Package: org.cishell.testing.convertertester.core.tester
+Export-Package: org.cishell.testing.convertertester.core.tester,
+ org.cishell.testing.convertertester.core.tester2,
+ org.cishell.testing.convertertester.core.tester2.reportgen,
+ org.cishell.testing.convertertester.core.tester2.reportgen.results
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/filetypes.conf
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/filetypes.conf (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/filetypes.conf 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,6 @@
+file:text/edge=Edge Files
+file:text/graphml+xml=GraphML Files
+file:application/pajek=Net Files
+file:text/nwb=NWB Files
+file:text/treeml+xml=TreeML Files
+file:text/xgmml_xml=XGMML Files
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConverterTester.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConverterTester.java 2007-08-06 15:41:41 UTC (rev 459)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConverterTester.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -121,6 +121,7 @@
System.out.println("Converting " + f.getCanonicalPath());
Data inData = new BasicData(f.getCanonicalPath(),"");
Data dm = cnv.convert(inData);
+
if(dm != null){
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/OldTestResult.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/OldTestResult.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/OldTestResult.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,17 @@
+package org.cishell.testing.convertertester.core.tester;
+
+public abstract class OldTestResult {
+ public abstract String getType();
+ public abstract String[] getTestConverterNames();
+ public abstract String[] getComparisonConverterNames();
+
+ public boolean hasExplanation() {return false;}
+ public boolean hasFailedConverterName() {return false;}
+ public boolean hasOriginalGraphName() {return false;}
+ public boolean hasResultingGraphNames() {return false;}
+
+ public String getExplanation() {return "";}
+ public String getFailedConverterName() {return "";}
+ public String getOriginalGraphName() {return "";}
+ public String[] getResultGraphNames() {return new String[0];}
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,214 @@
+package org.cishell.testing.convertertester.core.tester2;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.cishell.framework.CIShellContext;
+import org.cishell.framework.algorithm.AlgorithmFactory;
+import org.cishell.framework.algorithm.AlgorithmProperty;
+import org.cishell.framework.data.BasicData;
+import org.cishell.framework.data.Data;
+import org.cishell.testing.convertertester.core.converter.graph.ConverterGraph;
+import org.cishell.testing.convertertester.core.converter.graph.ConverterPath;
+import org.cishell.testing.convertertester.core.tester2.filepassresults.FilePassResult;
+import org.cishell.testing.convertertester.core.tester2.graphcomparison.IdsNotPreservedComparer;
+import org.cishell.testing.convertertester.core.tester2.graphcomparison.IdsPreservedComparer;
+import org.cishell.testing.convertertester.core.tester2.graphcomparison.LossyComparer;
+import org.cishell.testing.convertertester.core.tester2.graphcomparison.NewGraphComparer;
+import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
+
+/**
+ * Test Suites are arrays of test paths, where each test path starts
+ * from the same file format.
+ *
+ * Compare Paths are paths of converters that convert from the original file
+ * format to the in-memory comparison format. For each test suite there
+ * is a single corresponding compare path.
+ *
+ * @author mwlinnem
+ *
+ */
+public class ConverterTester2 implements AlgorithmProperty {
+
+ private LogService log;
+
+ private TestFileKeeper testFileKeeper;
+ private TestRunner testRunner;
+
+
+ public ConverterTester2(LogService log) {
+ this.log = log;
+ this.testFileKeeper =
+ new TestFileKeeper(TestFileKeeper.DEFAULT_ROOT_DIR, log);
+ this.testRunner = new DefaultTestRunner(log);
+ }
+
+
+ /**
+ * Tests the provided converters, and passes the results of those tests to
+ * the report generators. Report Generators are side-effected, which takes
+ * the place of a return value.
+ *
+ * @param converterRefs the converters to be tested
+ * @param cContext the CIShell Context
+ * @param bContext the Bundle Context
+ * @param log The log written to should an error occur (other than the
+ * errors resulting from the converters, which are included in the test
+ * results)
+ * @param reportGenerators process the test results.
+ */
+ public void execute(ServiceReference[] converterRefs,
+ CIShellContext cContext,
+ BundleContext bContext,
+ LogService log,
+ ReportGenerator[] reportGenerators) {
+
+ this.log = log;
+
+ //generate test paths
+
+ ConverterGraph converterGraph = new ConverterGraph(converterRefs);
+
+ ConverterPath[][] testSuites = converterGraph.getTestPaths();
+ ConverterPath[] comparePaths = converterGraph.getComparePaths();
+
+ //run tests on test paths
+
+ TestResult[] results = runTests(testSuites, comparePaths,
+ cContext, bContext);
+
+ //generate reports based on test results
+
+ for (int ii = 0; ii < reportGenerators.length; ii++) {
+ ReportGenerator reportGenerator = reportGenerators[ii];
+
+ reportGenerator.generateReport(results);
+ }
+ }
+
+
+ public TestResult[] runTests(ConverterPath[][] testSuites,
+ ConverterPath[] comparePaths, CIShellContext cContext,
+ BundleContext bContext) {
+
+ List testResults = new ArrayList();
+
+ for (int ii = 0; ii < testSuites.length; ii++) {
+ ConverterPath[] testSuite = testSuites[ii];
+ ConverterPath testSuiteComparePath = comparePaths[ii];
+
+ for (int jj = 0; jj < testSuite.length; jj++) {
+ ConverterPath testPath = testSuite[jj];
+
+ TestResult testResult = runATest(testPath,
+ testSuiteComparePath, cContext, bContext);
+
+ if (testResult != null) {
+ testResults.add(testResult);
+ }
+ }
+
+ }
+
+ return (TestResult[]) testResults.toArray(new TestResult[0]);
+ }
+
+
+ private TestResult runATest(ConverterPath testConvs,
+ ConverterPath comparisonConvs, CIShellContext cContext,
+ BundleContext bContext) {
+
+ ServiceReference[] testConvRefs = testConvs.getPathAsArray();
+ ServiceReference[] compareConvRefs = comparisonConvs.getPathAsArray();
+
+ AlgorithmFactory[] testConvAlgs = extractAlgorithms(
+ testConvRefs, bContext);
+ AlgorithmFactory[] compareConvAlgs = extractAlgorithms(
+ compareConvRefs, bContext);
+
+ if (testConvRefs.length <= 0) {
+ System.out.println("Must have at least one test converter..");
+ return null;
+ }
+
+ //get test files corresponding to the format these converters accept.
+
+ String fileFormat =
+ (String) testConvRefs[0].getProperty(AlgorithmProperty.OUT_DATA);
+ String[] testFilePaths = testFileKeeper.getTestFilePaths(fileFormat);
+ Data[][] fileData = wrapInData(testFilePaths, fileFormat);
+
+ //determine how we will compare the graphs
+
+ boolean areLossy = areLossy(testConvRefs) && areLossy(compareConvRefs);
+ boolean preserveIds = false; //TODO: determine this somehow
+ NewGraphComparer comparer = getComparer(areLossy, preserveIds);
+
+ //pack all the data relevant to the test into a single object.
+ TestConfigData testData = new TestConfigData(comparer, testConvAlgs,
+ compareConvAlgs, cContext, fileData);
+
+ //run the test
+ FilePassResult[] results = this.testRunner.runTest(testData);
+
+ //return the results of the test
+ return new TestResult(results);
+ }
+
+
+ private AlgorithmFactory[] extractAlgorithms(ServiceReference[] convRefs,
+ BundleContext bContext) {
+ AlgorithmFactory[] results = new AlgorithmFactory[convRefs.length];
+ for (int ii = 0; ii < convRefs.length; ii++) {
+ results[ii] = (AlgorithmFactory) bContext.getService(convRefs[ii]);
+ }
+ return results;
+ }
+
+
+ private Data[][] wrapInData(String[] testFilePaths, String format) {
+
+ Data[][] results = new Data[testFilePaths.length][1];
+ for (int ii = 0; ii < testFilePaths.length; ii++) {
+ String filePath = testFilePaths[ii];
+
+ results[ii] =
+ new Data[] {new BasicData(new File(filePath), format)};
+ }
+
+ return results;
+ }
+
+
+ private boolean areLossy(ServiceReference[] refs) {
+
+ String lossiness = LOSSLESS;
+ for (int i=0; i < refs.length; i++) {
+ if (LOSSY.equals(refs[i].getProperty(CONVERSION))) {
+ lossiness = LOSSY;
+ }
+ }
+
+ boolean result = lossiness.equals(LOSSY);
+ return result;
+ }
+
+
+ private NewGraphComparer getComparer(boolean areLossy,
+ boolean idsPreserved) {
+
+ if (areLossy) {
+ return new LossyComparer();
+ } else if (! idsPreserved) {
+ return new IdsNotPreservedComparer();
+ } else {
+ return new IdsPreservedComparer();
+ }
+ }
+
+
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,219 @@
+package org.cishell.testing.convertertester.core.tester2;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import org.cishell.framework.algorithm.Algorithm;
+import org.cishell.framework.algorithm.AlgorithmFactory;
+import org.cishell.framework.data.BasicData;
+import org.cishell.framework.data.Data;
+import org.cishell.testing.convertertester.core.tester.graphcomparison.ComparisonResult;
+import org.cishell.testing.convertertester.core.tester2.filepassresults.ComparePhaseFailure;
+import org.cishell.testing.convertertester.core.tester2.filepassresults.ConvertPhaseFailure;
+import org.cishell.testing.convertertester.core.tester2.filepassresults.FilePassResult;
+import org.cishell.testing.convertertester.core.tester2.filepassresults.FilePassSuccess;
+import org.cishell.testing.convertertester.core.tester2.graphcomparison.NewGraphComparer;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.ConvFailureInfo;
+import org.osgi.service.log.LogService;
+
+import prefuse.data.Graph;
+
+public class DefaultTestRunner implements TestRunner {
+
+ private LogService log;
+
+ public DefaultTestRunner(LogService log) {
+ this.log = log;
+ }
+
+ public FilePassResult[] runTest(TestConfigData testData) {
+
+ Data[][] testFileData = testData.getTestFileData();
+ AlgorithmFactory[] testConverters = testData.getTestConverters();
+ AlgorithmFactory[] comparisonConverters = testData
+ .getComparisonConverters();
+
+
+ // list of FilePassResult
+ final List testResults = new ArrayList();
+
+ for (int ii = 0; ii < testFileData.length; ii++) {
+ Data[] originalFileData = testFileData[ii];
+
+ // test conversion phase
+
+ ConvertResult testPhaseResult = convert(originalFileData,
+ testConverters, testData);
+
+ if (!testPhaseResult.succeeded()) {
+ ConvertPhaseFailure failure = new ConvertPhaseFailure(
+ originalFileData, testConverters, comparisonConverters,
+ testPhaseResult.getFailInfo(),
+ ConvertPhaseFailure.TEST_PHASE);
+ testResults.add(failure);
+ continue;
+ }
+ Data[] resultFileData = testPhaseResult.getResult();
+
+ // comparison conversion phase
+
+ ConvertResult comparisonPhaseResult1 = convert(originalFileData,
+ comparisonConverters, testData);
+
+ if (!comparisonPhaseResult1.succeeded()) {
+ ConvertPhaseFailure failure = new ConvertPhaseFailure(
+ originalFileData, testConverters, comparisonConverters,
+ comparisonPhaseResult1.getFailInfo(),
+ ConvertPhaseFailure.TEST_PHASE);
+ testResults.add(failure);
+ continue;
+ }
+ Data[] originalInMemory = comparisonPhaseResult1.getResult();
+
+ ConvertResult comparisonPhaseResult2 = convert(resultFileData,
+ comparisonConverters, testData);
+
+ if (!comparisonPhaseResult2.succeeded()) {
+ ConvertPhaseFailure failure = new ConvertPhaseFailure(
+ originalFileData, testConverters, comparisonConverters,
+ comparisonPhaseResult2.getFailInfo(),
+ ConvertPhaseFailure.COMPARISON_PHASE);
+ testResults.add(failure);
+ continue;
+ }
+ Data[] resultInMemory = comparisonPhaseResult2.getResult();
+
+ // graph comparison phase
+
+ Graph origGraph = (Graph) resultInMemory[0].getData();
+ Graph resultGraph = (Graph) originalInMemory[0].getData();
+
+ NewGraphComparer comparer = testData.getComparer();
+ ComparisonResult graphComparisonPhaseResult = comparer.compare(
+ origGraph, resultGraph);
+
+ if (!graphComparisonPhaseResult.comparisonSucceeded()) {
+ String explanation = graphComparisonPhaseResult.getLog();
+ ComparePhaseFailure failure = new ComparePhaseFailure(
+ originalFileData, testConverters, comparisonConverters,
+ explanation);
+ testResults.add(failure);
+ continue;
+ }
+
+ FilePassSuccess success = new FilePassSuccess(originalFileData,
+ testConverters, comparisonConverters);
+ testResults.add(success);
+ }
+
+ FilePassResult[] result = new FilePassResult[testResults.size()];
+ result = (FilePassResult[]) testResults.toArray(result);
+ return result;
+ }
+
+ private ConvertResult convert(Data[] startData,
+ AlgorithmFactory[] converters, TestConfigData testData) {
+
+ // validator takes a string file path, all others just take files or
+ // graphs or whatever);
+ Data[] currentData = getFilePathData(startData);
+
+ AlgorithmFactory currentConverter = converters[0];
+ try {
+ for (int ii = 0; ii < converters.length; ii++) {
+ currentConverter = converters[ii];
+ Algorithm currentAlgorithm = currentConverter.createAlgorithm(
+ currentData, new Hashtable(), testData.getContext());
+ currentData = currentAlgorithm.execute();
+
+ if (currentData == null) {
+ ConvFailureInfo failInfo = new ConvFailureInfo(
+ "null result data", currentConverter);
+ ConvertResult result = new ConvertResult(failInfo);
+ return result;
+ }
+
+ BasicData currentDataImpl = (BasicData) currentData[0];
+ if (currentDataImpl.getData() == null) {
+ ConvFailureInfo failInfo = new ConvFailureInfo(
+ "null result data contents", currentConverter);
+ ConvertResult result = new ConvertResult(failInfo);
+ return result;
+ }
+ }
+ } catch (Throwable t) {
+ ConvFailureInfo failInfo = new ConvFailureInfo(t.toString()
+ + getStackTrace(t), currentConverter);
+ ConvertResult result = new ConvertResult(failInfo);
+ return result;
+ }
+
+ Data[] resultData = currentData;
+ ConvertResult result = new ConvertResult(resultData);
+ return result;
+ }
+
+ private class ConvertResult {
+
+ private boolean succeeded;
+
+ private Data[] result;
+
+ private ConvFailureInfo failInfo;
+
+ public ConvertResult(Data[] result) {
+ this.result = result;
+
+ this.succeeded = true;
+ }
+
+ public ConvertResult(ConvFailureInfo failInfo) {
+ this.failInfo = failInfo;
+
+ this.succeeded = false;
+ }
+
+ public boolean succeeded() {
+ return this.succeeded;
+ }
+
+ public Data[] getResult() {
+ return result;
+ }
+
+ public ConvFailureInfo getFailInfo() {
+ return this.failInfo;
+ }
+ }
+
+ private String getStackTrace(Throwable t) {
+ final Writer writer = new StringWriter();
+ final PrintWriter printWriter = new PrintWriter(writer);
+ t.printStackTrace(printWriter);
+ return writer.toString();
+
+ }
+
+ private Data[] getFilePathData(Data[] fileData) {
+ BasicData basicData = (BasicData) fileData[0];
+ String format = basicData.getFormat();
+ File actualFile = (File) basicData.getData();
+ try {
+ String filePath = actualFile.getCanonicalPath();
+ BasicData result = new BasicData(filePath, format);
+ return new Data[] { result };
+ } catch (IOException e) {
+ System.out.println(e);
+ e.printStackTrace();
+
+ return null;
+ }
+
+ }
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestConfigData.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestConfigData.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestConfigData.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,48 @@
+package org.cishell.testing.convertertester.core.tester2;
+
+import org.cishell.framework.CIShellContext;
+import org.cishell.framework.algorithm.AlgorithmFactory;
+import org.cishell.framework.data.Data;
+import org.cishell.testing.convertertester.core.tester2.graphcomparison.NewGraphComparer;
+
+public class TestConfigData {
+
+ private NewGraphComparer comparer;
+ private AlgorithmFactory[] testConverters;
+ private AlgorithmFactory[] comparisonConverters;
+ private CIShellContext context;
+ private Data[][] testFileData;
+
+ public TestConfigData(NewGraphComparer comparer,
+ AlgorithmFactory[] testConverters,
+ AlgorithmFactory[] comparisonConverters,
+ CIShellContext context,
+ Data[][] testFileData) {
+ this.comparer = comparer;
+ this.testConverters = testConverters;
+ this.comparisonConverters = comparisonConverters;
+ this.context = context;
+ this.testFileData = testFileData;
+ }
+
+ public NewGraphComparer getComparer() {
+ return this.comparer;
+ }
+
+ public AlgorithmFactory[] getComparisonConverters() {
+ return this.comparisonConverters;
+ }
+
+ public CIShellContext getContext() {
+ return this.context;
+ }
+
+ public AlgorithmFactory[] getTestConverters() {
+ return this.testConverters;
+ }
+
+ public Data[][] getTestFileData() {
+ return this.testFileData;
+ }
+
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,102 @@
+package org.cishell.testing.convertertester.core.tester2;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.osgi.service.log.LogService;
+
+public class TestFileKeeper {
+
+ public static final String DEFAULT_ROOT_DIR = "workspace/org.cishell."
+ + "testing.convertertester.core.new/src/org/cishell/testing/"
+ + "convertertester/core/test_files/";
+
+ public static final String CONF_FILE_NAME = "filetypes.conf";
+
+ public static final Pattern LINE_FORMAT =
+ Pattern.compile("^file:[^=]*?=[^=]*$");
+
+ private Map formatToDir = new HashMap();
+ private LogService log;
+
+ public TestFileKeeper(String rootDir, LogService log) {
+ this.log = log;
+
+ String line;
+ BufferedReader reader = null;
+ try {
+ String filePath = System.getProperty("user.home") + "/" +
+ rootDir + CONF_FILE_NAME;
+ reader = new BufferedReader(new FileReader(filePath));
+ while ((line = reader.readLine()) != null) {
+
+ Matcher matcher = LINE_FORMAT.matcher(line);
+ if (matcher.matches()) {
+ String[] splitLine = line.split("=");
+
+ String fileFormat = splitLine[0];
+ String dir = splitLine[1];
+
+ String testFilePath = System.getProperty("user.home") +
+ "/" + rootDir + dir;
+
+ formatToDir.put(fileFormat, testFilePath);
+ } else {
+ this.log.log(LogService.LOG_ERROR, "the line '" + line +
+ "' is not formatted correctly");
+ }
+ }
+ } catch (IOException e) {
+ this.log.log(LogService.LOG_ERROR, "Incorrect directory for " +
+ "test file specified", e);
+ e.printStackTrace();
+ } finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ } catch (IOException e) {
+ this.log.log(LogService.LOG_ERROR, "Cannot close reader.",
+ e);
+ }
+ }
+ }
+ }
+
+ //TODO: maybe make it cache the files instead of getting them every time?
+ public String[] getTestFilePaths(String format) {
+
+ List results = new ArrayList();
+
+ String testFileDirPath = (String) this.formatToDir.get(format);
+ if (testFileDirPath == null) {
+ this.log.log(LogService.LOG_ERROR, "Could not load directory " +
+ "for files of format " + format);
+ return new String[0];
+ }
+ File testFileDir = new File(testFileDirPath);
+ File[] dirContents = testFileDir.listFiles();
+
+ for (int ii = 0; ii < dirContents.length; ii++) {
+ if (! dirContents[ii].isHidden()) {
+ try {
+ String fullTestFilePath = dirContents[ii].getCanonicalPath();
+ results.add(fullTestFilePath);
+ } catch (IOException e) {
+ this.log.log(LogService.LOG_ERROR, "Could not open " +
+ "file " + dirContents[ii], e);
+ }
+ }
+ }
+
+ return (String[]) results.toArray(new String[0]);
+ }
+
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestResult.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestResult.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestResult.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,77 @@
+package org.cishell.testing.convertertester.core.tester2;
+
+import org.cishell.testing.convertertester.core.tester2.filepassresults.FilePassResult;
+
+public class TestResult {
+
+ private FilePassResult[] fprs;
+
+ private boolean cachedSuccesses = false;
+ private boolean[] successes;
+
+
+
+ public TestResult(FilePassResult[] fprs) {
+ this.fprs = fprs;
+ this.successes = new boolean[fprs.length];
+ }
+
+ public FilePassResult[] getFilePassResults() {
+ return fprs;
+ }
+
+ public boolean allSucceeded() {
+ if (! cachedSuccesses) cacheSuccesses();
+
+ boolean allSucceeded = true;
+ for (int ii = 0; ii < successes.length; ii++) {
+ if (successes[ii] == false) {
+ allSucceeded = false;
+ break;
+ }
+ }
+
+ return allSucceeded;
+ }
+
+ public boolean allFailed() {
+ if (! cachedSuccesses) cacheSuccesses();
+
+ boolean allFailed = true;
+ for (int ii = 0; ii < successes.length; ii++) {
+ if (successes[ii] == true) {
+ allFailed = false;
+ break;
+ }
+ }
+
+ return allFailed;
+ }
+
+ public boolean someSucceeded() {
+ return ! allFailed();
+ }
+
+ public boolean someFailed() {
+ return ! allSucceeded();
+ }
+
+ private void cacheSuccesses() {
+ for (int ii = 0; ii < fprs.length; ii++) {
+ FilePassResult fpr = fprs[ii];
+
+ if (fpr.getType().equals(FilePassResult.SUCCESS)) {
+ this.successes[ii] = true;
+ } else {
+ this.successes[ii] = false;
+ }
+ }
+
+ this.cachedSuccesses = true;
+ }
+
+
+
+
+
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestRunner.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestRunner.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestRunner.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,7 @@
+package org.cishell.testing.convertertester.core.tester2;
+
+import org.cishell.testing.convertertester.core.tester2.filepassresults.FilePassResult;
+
+public interface TestRunner {
+ public FilePassResult[] runTest(TestConfigData testData);
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/ComparePhaseFailure.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/ComparePhaseFailure.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/ComparePhaseFailure.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,27 @@
+package org.cishell.testing.convertertester.core.tester2.filepassresults;
+
+import org.cishell.framework.algorithm.AlgorithmFactory;
+import org.cishell.framework.data.Data;
+
+public class ComparePhaseFailure extends FilePassResult {
+
+ private String explanation;
+
+ public ComparePhaseFailure(
+ Data[] originalData,
+ AlgorithmFactory[] testConverters,
+ AlgorithmFactory[] comparisonConverters,
+ String explanation) {
+ super(originalData, testConverters, comparisonConverters);
+ this.explanation = explanation;
+ }
+
+ public String getExplanation() {
+ return this.explanation;
+ }
+
+ public String getType() {
+ return FilePassResult.COMPARE_FAILURE;
+ }
+
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/ConvertPhaseFailure.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/ConvertPhaseFailure.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/ConvertPhaseFailure.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,44 @@
+package org.cishell.testing.convertertester.core.tester2.filepassresults;
+
+import org.cishell.framework.algorithm.AlgorithmFactory;
+import org.cishell.framework.data.Data;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.ConvFailureInfo;
+
+public class ConvertPhaseFailure extends FilePassResult {
+
+ public static final String TEST_PHASE = "test conversion phase";
+ public static final String COMPARISON_PHASE = "comparison conversion phase";
+
+ private String explanation;
+ private AlgorithmFactory failedConverter;
+ private String phase;
+
+ public ConvertPhaseFailure(
+ Data[] originalData,
+ AlgorithmFactory[] testConverters,
+ AlgorithmFactory[] comparisonConverters,
+ ConvFailureInfo convertFailInfo,
+ String phase) {
+ super(originalData, testConverters, comparisonConverters);
+ this.explanation = convertFailInfo.getExplanation();
+ this.failedConverter = convertFailInfo.getFailedConverter();
+ this.phase = phase;
+ }
+
+ public String getPhase() {
+ return this.phase;
+ }
+
+ public String getExplanation() {
+ return this.explanation;
+ }
+
+ public AlgorithmFactory getFailedConverter() {
+ return this.failedConverter;
+ }
+
+ public String getType() {
+ return FilePassResult.CONVERT_FAILURE;
+ }
+
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/FilePassResult.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/FilePassResult.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/FilePassResult.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,60 @@
+package org.cishell.testing.convertertester.core.tester2.filepassresults;
+
+import org.cishell.framework.algorithm.AlgorithmFactory;
+import org.cishell.framework.data.Data;
+
+public abstract class FilePassResult {
+
+ public static final String SUCCESS = "success";
+ public static final String CONVERT_FAILURE = "convert failure";
+ public static final String COMPARE_FAILURE = "compare failure";
+
+ private AlgorithmFactory[] testConverters;
+ private AlgorithmFactory[] comparisonConverters;
+ private AlgorithmFactory[] allConverters;
+ private Data[] originalData;
+
+ public FilePassResult(
+ Data[] originalData,
+ AlgorithmFactory[] testConverters,
+ AlgorithmFactory[] comparisonConverters) {
+ this.originalData = originalData;
+ this.testConverters = testConverters;
+ this.comparisonConverters = comparisonConverters;
+ }
+
+ public AlgorithmFactory[] getTestConverters() {
+ return this.testConverters;
+ }
+
+ public AlgorithmFactory[] getComparisonConverters() {
+ return this.comparisonConverters;
+ }
+
+ public AlgorithmFactory[] getAllConverters() {
+ if (this.allConverters == null) {
+ initializeAllConverters();
+ }
+
+ return this.allConverters;
+ }
+
+ public Data[] getOriginalData() {
+ return this.originalData;
+ }
+
+ public abstract String getType();
+
+ private void initializeAllConverters() {
+ this.allConverters = new AlgorithmFactory[testConverters.length +
+ comparisonConverters.length];
+ for (int ii = 0; ii < testConverters.length; ii++) {
+ allConverters[ii] = testConverters[ii];
+ }
+
+ int startIndex = testConverters.length;
+ for (int ii = startIndex; ii < startIndex + comparisonConverters.length; ii++) {
+ allConverters[ii] = comparisonConverters[ii - startIndex];
+ }
+ }
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/FilePassSuccess.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/FilePassSuccess.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/filepassresults/FilePassSuccess.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,18 @@
+package org.cishell.testing.convertertester.core.tester2.filepassresults;
+
+import org.cishell.framework.algorithm.AlgorithmFactory;
+import org.cishell.framework.data.Data;
+
+public class FilePassSuccess extends FilePassResult {
+
+ public FilePassSuccess(
+ Data[] originalData,
+ AlgorithmFactory[] testConverters,
+ AlgorithmFactory[] comparisonConverters) {
+ super(originalData, testConverters, comparisonConverters);
+ }
+
+ public String getType() {
+ return FilePassResult.SUCCESS;
+ }
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsNotPreservedComparer.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsNotPreservedComparer.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsNotPreservedComparer.java 2007-08-06 19:14:53 UTC (rev 460)
@@ -0,0 +1,257 @@
+package org.cishell.testing.convertertester.core.tester2.graphcomparison;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.cishell.testing.convertertester.core.tester.graphcomparison.ComparisonResult;
+import org.cishell.testing.convertertester.core.tester.graphcomparison.GraphUtil;
+import org.cishell.testing.convertertester.core.tester.graphcomparison.RunningLog;
+
+import prefuse.data.Graph;
+import prefuse.data.Node;
+import prefuse.data.Table;
+import prefuse.data.Tuple;
+import prefuse.util.collections.IntIterator;
+
+public class IdsNotPreservedComparer extends SimpleGraphComparer {
+
+ private RunningLog log;
+
+ public ComparisonResult compare(Graph g1, Graph g2) {
+ this.log = new RunningLog();
+
+ ComparisonResult simpleCompareResult = super.compare(g1, g2);
+
+ if (! simpleCompareResult.comparisonSucceeded()) {
+ return simpleCompareResult;
+ }
+
+ log.append(simpleCompareResult.getLog());
+
+ if (! nodeDegreeFrequenciesEqual(g1, g2))
+ return new ComparisonResult(false, "The number of nodes" +
+ "with a certain number of edges is not the same in" +
+ "both graphs.", log);
+
+ /*
+ * TODO: we could really use a graph isomorphism comparison right
+ * here. nodeDegreeFrequencies will catch some errors, but lets
+ * a lot through.
+ */
+
+ if (! haveSameNodeAttributes(g1, g2))
+ return new ComparisonResult(false, "Node attributes are not " +
+ "the same in both graphs.", log);
+
+ if (! haveSameEdgeAttributes(g1, g2))
+ return new ComparisonResult(false, "Edge attributes are not " +
+ "the same in both graphs.", log);
+
+ //all tests passed
+ return new ComparisonResult(true, "All tests succeeded.", log);
+ }
+
+ /*
+ * Tests whether there are an equal numbers of nodes with the same
+ * number of edges in each graph, e.g. 5 nodes with 1 edge, 12 nodes
+ * with 2 edges etc.. .
+ *
+ * Possibly useful when graph IDs are modified by the conversion.
+ */
+ private boolean nodeDegreeFrequenciesEqual(Graph g1, Graph g2) {
+ Set e1 = getNodeDegreeFrequencies(g1);
+ Set e2 = getNodeDegreeFrequencies(g2);
+
+ boolean result = e1.equals(e2);
+ return result;
+ }
+
+ /*
+ * Helper method for nodeDegreeFrequenciesEqual
+ */
+ private Set getNodeDegreeFrequencies(Graph g) {
+ Map nodeDegreeFrequencies
+ = new HashMap();
+
+ /*
+ * TODO: (might want to shortcut all of this by counting from 0 to
+ * numberOfNodes)
+ */
+ Table nodeTable = g.getNodeTable();
+ for (IntIterator ii = nodeTable.rows(); ii.hasNext();) {
+ int nodeID = ii.nextInt();
+ Node node = g.getNode(nodeID);
+
+ int numEdges = g.getInDegree(node) + g.getOutDegree(node);
+
+ Integer currentFrequency =
+ (Integer) nodeDegreeFrequencies.get(new Integer(numEdges));
+ if (currentFrequency == null) {
+ /*
+ * A node with this number of edges has not been recorded yet,
+ * so we set the number of occurrences to one.
+ */
+ nodeDegreeFrequencies.put(new Integer(numEdges),
+ new Integer(1));
+ } else {
+ /*
+ * A node with this number of edges has been recorded, so
+ * we increment the number of occurrences by one.
+ */
+ nodeDegreeFrequencies.put(new Integer(numEdges),
+ currentFrequency);
+ }
+ }
+
+ //convert the result to a more usable format.
+ Set nodeFrequencyPairs
+ = nodeDegreeFrequencies.entrySet();
+
+ return nodeFrequencyPairs;
+ }
+
+
+ private boolean haveSameNodeAttributes(Graph g1, Graph g2) {
+ Table t1 = getStrippedNodeTable(g1);
+ Table t2 = getStrippedNodeTable(g2);
+ boolean result = areEqualWhenSorted(t1, t2);
+ return result;
+ }
+
+ /*
+ * Determines whether the two graphs have the same edge attributes.
+ * That is, for every edge in table A there is an edge in table B with
+ * the exactly the same attribute values, and vice versa. Has no regard
+ * for source and target IDs, or the order the edgesappear in the edge
+ * tables.
+ */
+ private boolean haveSameEdgeAttributes(Graph g1, Graph g2) {
+ //remove the IDs
+ Table t1 = getStrippedEdgeTable(g1.getEdgeTable());
+ Table t2 = getStrippedEdgeTable(g2.getEdgeTable());
+
+ boolean result = areEqualWhenSorted(t1, t2);
+ return result;
+ }
+
+ /*
+ * These methods do what .equals() should do for their respective objects:
+ * Actually compare the contents to see if they are .equals() to each
+ * other. The default methods instead appear to be doing a memory
+ * location comparison.
+ */
+
+ private boolean areEqual(Graph g1, Graph g2, boolean sort) {
+ Table nodeTable1 = g1.getNodeTable();
+ Table nodeTable2 = g2.getNodeTable();
+
+ if (sort) {
+ if (! areEqualWhenSorted(nodeTable1, nodeTable2))
+ return false;
+ } else {
+ if (! areEqual(nodeTable1, nodeTable2))
+ return false;
+ }
+
+ Table edgeTable1 = g1.getEdgeTable();
+ Table edgeTable2 = g2.getEdgeTable();
+
+ if (sort) {
+ if (! areEqualWhenSorted(edgeTable1, edgeTable2))
+ return false;
+ } else {
+ if (! areEqual(edgeTable1, edgeTable2))
+ return false;
+ }
+
+ return true;
+ }
+
+ private boolean areEqualWhenSorted(Table t1, Table t2) {
+ boolean result = areEqual(GraphUtil.getSorted(t1),
+ GraphUtil.getSorted(t2));
+ return result;
+ }
+
+ /*
+ * Cares about the order of nodes and edges as well.
+ */
+ private boolean areEqual(Table t1, Table t2) {
+ Iterator tuplesIterator1 = t1.tuples();
+ Iterator tuplesIterator2 = t2.tuples();
+
+ while (tuplesIterator1.hasNext()) {
+ Tuple tuple1 = (Tuple) tuplesIterator1.next();
+ Tuple tuple2 = (Tuple) tuplesIterator2.next();
+
+ if (! areEqual(tuple1, tuple2)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ private boolean areEqual(Tuple tu1, Tuple tu2) {
+ if (tu1.getColumnCount() != tu2.getColumnCount()) {
+ log.append("Number of columns in tuples differ.");
+ log.append("First tuple: " + tu1);
+ log.append("Second tuple: " + tu2);
+ return false;
+ }
+
+ for (int ii = 0; ii < tu1.getColumnCount(); ii++) {
+ Object columnContents1 = tu1.get(ii);
+ Object columnContents2 = tu2.get(ii);
+
+ if (columnContents1 == null && columnContents2 == null) {
+ //nulls are equal to each other!
+ continue;
+ } else if (columnContents1 == null) {
+ //one is null and the other is not.
+ log.append("Bad pair of tuples!");
+ log.append(tu1 + " : " + tu2);
+ return false;
+ } else if (columnContents2 == null) {
+ //one is null and the other is not.
+ log.append("Bad pair of tuples!");
+ log.append(tu1 + " : " + tu2);
+ return false;
+ } else if (! tu1.get(ii).equals(tu2.get(ii))){
+ log.append("Bad pair of tuples!");
+ log.append(tu1 + " : " + tu2);
+ //neither are null, but they are still not equal.
+ return false;
+ }
+ }
+
+ //all column contents are equal.
+ return true;
+ }
+
+ /**
+ * Removes source and target columns from a copied version of the table.
+ *
+ * Helper method for haveSameEdgeAttributes
+ *
+ * @param t the original table
+ * @return a stripped copy of the original table
+ */
+ private Table getStrippedEdgeTable(Table t) {
+ Table tCopy = GraphUtil.copyTable(t);
+ tCopy.removeColumn(Graph.DEFAULT_SOURCE_KEY);
+ tCopy.removeColumn(Graph.DEFAULT_TARGET_KEY);
+ return tCopy;
+ }
+
+ private Table getStrippedNodeTable(Graph g) {
+ Table tCopy = GraphUtil.copyTable(g.getNodeTable());
+ String nodeKeyField = g.getNodeKeyField();
+ if (nodeKeyField != null) {
+ tCopy.removeColumn(nodeKeyField);
+ }
+ return tCopy;
+ }
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsPreservedComparer.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsPreserve...
[truncated message content] |
|
From: <mwl...@us...> - 2007-08-06 15:41:47
|
Revision: 459
http://cishell.svn.sourceforge.net/cishell/?rev=459&view=rev
Author: mwlinnem
Date: 2007-08-06 08:41:41 -0700 (Mon, 06 Aug 2007)
Log Message:
-----------
Removed old terror.grapml.xml and replaced with new one.
Added Paths:
-----------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/GraphML Files/terror.graphml.xml
Removed Paths:
-------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/GraphML Files/terror1.graphml.xml
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/GraphML Files/terror.graphml.xml
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/GraphML Files/terror.graphml.xml (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/GraphML Files/terror.graphml.xml 2007-08-06 15:41:41 UTC (rev 459)
@@ -0,0 +1,503 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
+ http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
+
+ <!-- prefuse GraphML Writer | Tue Jul 03 09:45:36 EDT 2007 -->
+ <key id="label" for="node" attr.name="label" attr.type="string"/>
+ <key id="Y" for="node" attr.name="Y" attr.type="string"/>
+ <key id="flight" for="node" attr.name="flight" attr.type="string"/>
+ <key id="pilot" for="node" attr.name="pilot" attr.type="string"/>
+ <key id="id" for="node" attr.name="id" attr.type="string"/>
+ <key id="X" for="node" attr.name="X" attr.type="string"/>
+ <key id="weight" for="edge" attr.name="weight" attr.type="string"/>
+
+ <graph edgedefault="undirected">
+ <!-- nodes -->
+ <node id="n0">
+ <data key="label">Ziad Samir Jarrah</data>
+ <data key="Y">362.0</data>
+ <data key="flight">United Airlines Flight 93 (Pennsylvania)</data>
+ <data key="pilot">true</data>
+ <data key="id">jarrah</data>
+ <data key="X">126.0</data>
+ </node>
+ <node id="n1">
+ <data key="label">Mohamed Atta</data>
+ <data key="Y">393.0</data>
+ <data key="flight">American Airlines Flight 11 (WTC1)</data>
+ <data key="pilot">true</data>
+ <data key="id">atta</data>
+ <data key="X">229.0</data>
+ </node>
+ <node id="n2">
+ <data key="label">Rayed Mohammed Abdullah</data>
+ <data key="Y">67.0</data>
+ <data key="id">abdullah</data>
+ <data key="X">77.0</data>
+ </node>
+ <node id="n3">
+ <data key="label">Hani Hanjour</data>
+ <data key="Y">67.0</data>
+ <data key="flight">American Airlines Flight 77 (Pentagon)</data>
+ <data key="pilot">true</data>
+ <data key="id">hanjour</data>
+ <data key="X">200.0</data>
+ </node>
+ <node id="n4">
+ <data key="label">Satam M. A. Al Suqami</data>
+ <data key="Y">443.0</data>
+ <data key="flight">American Airlines Flight 11 (WTC1)</data>
+ <data key="id">alsuqami</data>
+ <data key="X">413.0</data>
+ </node>
+ <node id="n5">
+ <data key="label">Wail M. Alshehri</data>
+ <data key="Y">501.0</data>
+ <data key="flight">American Airlines Flight 11 (WTC1)</data>
+ <data key="id">walshehri</data>
+ <data key="X">386.0</data>
+ </node>
+ <node id="n6">
+ <data key="label">Abdussattar Shaikh</data>
+ <data key="Y">12.0</data>
+ <data key="id">shaikh</data>
+ <data key="X">529.0</data>
+ </node>
+ <node id="n7">
+ <data key="label">Fayez Rashid Ahmed Hassan Al Qadi Banihammad</data>
+ <data key="Y">536.0</data>
+ <data key="flight">United Airlines Flight 175 (WTC2)</data>
+ <data key="id">banihammad</data>
+ <data key="X">553.0</data>
+ </node>
+ <node id="n8">
+ <data key="label">Habib Zacarias Moussaoui</data>
+ <data key="Y">223.0</data>
+ <data key="id">moussaoui</data>
+ <data key="X">201.0</data>
+ </node>
+ <node id="n9">
+ <data key="label">Abdulaziz Alomari</data>
+ <data key="Y">387.0</data>
+ <data key="flight">American Airlines Flight 11 (WTC1)</data>
+ <data key="id">alomari</data>
+ <data key="X">352.0</data>
+ </node>
+ <node id="n10">
+ <data key="label">Ahmed Khalil Ibrahim Samir Al-Ani</data>
+ <data key="Y">280.0</data>
+ <data key="id">al-ani</data>
+ <data key="X">129.0</data>
+ </node>
+ <node id="n11">
+ <data key="label">Nabil al-Marabh</data>
+ <data key="Y">311.0</data>
+ <data key="id">al-marabh</data>
+ <data key="X">475.0</data>
+ </node>
+ <node id="n12">
+ <data key="label">Ahmed Alghamdi</data>
+ <data key="Y">174.0</data>
+ <data key="flight">United Airlines Flight 175 (WTC2)</data>
+ <data key="id">aalghamdi</data>
+ <data key="X">359.0</data>
+ </node>
+ <node id="n13">
+ <data key="label">Mohand Alshehri</data>
+ <data key="Y">438.0</data>
+ <data key="flight">United Airlines Flight 175 (WTC2)</data>
+ <data key="id">malshehri</data>
+ <data key="X">543.0</data>
+ </node>
+ <node id="n14">
+ <data key="label">Waleed M. Alshehri</data>
+ <data key="Y">571.0</data>
+ <data key="flight">American Airlines Flight 11 (WTC1)</data>
+ <data key="id">alshehri</data>
+ <data key="X">383.0</data>
+ </node>
+ <node id="n15">
+ <data key="label">Ahmed Ibrahim A. Al Haznawi</data>
+ <data key="Y">254.0</data>
+ <data key="flight">United Airlines Flight 93 (Pennsylvania)</data>
+ <data key="id">alhaznawi</data>
+ <data key="X">251.0</data>
+ </node>
+ <node id="n16">
+ <data key="label">Faisal Al Salmi</data>
+ <data key="Y">15.0</data>
+ <data key="id">alsalmi</data>
+ <data key="X">107.0</data>
+ </node>
+ <node id="n17">
+ <data key="label">Mamduh Mahmud Salim</data>
+ <data key="Y">554.0</data>
+ <data key="id">salim</data>
+ <data key="X">71.0</data>
+ </node>
+ <node id="n18">
+ <data key="label">Majed Moqed</data>
+ <data key="Y">12.0</data>
+ <data key="flight">American Airlines Flight 77 (Pentagon)</data>
+ <data key="id">moqed</data>
+ <data key="X">200.0</data>
+ </node>
+ <node id="n19">
+ <data key="label">Mohamed Abdi</data>
+ <data key="Y">73.0</data>
+ <data key="id">abdi</data>
+ <data key="X">544.0</data>
+ </node>
+ <node id="n20">
+ <data key="label">Nawaf Alhazmi</data>
+ <data key="Y">43.0</data>
+ <data key="flight">American Airlines Flight 77 (Pentagon)</data>
+ <data key="id">nalhazmi</data>
+ <data key="X">460.0</data>
+ </node>
+ <node id="n21">
+ <data key="label">Khalid Almihdhar</data>
+ <data key="Y">12.0</data>
+ <data key="flight">American Airlines Flight 77 (Pentagon)</data>
+ <data key="id">almihdhar</data>
+ <data key="X">364.0</data>
+ </node>
+ <node id="n22">
+ <data key="label">Hamza Alghamdi</data>
+ <data key="Y">329.0</data>
+ <data key="flight">United Airlines Flight 175 (WTC2)</data>
+ <data key="id">halghamdi</data>
+ <data key="X">300.0</data>
+ </node>
+ <node id="n23">
+ <data key="label">Mamoun Darkazanli</data>
+ <data key="Y">516.0</data>
+ <data key="id">darkazanli</data>
+ <data key="X">174.0</data>
+ </node>
+ <node id="n24">
+ <data key="label">Ahmed Alnami</data>
+ <data key="Y">161.0</data>
+ <data key="flight">United Airlines Flight 93 (Pennsylvania)</data>
+ <data key="id">alnami</data>
+ <data key="X">460.0</data>
+ </node>
+ <node id="n25">
+ <data key="label">Ramzi Omar</data>
+ <data key="Y">435.0</data>
+ <data key="id">omar</data>
+ <data key="X">41.0</data>
+ </node>
+ <node id="n26">
+ <data key="label">Said Bahaji</data>
+ <data key="Y">393.0</data>
+ <data key="id">bahaji</data>
+ <data key="X">41.0</data>
+ </node>
+ <node id="n27">
+ <data key="label">Lotfi Raissi</data>
+ <data key="Y">186.0</data>
+ <data key="id">raissi</data>
+ <data key="X">77.0</data>
+ </node>
+ <node id="n28">
+ <data key="label">Raed Hijazi</data>
+ <data key="Y">350.0</data>
+ <data key="id">hijazi</data>
+ <data key="X">541.0</data>
+ </node>
+ <node id="n29">
+ <data key="label">Salem Alhazmi</data>
+ <data key="Y">116.0</data>
+ <data key="flight">American Airlines Flight 77 (Pentagon)</data>
+ <data key="id">salhazmi</data>
+ <data key="X">304.0</data>
+ </node>
+ <node id="n30">
+ <data key="label">Shaykh Saiid</data>
+ <data key="Y">517.0</data>
+ <data key="id">saiid</data>
+ <data key="X">287.0</data>
+ </node>
+ <node id="n31">
+ <data key="label">Marwan Al-Shehhi</data>
+ <data key="Y">435.0</data>
+ <data key="flight">United Airlines Flight 175 (WTC2)</data>
+ <data key="pilot">true</data>
+ <data key="id">al-shehhi</data>
+ <data key="X">229.0</data>
+ </node>
+ <node id="n32">
+ <data key="label">Saeed Alghamdi</data>
+ <data key="Y">211.0</data>
+ <data key="flight">United Airlines Flight 93 (Pennsylvania)</data>
+ <data key="id">salghamdi</data>
+ <data key="X">541.0</data>
+ </node>
+ <node id="n33">
+ <data key="label">Zakariya Essabar</data>
+ <data key="Y">469.0</data>
+ <data key="id">essabar</data>
+ <data key="X">126.0</data>
+ </node>
+
+ <!-- edges -->
+ <edge id="e0" source="n21" target="n6">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e1" source="n22" target="n13">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e2" source="n11" target="n28">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e3" source="n31" target="n25">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e4" source="n9" target="n7">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e5" source="n20" target="n19">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e6" source="n26" target="n0">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e7" source="n1" target="n7">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e8" source="n25" target="n1">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e9" source="n4" target="n1">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e10" source="n25" target="n0">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e11" source="n20" target="n29">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e12" source="n20" target="n32">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e13" source="n4" target="n11">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e14" source="n14" target="n9">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e15" source="n24" target="n32">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e16" source="n31" target="n5">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e17" source="n12" target="n3">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e18" source="n18" target="n3">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e19" source="n20" target="n6">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e20" source="n5" target="n7">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e21" source="n17" target="n23">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e22" source="n4" target="n7">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e23" source="n1" target="n27">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e24" source="n1" target="n10">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e25" source="n1" target="n23">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e26" source="n2" target="n16">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e27" source="n1" target="n3">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e28" source="n31" target="n4">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e29" source="n14" target="n4">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e30" source="n18" target="n21">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e31" source="n29" target="n21">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e32" source="n25" target="n26">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e33" source="n32" target="n15">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e34" source="n31" target="n0">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e35" source="n22" target="n24">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e36" source="n33" target="n1">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e37" source="n31" target="n14">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e38" source="n20" target="n21">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e39" source="n31" target="n22">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e40" source="n16" target="n3">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e41" source="n1" target="n26">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e42" source="n21" target="n3">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e43" source="n4" target="n9">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e44" source="n33" target="n0">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e45" source="n29" target="n12">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e46" source="n4" target="n28">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e47" source="n22" target="n15">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e48" source="n31" target="n26">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e49" source="n13" target="n7">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e50" source="n9" target="n3">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e51" source="n4" target="n5">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e52" source="n1" target="n5">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e53" source="n31" target="n30">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e54" source="n18" target="n29">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e55" source="n27" target="n0">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e56" source="n22" target="n32">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e57" source="n14" target="n5">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e58" source="n31" target="n27">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e59" source="n31" target="n1">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e60" source="n2" target="n3">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e61" source="n18" target="n20">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e62" source="n2" target="n27">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e63" source="n1" target="n30">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e64" source="n1" target="n8">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e65" source="n29" target="n9">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e66" source="n31" target="n33">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e67" source="n22" target="n12">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e68" source="n14" target="n7">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e69" source="n11" target="n32">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e70" source="n31" target="n23">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e71" source="n20" target="n3">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e72" source="n29" target="n3">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e73" source="n33" target="n26">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e74" source="n1" target="n0">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e75" source="n9" target="n5">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e76" source="n25" target="n33">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e77" source="n11" target="n12">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e78" source="n27" target="n3">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e79" source="n14" target="n30">
+ <data key="weight">1</data>
+ </edge>
+ <edge id="e80" source="n15" target="n0">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e81" source="n20" target="n24">
+ <data key="weight">3</data>
+ </edge>
+ <edge id="e82" source="n22" target="n20">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e83" source="n32" target="n28">
+ <data key="weight">2</data>
+ </edge>
+ <edge id="e84" source="n12" target="n9">
+ <data key="weight">1</data>
+ </edge>
+ </graph>
+</graphml>
Deleted: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/GraphML Files/terror1.graphml.xml
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/GraphML Files/terror1.graphml.xml 2007-08-06 15:29:38 UTC (rev 458)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/GraphML Files/terror1.graphml.xml 2007-08-06 15:41:41 UTC (rev 459)
@@ -1,503 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
- http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
-
- <!-- prefuse GraphML Writer | Tue Jul 03 09:45:36 EDT 2007 -->
- <key id="label" for="node" attr.name="label" attr.type="string"/>
- <key id="Y" for="node" attr.name="Y" attr.type="string"/>
- <key id="flight" for="node" attr.name="flight" attr.type="string"/>
- <key id="pilot" for="node" attr.name="pilot" attr.type="string"/>
- <key id="id" for="node" attr.name="id" attr.type="string"/>
- <key id="X" for="node" attr.name="X" attr.type="string"/>
- <key id="weight" for="edge" attr.name="weight" attr.type="string"/>
-
- <graph edgedefault="undirected">
- <!-- nodes -->
- <node id="n0">
- <data key="label">Ziad Samir Jarrah</data>
- <data key="Y">362.0</data>
- <data key="flight">United Airlines Flight 93 (Pennsylvania)</data>
- <data key="pilot">true</data>
- <data key="id">jarrah</data>
- <data key="X">126.0</data>
- </node>
- <node id="n1">
- <data key="label">Mohamed Atta</data>
- <data key="Y">393.0</data>
- <data key="flight">American Airlines Flight 11 (WTC1)</data>
- <data key="pilot">true</data>
- <data key="id">atta</data>
- <data key="X">229.0</data>
- </node>
- <node id="n2">
- <data key="label">Rayed Mohammed Abdullah</data>
- <data key="Y">67.0</data>
- <data key="id">abdullah</data>
- <data key="X">77.0</data>
- </node>
- <node id="n3">
- <data key="label">Hani Hanjour</data>
- <data key="Y">67.0</data>
- <data key="flight">American Airlines Flight 77 (Pentagon)</data>
- <data key="pilot">true</data>
- <data key="id">hanjour</data>
- <data key="X">200.0</data>
- </node>
- <node id="n4">
- <data key="label">Satam M. A. Al Suqami</data>
- <data key="Y">443.0</data>
- <data key="flight">American Airlines Flight 11 (WTC1)</data>
- <data key="id">alsuqami</data>
- <data key="X">413.0</data>
- </node>
- <node id="n5">
- <data key="label">Wail M. Alshehri</data>
- <data key="Y">501.0</data>
- <data key="flight">American Airlines Flight 11 (WTC1)</data>
- <data key="id">walshehri</data>
- <data key="X">386.0</data>
- </node>
- <node id="n6">
- <data key="label">Abdussattar Shaikh</data>
- <data key="Y">12.0</data>
- <data key="id">shaikh</data>
- <data key="X">529.0</data>
- </node>
- <node id="n7">
- <data key="label">Fayez Rashid Ahmed Hassan Al Qadi Banihammad</data>
- <data key="Y">536.0</data>
- <data key="flight">United Airlines Flight 175 (WTC2)</data>
- <data key="id">banihammad</data>
- <data key="X">553.0</data>
- </node>
- <node id="n8">
- <data key="label">Habib Zacarias Moussaoui</data>
- <data key="Y">223.0</data>
- <data key="id">moussaoui</data>
- <data key="X">201.0</data>
- </node>
- <node id="n9">
- <data key="label">Abdulaziz Alomari</data>
- <data key="Y">387.0</data>
- <data key="flight">American Airlines Flight 11 (WTC1)</data>
- <data key="id">alomari</data>
- <data key="X">352.0</data>
- </node>
- <node id="n10">
- <data key="label">Ahmed Khalil Ibrahim Samir Al-Ani</data>
- <data key="Y">280.0</data>
- <data key="id">al-ani</data>
- <data key="X">129.0</data>
- </node>
- <node id="n11">
- <data key="label">Nabil al-Marabh</data>
- <data key="Y">311.0</data>
- <data key="id">al-marabh</data>
- <data key="X">475.0</data>
- </node>
- <node id="n12">
- <data key="label">Ahmed Alghamdi</data>
- <data key="Y">174.0</data>
- <data key="flight">United Airlines Flight 175 (WTC2)</data>
- <data key="id">aalghamdi</data>
- <data key="X">359.0</data>
- </node>
- <node id="n13">
- <data key="label">Mohand Alshehri</data>
- <data key="Y">438.0</data>
- <data key="flight">United Airlines Flight 175 (WTC2)</data>
- <data key="id">malshehri</data>
- <data key="X">543.0</data>
- </node>
- <node id="n14">
- <data key="label">Waleed M. Alshehri</data>
- <data key="Y">571.0</data>
- <data key="flight">American Airlines Flight 11 (WTC1)</data>
- <data key="id">alshehri</data>
- <data key="X">383.0</data>
- </node>
- <node id="n15">
- <data key="label">Ahmed Ibrahim A. Al Haznawi</data>
- <data key="Y">254.0</data>
- <data key="flight">United Airlines Flight 93 (Pennsylvania)</data>
- <data key="id">alhaznawi</data>
- <data key="X">251.0</data>
- </node>
- <node id="n16">
- <data key="label">Faisal Al Salmi</data>
- <data key="Y">15.0</data>
- <data key="id">alsalmi</data>
- <data key="X">107.0</data>
- </node>
- <node id="n17">
- <data key="label">Mamduh Mahmud Salim</data>
- <data key="Y">554.0</data>
- <data key="id">salim</data>
- <data key="X">71.0</data>
- </node>
- <node id="n18">
- <data key="label">Majed Moqed</data>
- <data key="Y">12.0</data>
- <data key="flight">American Airlines Flight 77 (Pentagon)</data>
- <data key="id">moqed</data>
- <data key="X">200.0</data>
- </node>
- <node id="n19">
- <data key="label">Mohamed Abdi</data>
- <data key="Y">73.0</data>
- <data key="id">abdi</data>
- <data key="X">544.0</data>
- </node>
- <node id="n20">
- <data key="label">Nawaf Alhazmi</data>
- <data key="Y">43.0</data>
- <data key="flight">American Airlines Flight 77 (Pentagon)</data>
- <data key="id">nalhazmi</data>
- <data key="X">460.0</data>
- </node>
- <node id="n21">
- <data key="label">Khalid Almihdhar</data>
- <data key="Y">12.0</data>
- <data key="flight">American Airlines Flight 77 (Pentagon)</data>
- <data key="id">almihdhar</data>
- <data key="X">364.0</data>
- </node>
- <node id="n22">
- <data key="label">Hamza Alghamdi</data>
- <data key="Y">329.0</data>
- <data key="flight">United Airlines Flight 175 (WTC2)</data>
- <data key="id">halghamdi</data>
- <data key="X">300.0</data>
- </node>
- <node id="n23">
- <data key="label">Mamoun Darkazanli</data>
- <data key="Y">516.0</data>
- <data key="id">darkazanli</data>
- <data key="X">174.0</data>
- </node>
- <node id="n24">
- <data key="label">Ahmed Alnami</data>
- <data key="Y">161.0</data>
- <data key="flight">United Airlines Flight 93 (Pennsylvania)</data>
- <data key="id">alnami</data>
- <data key="X">460.0</data>
- </node>
- <node id="n25">
- <data key="label">Ramzi Omar</data>
- <data key="Y">435.0</data>
- <data key="id">omar</data>
- <data key="X">41.0</data>
- </node>
- <node id="n26">
- <data key="label">Said Bahaji</data>
- <data key="Y">393.0</data>
- <data key="id">bahaji</data>
- <data key="X">41.0</data>
- </node>
- <node id="n27">
- <data key="label">Lotfi Raissi</data>
- <data key="Y">186.0</data>
- <data key="id">raissi</data>
- <data key="X">77.0</data>
- </node>
- <node id="n28">
- <data key="label">Raed Hijazi</data>
- <data key="Y">350.0</data>
- <data key="id">hijazi</data>
- <data key="X">541.0</data>
- </node>
- <node id="n29">
- <data key="label">Salem Alhazmi</data>
- <data key="Y">116.0</data>
- <data key="flight">American Airlines Flight 77 (Pentagon)</data>
- <data key="id">salhazmi</data>
- <data key="X">304.0</data>
- </node>
- <node id="n30">
- <data key="label">Shaykh Saiid</data>
- <data key="Y">517.0</data>
- <data key="id">saiid</data>
- <data key="X">287.0</data>
- </node>
- <node id="n31">
- <data key="label">Marwan Al-Shehhi</data>
- <data key="Y">435.0</data>
- <data key="flight">United Airlines Flight 175 (WTC2)</data>
- <data key="pilot">true</data>
- <data key="id">al-shehhi</data>
- <data key="X">229.0</data>
- </node>
- <node id="n32">
- <data key="label">Saeed Alghamdi</data>
- <data key="Y">211.0</data>
- <data key="flight">United Airlines Flight 93 (Pennsylvania)</data>
- <data key="id">salghamdi</data>
- <data key="X">541.0</data>
- </node>
- <node id="n33">
- <data key="label">Zakariya Essabar</data>
- <data key="Y">469.0</data>
- <data key="id">essabar</data>
- <data key="X">126.0</data>
- </node>
-
- <!-- edges -->
- <edge id="e0" source="n21" target="n6">
- <data key="weight">3</data>
- </edge>
- <edge id="e1" source="n22" target="n13">
- <data key="weight">2</data>
- </edge>
- <edge id="e2" source="n11" target="n28">
- <data key="weight">2</data>
- </edge>
- <edge id="e3" source="n31" target="n25">
- <data key="weight">3</data>
- </edge>
- <edge id="e4" source="n9" target="n7">
- <data key="weight">1</data>
- </edge>
- <edge id="e5" source="n20" target="n19">
- <data key="weight">2</data>
- </edge>
- <edge id="e6" source="n26" target="n0">
- <data key="weight">3</data>
- </edge>
- <edge id="e7" source="n1" target="n7">
- <data key="weight">1</data>
- </edge>
- <edge id="e8" source="n25" target="n1">
- <data key="weight">3</data>
- </edge>
- <edge id="e9" source="n4" target="n1">
- <data key="weight">1</data>
- </edge>
- <edge id="e10" source="n25" target="n0">
- <data key="weight">3</data>
- </edge>
- <edge id="e11" source="n20" target="n29">
- <data key="weight">3</data>
- </edge>
- <edge id="e12" source="n20" target="n32">
- <data key="weight">3</data>
- </edge>
- <edge id="e13" source="n4" target="n11">
- <data key="weight">2</data>
- </edge>
- <edge id="e14" source="n14" target="n9">
- <data key="weight">1</data>
- </edge>
- <edge id="e15" source="n24" target="n32">
- <data key="weight">3</data>
- </edge>
- <edge id="e16" source="n31" target="n5">
- <data key="weight">1</data>
- </edge>
- <edge id="e17" source="n12" target="n3">
- <data key="weight">1</data>
- </edge>
- <edge id="e18" source="n18" target="n3">
- <data key="weight">3</data>
- </edge>
- <edge id="e19" source="n20" target="n6">
- <data key="weight">2</data>
- </edge>
- <edge id="e20" source="n5" target="n7">
- <data key="weight">1</data>
- </edge>
- <edge id="e21" source="n17" target="n23">
- <data key="weight">2</data>
- </edge>
- <edge id="e22" source="n4" target="n7">
- <data key="weight">1</data>
- </edge>
- <edge id="e23" source="n1" target="n27">
- <data key="weight">2</data>
- </edge>
- <edge id="e24" source="n1" target="n10">
- <data key="weight">2</data>
- </edge>
- <edge id="e25" source="n1" target="n23">
- <data key="weight">2</data>
- </edge>
- <edge id="e26" source="n2" target="n16">
- <data key="weight">1</data>
- </edge>
- <edge id="e27" source="n1" target="n3">
- <data key="weight">2</data>
- </edge>
- <edge id="e28" source="n31" target="n4">
- <data key="weight">1</data>
- </edge>
- <edge id="e29" source="n14" target="n4">
- <data key="weight">3</data>
- </edge>
- <edge id="e30" source="n18" target="n21">
- <data key="weight">1</data>
- </edge>
- <edge id="e31" source="n29" target="n21">
- <data key="weight">1</data>
- </edge>
- <edge id="e32" source="n25" target="n26">
- <data key="weight">3</data>
- </edge>
- <edge id="e33" source="n32" target="n15">
- <data key="weight">3</data>
- </edge>
- <edge id="e34" source="n31" target="n0">
- <data key="weight">3</data>
- </edge>
- <edge id="e35" source="n22" target="n24">
- <data key="weight">3</data>
- </edge>
- <edge id="e36" source="n33" target="n1">
- <data key="weight">3</data>
- </edge>
- <edge id="e37" source="n31" target="n14">
- <data key="weight">1</data>
- </edge>
- <edge id="e38" source="n20" target="n21">
- <data key="weight">3</data>
- </edge>
- <edge id="e39" source="n31" target="n22">
- <data key="weight">1</data>
- </edge>
- <edge id="e40" source="n16" target="n3">
- <data key="weight">1</data>
- </edge>
- <edge id="e41" source="n1" target="n26">
- <data key="weight">3</data>
- </edge>
- <edge id="e42" source="n21" target="n3">
- <data key="weight">3</data>
- </edge>
- <edge id="e43" source="n4" target="n9">
- <data key="weight">1</data>
- </edge>
- <edge id="e44" source="n33" target="n0">
- <data key="weight">3</data>
- </edge>
- <edge id="e45" source="n29" target="n12">
- <data key="weight">1</data>
- </edge>
- <edge id="e46" source="n4" target="n28">
- <data key="weight">2</data>
- </edge>
- <edge id="e47" source="n22" target="n15">
- <data key="weight">3</data>
- </edge>
- <edge id="e48" source="n31" target="n26">
- <data key="weight">3</data>
- </edge>
- <edge id="e49" source="n13" target="n7">
- <data key="weight">2</data>
- </edge>
- <edge id="e50" source="n9" target="n3">
- <data key="weight">1</data>
- </edge>
- <edge id="e51" source="n4" target="n5">
- <data key="weight">3</data>
- </edge>
- <edge id="e52" source="n1" target="n5">
- <data key="weight">1</data>
- </edge>
- <edge id="e53" source="n31" target="n30">
- <data key="weight">1</data>
- </edge>
- <edge id="e54" source="n18" target="n29">
- <data key="weight">1</data>
- </edge>
- <edge id="e55" source="n27" target="n0">
- <data key="weight">2</data>
- </edge>
- <edge id="e56" source="n22" target="n32">
- <data key="weight">2</data>
- </edge>
- <edge id="e57" source="n14" target="n5">
- <data key="weight">3</data>
- </edge>
- <edge id="e58" source="n31" target="n27">
- <data key="weight">2</data>
- </edge>
- <edge id="e59" source="n31" target="n1">
- <data key="weight">3</data>
- </edge>
- <edge id="e60" source="n2" target="n3">
- <data key="weight">3</data>
- </edge>
- <edge id="e61" source="n18" target="n20">
- <data key="weight">1</data>
- </edge>
- <edge id="e62" source="n2" target="n27">
- <data key="weight">2</data>
- </edge>
- <edge id="e63" source="n1" target="n30">
- <data key="weight">1</data>
- </edge>
- <edge id="e64" source="n1" target="n8">
- <data key="weight">1</data>
- </edge>
- <edge id="e65" source="n29" target="n9">
- <data key="weight">1</data>
- </edge>
- <edge id="e66" source="n31" target="n33">
- <data key="weight">3</data>
- </edge>
- <edge id="e67" source="n22" target="n12">
- <data key="weight">2</data>
- </edge>
- <edge id="e68" source="n14" target="n7">
- <data key="weight">1</data>
- </edge>
- <edge id="e69" source="n11" target="n32">
- <data key="weight">2</data>
- </edge>
- <edge id="e70" source="n31" target="n23">
- <data key="weight">2</data>
- </edge>
- <edge id="e71" source="n20" target="n3">
- <data key="weight">3</data>
- </edge>
- <edge id="e72" source="n29" target="n3">
- <data key="weight">2</data>
- </edge>
- <edge id="e73" source="n33" target="n26">
- <data key="weight">3</data>
- </edge>
- <edge id="e74" source="n1" target="n0">
- <data key="weight">3</data>
- </edge>
- <edge id="e75" source="n9" target="n5">
- <data key="weight">1</data>
- </edge>
- <edge id="e76" source="n25" target="n33">
- <data key="weight">3</data>
- </edge>
- <edge id="e77" source="n11" target="n12">
- <data key="weight">2</data>
- </edge>
- <edge id="e78" source="n27" target="n3">
- <data key="weight">2</data>
- </edge>
- <edge id="e79" source="n14" target="n30">
- <data key="weight">1</data>
- </edge>
- <edge id="e80" source="n15" target="n0">
- <data key="weight">3</data>
- </edge>
- <edge id="e81" source="n20" target="n24">
- <data key="weight">3</data>
- </edge>
- <edge id="e82" source="n22" target="n20">
- <data key="weight">2</data>
- </edge>
- <edge id="e83" source="n32" target="n28">
- <data key="weight">2</data>
- </edge>
- <edge id="e84" source="n12" target="n9">
- <data key="weight">1</data>
- </edge>
- </graph>
-</graphml>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 458
http://cishell.svn.sourceforge.net/cishell/?rev=458&view=rev
Author: teakettle22
Date: 2007-08-06 08:29:38 -0700 (Mon, 06 Aug 2007)
Log Message:
-----------
fixed another small problem.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java 2007-08-06 15:28:57 UTC (rev 457)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java 2007-08-06 15:29:38 UTC (rev 458)
@@ -62,7 +62,8 @@
}
System.out.println(length + " " + g.getTestPaths().length);
- // System.out.println(g);*/
+ // System.out.println(g);
+ *
*/ if (refs != null) {
for (int i = 0; i < refs.length; ++i) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tea...@us...> - 2007-08-06 15:29:14
|
Revision: 457
http://cishell.svn.sourceforge.net/cishell/?rev=457&view=rev
Author: teakettle22
Date: 2007-08-06 08:28:57 -0700 (Mon, 06 Aug 2007)
Log Message:
-----------
changed how the ConverterPath[][] was generated in getTestPaths.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java 2007-08-01 19:16:21 UTC (rev 456)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java 2007-08-06 15:28:57 UTC (rev 457)
@@ -51,8 +51,19 @@
ServiceReference[] refs = bContext.getServiceReferences(
AlgorithmFactory.class.getName(), filter);
+ /* ConverterGraph g = new ConverterGraph(refs);
+ System.out.println(g.printComparisonConverterPaths() + "\n" +
+ g.getComparePaths().length + "\n" + g.printTestConverterPaths() + "\n");
+ int length = 0;
+ for(int i = 0; i < g.getTestPaths().length; i++){
+ for(int j = 0; j < g.getTestPaths()[i].length; j++){
+ length++;
+ }
+ }
+ System.out.println(length + " " + g.getTestPaths().length);
- if (refs != null) {
+ // System.out.println(g);*/
+*/ if (refs != null) {
for (int i = 0; i < refs.length; ++i) {
this.converterList.put(refs[i].getProperty("service.pid").toString(), refs[i]);
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-01 19:16:21 UTC (rev 456)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-06 15:28:57 UTC (rev 457)
@@ -89,7 +89,7 @@
firstOutData = ((ServiceReference)cp.getPath().get(0)).getProperty("out_data").toString();
lastInData = ((ServiceReference)cp.getPath().get(cp.getPath().size()-1)).getProperty("in_data").toString();
if(firstOutData.equals(lastInData)){
- addPath(cp);
+ addTestPath(cp);
}
}
@@ -130,7 +130,7 @@
return srs;
}
- private void addPath(ConverterPath p){
+ private void addTestPath(ConverterPath p){
if(this.fileExtensionTestConverters.get(p.getInData()) == null){
ArrayList paths = new ArrayList();
@@ -140,7 +140,7 @@
}
else{
- ((ArrayList)this.fileExtensionTestConverters.get(p.getInData())).add(p);
+ ((ArrayList)this.fileExtensionTestConverters.get((p.getInData()))).add(p);
}
}
@@ -151,7 +151,7 @@
ArrayList al = (ArrayList)this.fileExtensionTestConverters.get(s);
for(int i = 0; i < al.size(); i++){
ConverterPath cp = (ConverterPath)al.get(i);
- sb.append(cp.toString());
+ sb.append(s + cp.toString());
}
sb.trimToSize();
return sb.toString();
@@ -213,13 +213,13 @@
}
public ConverterPath[][] getTestPaths(){
+ ConverterPath[][] paths = new ConverterPath[this.fileExtensionTestConverters.keySet().size()][];
String[] fileExtensions = (String[])this.fileExtensionTestConverters.keySet().toArray(new String[0]);
- ArrayList graphs = new ArrayList();
for(int i = 0; i < fileExtensions.length; i++){
- graphs.add(getTestPath(fileExtensions[i]));
+ paths[i] = (getTestPath(fileExtensions[i]));
}
//this line may be busted
- return (ConverterPath[][])graphs.toArray(new ConverterPath[0][]);
+ return paths;
}
public ConverterPath getComparePath(String s){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 456
http://cishell.svn.sourceforge.net/cishell/?rev=456&view=rev
Author: teakettle22
Date: 2007-08-01 12:16:21 -0700 (Wed, 01 Aug 2007)
Log Message:
-----------
Removed the call to .asNWB() that existed for testing purposes.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java 2007-08-01 19:15:24 UTC (rev 455)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java 2007-08-01 19:16:21 UTC (rev 456)
@@ -51,9 +51,7 @@
ServiceReference[] refs = bContext.getServiceReferences(
AlgorithmFactory.class.getName(), filter);
- ConverterGraph g = new ConverterGraph(refs);
- g.asNWB();
-
+
if (refs != null) {
for (int i = 0; i < refs.length; ++i) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 455
http://cishell.svn.sourceforge.net/cishell/?rev=455&view=rev
Author: teakettle22
Date: 2007-08-01 12:15:24 -0700 (Wed, 01 Aug 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-01 19:12:45 UTC (rev 454)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-01 19:15:24 UTC (rev 455)
@@ -28,7 +28,7 @@
associateAlgorithms(this.converters, this.inDataToAlgorithm);
createConverterPaths(this.inDataToAlgorithm, this.fileExtensionTestConverters, this.fileExtensionCompareConverters);
- //System.out.println("And here");
+
}
private void associateAlgorithms(ServiceReference[] sr, Map hm){
@@ -56,11 +56,11 @@
ConverterPath test = new ConverterPath();
- //ConverterPath
+
test.setInData(s);
- //createPaths(algorithms, testPaths, comparePaths, test, s);
+
createPaths((ArrayList)algorithms.get(s), test, s);
- //System.out.println("I've got here");
+
}
}
}
@@ -99,16 +99,14 @@
String key = cp.getInData() + " " + ((ServiceReference)cp.getPath().get(0)).getProperty("out_data").toString();
if(this.fileExtensionCompareConverters.get(key) == null){
- // System.out.println("Adding a new Comparison Path:\n" + cp);
+
this.fileExtensionCompareConverters.put(key, new ConverterPath(cp));
}
else {
ConverterPath tempPath = (ConverterPath)this.fileExtensionCompareConverters.get(key);
int pathSize = tempPath.getPath().size();
if(pathSize > cp.getPath().size()){
- //ConverterPath oldPath = (ConverterPath)this.fileExtensionCompareConverters.get(key);
- //System.out.println("Replacing Comparision Path:\n" + oldPath + "with\n"
- // + cp);
+
this.fileExtensionCompareConverters.put(key, new ConverterPath(cp));
}
}
@@ -124,7 +122,7 @@
ServiceReference sr = (ServiceReference)srs.get(i);
String ss = sr.getProperty("out_data").toString();
if(ss.startsWith("file-ext") && (!ss.equals(cp.getInData()))){
- //System.out.println(sr.getProperty("service.pid") + " yes");
+
forbidden.add(sr);
}
}
@@ -134,16 +132,16 @@
private void addPath(ConverterPath p){
if(this.fileExtensionTestConverters.get(p.getInData()) == null){
- //System.out.println("Adding a new path");
+
ArrayList paths = new ArrayList();
paths.add(p);
this.fileExtensionTestConverters.put(p.getInData(), paths);
- //System.out.println("Successfully Added");
+
}
else{
- //System.out.println("Adding a path");
+
((ArrayList)this.fileExtensionTestConverters.get(p.getInData())).add(p);
- //System.out.println("Successfully Added");
+
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|