From: <mwl...@us...> - 2008-03-26 21:30:24
|
Revision: 724 http://cishell.svn.sourceforge.net/cishell/?rev=724&view=rev Author: mwlinnem Date: 2008-03-26 14:29:56 -0700 (Wed, 26 Mar 2008) Log Message: ----------- Updated to conform to CIShell 1.0. Removed some old stuff that we aren't using anymore. Modified Paths: -------------- trunk/testing/org.cishell.testing.convertertester.algorithm/META-INF/MANIFEST.MF 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/graph/Converter.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/reportgen/alltests/ConvertedDataSubGenerator.java trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/FilePassResult.java Removed 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/ConverterTesterImpl.java trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/service/ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConfigurationFileConstants.java 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/OldTestResult.java Modified: trunk/testing/org.cishell.testing.convertertester.algorithm/META-INF/MANIFEST.MF =================================================================== --- trunk/testing/org.cishell.testing.convertertester.algorithm/META-INF/MANIFEST.MF 2008-03-26 21:12:15 UTC (rev 723) +++ trunk/testing/org.cishell.testing.convertertester.algorithm/META-INF/MANIFEST.MF 2008-03-26 21:29:56 UTC (rev 724) @@ -4,11 +4,10 @@ Bundle-SymbolicName: org.cishell.testing.convertertester.algorithm Bundle-Version: 0.0.1 Bundle-ClassPath: . -Bundle-Localization: plugin Import-Package: org.cishell.app.service.datamanager, - org.cishell.framework, - org.cishell.framework.algorithm, - org.cishell.framework.data, + org.cishell.framework;version="1.0.0", + org.cishell.framework.algorithm;version="1.0.0", + org.cishell.framework.data;version="1.0.0", org.cishell.reference.app.service.datamanager, org.cishell.reference.app.service.scheduler, org.cishell.reference.gui.common, 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 2008-03-26 21:12:15 UTC (rev 723) +++ trunk/testing/org.cishell.testing.convertertester.core.new/META-INF/MANIFEST.MF 2008-03-26 21:29:56 UTC (rev 724) @@ -14,10 +14,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.converter, - org.cishell.testing.convertertester.core.converter.graph, - org.cishell.testing.convertertester.core.service, - org.cishell.testing.convertertester.core.tester, +Export-Package: org.cishell.testing.convertertester.core.converter.graph, org.cishell.testing.convertertester.core.tester.graphcomparison, org.cishell.testing.convertertester.core.tester2, org.cishell.testing.convertertester.core.tester2.fakelogger, Deleted: 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 2008-03-26 21:12:15 UTC (rev 723) +++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterLoaderImpl.java 2008-03-26 21:29:56 UTC (rev 724) @@ -1,146 +0,0 @@ -package org.cishell.testing.convertertester.core.converter; - -import java.util.ArrayList; -import java.util.Hashtable; -import java.util.Map; - -import org.cishell.framework.CIShellContext; -import org.cishell.framework.algorithm.AlgorithmFactory; -import org.cishell.framework.algorithm.AlgorithmProperty; -import org.cishell.service.conversion.Converter; -import org.cishell.service.conversion.DataConversionService; -import org.cishell.testing.convertertester.core.converter.graph.ConverterGraph; -import org.osgi.framework.BundleContext; -import org.osgi.framework.InvalidSyntaxException; -import org.osgi.framework.ServiceEvent; -import org.osgi.framework.ServiceListener; -import org.osgi.framework.ServiceReference; -import org.osgi.service.log.LogService; - - - -public class ConverterLoaderImpl implements AlgorithmProperty, DataConversionService, ServiceListener{ - -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, LogService log){ - this.ciContext = cContext; - this.bContext = bContext; - this.log = log; - converterList = new Hashtable(); - - - - String filter = "(&("+ALGORITHM_TYPE+"="+TYPE_CONVERTER+"))"; - //printConverters(bContext); - - try { - this.bContext.addServiceListener(this, filter); - } catch (InvalidSyntaxException e) { - e.printStackTrace(); - } - assembleGraph(); - } - - private void assembleGraph() { - try { - String filter = "(&("+ALGORITHM_TYPE+"="+TYPE_CONVERTER+"))";// + - - - ServiceReference[] refs = bContext.getServiceReferences( - AlgorithmFactory.class.getName(), filter); - ConverterGraph g = new ConverterGraph(refs, bContext, this.log); - - if (refs != null) { - for (int i = 0; i < refs.length; ++i) { - - this.converterList.put(refs[i].getProperty("service.pid").toString(), refs[i]); - - } - } - } catch (InvalidSyntaxException e) { - throw new RuntimeException(e); - } - } - - - - - - public void serviceChanged(ServiceEvent event) { - ServiceReference inServiceRef = event.getServiceReference(); - - - if (event.getType() == ServiceEvent.MODIFIED) { - this.converterList.put(inServiceRef.getProperty("service.pid").toString(), inServiceRef); - } - else if(event.getType() == ServiceEvent.REGISTERED) { - this.converterList.put(inServiceRef.getProperty("service.pid").toString(), inServiceRef); - } - else if(event.getType() == ServiceEvent.UNREGISTERING) { - System.out.println("Unregistering service: " + inServiceRef); - this.converterList.remove(inServiceRef.getProperty("service.pid").toString()); - - } - } - - - - public Converter[] findConverters(String inFormat, String outFormat, int maxHops, String maxComplexity) { - // TODO Auto-generated method stub - return null; - } - - public Converter[] findConverters(String inFormat, String outFormat) { - // TODO Auto-generated method stub - return null; - } - - - - public Converter getConverter(String[] converterChain) throws Exception{ - ArrayList services = new ArrayList(); - for(int ii = 0; ii < converterChain.length; ii++){ - String s = converterChain[ii]; - ServiceReference ref = (ServiceReference) this.converterList.get(s); - if(ref == null){ - throw new Exception("Converter: " + s + " cannot be found"); - } - services.add(ref); - } - return new ConverterTesterImpl(this.bContext, this.ciContext, (ServiceReference[])services.toArray(new ServiceReference[0])); - } - - private static void printConverters(BundleContext bContext){ - String filter = "(&("+ALGORITHM_TYPE+"="+TYPE_CONVERTER+"))"; - try{ - - ServiceReference[] refs = bContext.getAllServiceReferences(AlgorithmFactory.class.getName(), filter); - for(int ii = 0; ii < refs.length; ii++){ - ServiceReference ref = refs[ii]; - System.out.println("\t"+ref.getProperty("service.pid")); - } - - } - catch(Exception ex){ - System.err.println(ex); - } - - } - - public org.cishell.framework.data.Data convert(org.cishell.framework.data.Data data, String outFormat) { - // TODO Auto-generated method stub - return null; - } - - public Converter[] findConverters(org.cishell.framework.data.Data data, String outFormat) { - // TODO Auto-generated method stub - return null; - } - -} Deleted: 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 2008-03-26 21:12:15 UTC (rev 723) +++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/ConverterTesterImpl.java 2008-03-26 21:29:56 UTC (rev 724) @@ -1,169 +0,0 @@ -package org.cishell.testing.convertertester.core.converter; - -import java.util.Dictionary; -import java.util.Enumeration; -import java.util.Hashtable; - -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.service.conversion.Converter; -import org.osgi.framework.BundleContext; -import org.osgi.framework.Constants; -import org.osgi.framework.ServiceReference; -import org.osgi.service.metatype.MetaTypeProvider; - - - -public class ConverterTesterImpl implements Converter, AlgorithmFactory, AlgorithmProperty{ - private ServiceReference[] refs; - private BundleContext bContext; - private Dictionary props; - private CIShellContext cContext; - - public ConverterTesterImpl(BundleContext bContext, CIShellContext cContext, ServiceReference[] refs) { - this.bContext = bContext; - this.cContext = cContext; - this.refs = refs; - - props = new Hashtable(); - - props.put(IN_DATA, refs[0].getProperty(IN_DATA)); - props.put(OUT_DATA, refs[refs.length-1].getProperty(OUT_DATA)); - props.put(LABEL, props.get(IN_DATA) + " -> " + props.get(OUT_DATA)); - - String lossiness = LOSSLESS; - for (int i=0; i < refs.length; i++) { - if (LOSSY.equals(refs[i].getProperty(CONVERSION))) { - lossiness = LOSSY; - } - } - //TODO: Do the same thing for complexity - props.put(CONVERSION, lossiness); - } - - public Data convert(Data inDM) { - Data[] dm = new Data[]{inDM}; - - AlgorithmFactory factory = getAlgorithmFactory(); - Algorithm alg = factory.createAlgorithm(dm, new Hashtable(), cContext); - - dm = alg.execute(); - - Object outData = null; - if (dm != null && dm.length > 0) { - outData = dm[0].getData(); - } - - if (outData != null) { - Dictionary props = inDM.getMetaData(); - Dictionary newProps = new Hashtable(); - - for (Enumeration e=props.keys(); e.hasMoreElements();) { - Object key = e.nextElement(); - newProps.put(key, props.get(key)); - } - - String outFormat = (String)getProperties().get(AlgorithmProperty.OUT_DATA); - return new BasicData(newProps, outData, outFormat); - } else { - return null; - } - } - - public AlgorithmFactory getAlgorithmFactory() { - // TODO Auto-generated method stub - return this; - } - - public ServiceReference[] getConverterChain() { - // TODO Auto-generated method stub - return this.refs; - } - - public Dictionary getProperties() { - // TODO Auto-generated method stub - return this.props; - } - - public Algorithm createAlgorithm(Data[] data, Dictionary parameters, CIShellContext context) { - // TODO Auto-generated method stub - return new ConverterAlgorithm(data,parameters,context); - } - - public MetaTypeProvider createParameters(Data[] data) { - // TODO Auto-generated method stub - return null; - } - - private class ConverterAlgorithm implements Algorithm { - Data[] inDM; - CIShellContext context; - Dictionary parameters; - - public ConverterAlgorithm(Data[] dm, Dictionary parameters, CIShellContext context) { - this.inDM = dm; - this.parameters = parameters; - this.context = context; - } - - public Data[] execute() { - Data[] dm = inDM; - for (int i=0; i < refs.length; i++) { - AlgorithmFactory factory = (AlgorithmFactory)bContext.getService(refs[i]); - - if (factory != null) { - Algorithm alg = factory.createAlgorithm(dm, parameters, context); -// 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)); - - } - } else { - throw new RuntimeException("Missing subconverter: " - + refs[i].getProperty(Constants.SERVICE_PID)); - } - } - - return dm; - } - } - - public int hashCode() { - return toString().hashCode(); - } - - public String toString() { - String str =""; - ServiceReference[] refs = this.refs; - for (int ii = 0; ii < refs.length; ii++) { - ServiceReference ref = refs[ii]; - str += ref.getProperty(Constants.SERVICE_ID) + " " + ref.getProperty(Constants.SERVICE_PID) + "-> "; - } - return str; - } - - public boolean equals(Object o) { - boolean equals = false; - if (o instanceof Converter) { - ServiceReference[] otherServiceReference = ((Converter)o).getConverterChain(); - if (refs.length == otherServiceReference.length) { - for (int i = 0; i < otherServiceReference.length; i++) { - if (refs[i].getProperty(Constants.SERVICE_ID).equals( - otherServiceReference[i].getProperty(Constants.SERVICE_ID))) { - equals = true; - } else { - equals = false; - break; - } - } - } - } - return equals; - } - -} Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/Converter.java =================================================================== --- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/Converter.java 2008-03-26 21:12:15 UTC (rev 723) +++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/Converter.java 2008-03-26 21:29:56 UTC (rev 724) @@ -4,6 +4,7 @@ import org.cishell.framework.CIShellContext; import org.cishell.framework.algorithm.Algorithm; +import org.cishell.framework.algorithm.AlgorithmExecutionException; import org.cishell.framework.algorithm.AlgorithmFactory; import org.cishell.framework.algorithm.AlgorithmProperty; import org.cishell.framework.data.Data; @@ -69,7 +70,7 @@ } public Data[] execute(Data[] input, Hashtable parameters, - CIShellContext cContext) { + CIShellContext cContext) throws AlgorithmExecutionException { AlgorithmFactory convAlgFactory = (AlgorithmFactory) this.bContext.getService(this.ref); Deleted: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConfigurationFileConstants.java =================================================================== --- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConfigurationFileConstants.java 2008-03-26 21:12:15 UTC (rev 723) +++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConfigurationFileConstants.java 2008-03-26 21:29:56 UTC (rev 724) @@ -1,10 +0,0 @@ -package org.cishell.testing.convertertester.core.tester; - -public class ConfigurationFileConstants { - public static final String TEST_GRAPHS = "test_graphs="; - public static final String TEST_CONVERTERS = "test_converters="; - public static final String COMPARISON_CONVERTERS = "comparison_converters="; - public static final String NODE_ID_CHANGE = "nodeid_change="; - public static final String EXTENSION = "extension="; - -} Deleted: 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 2008-03-26 21:12:15 UTC (rev 723) +++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConverterTester.java 2008-03-26 21:29:56 UTC (rev 724) @@ -1,239 +0,0 @@ -package org.cishell.testing.convertertester.core.tester; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.nio.channels.FileChannel; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import org.cishell.framework.CIShellContext; -import org.cishell.framework.data.BasicData; -import org.cishell.framework.data.Data; -import org.cishell.service.conversion.Converter; -import org.cishell.testing.convertertester.core.converter.ConverterLoaderImpl; -import org.cishell.testing.convertertester.core.service.ConfigurationFileParser; -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; - -public class ConverterTester { - private CIShellContext cContext; - private ConfigurationFileParser cfp; - 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; - private Converter testConverters; - //string, comparisonresult - private Map results; - - public ConverterTester(BundleContext b, CIShellContext c, LogService log){ - this.cContext = c; - this.log = log; - cli = new ConverterLoaderImpl(b, this.cContext, this.log); - cfp = new ConfigurationFileParser(); - } - - public void runTests(File configFile) throws Exception{ - cfp.parseFile(configFile); - testConverters = cli.getConverter(cfp.getTestConverters()); - comparisonConverters = cli.getConverter(cfp.getComparisonConverters()); - results = new HashMap(); - setupDirectory(); - } - - public ConverterTester(BundleContext b, CIShellContext c, File configFile) throws Exception{ - cContext = c; - cli = new ConverterLoaderImpl(b, cContext, this.log); - cfp = new ConfigurationFileParser(configFile); - testConverters = cli.getConverter(cfp.getTestConverters()); - comparisonConverters = cli.getConverter(cfp.getComparisonConverters()); - results = new HashMap(); - setupDirectory(); - } - - public ConverterTester(BundleContext b, CIShellContext c, String configFileName) throws Exception { - cContext = c; - cli = new ConverterLoaderImpl(b,cContext, this.log); - cfp = new ConfigurationFileParser(new File(configFileName)); - testConverters = cli.getConverter(cfp.getTestConverters()); - comparisonConverters = cli.getConverter(cfp.getComparisonConverters()); - results = new HashMap(); - setupDirectory(); - } - - - private void setupDirectory() throws IOException{ - - temporaryStorage = new File(System.getProperty("user.home") + File.separator + - tempDir); - /*+ File.separator + - )) + - "Temp");*/ - temporaryStorage.mkdir(); - int index = cfp.getConfigFile().lastIndexOf("."); - String s; - if(index > 0) - s = cfp.getConfigFile().substring(0, index); - else - s = cfp.getConfigFile(); - temporaryStorage = new File(temporaryStorage.getCanonicalPath()+File.separator+s+"Temp"); - temporaryStorage.mkdir(); - } - - - private void compareFiles(File sourceFile, File convertedFile){ - System.out.println("Comparing: " + sourceFile.getName() + " and " + convertedFile.getName()); - try{ - dgc = new DefaultGraphComparer(); - results.put(sourceFile.getName() + " " + - convertedFile.getName(), - dgc.compare((Graph)convertFile(sourceFile,this.comparisonConverters).getData(), - (Graph)convertFile(convertedFile,this.comparisonConverters).getData(), - ! cfp.getNodeIDChange())); - - } - catch(Exception ex){ - System.out.println("Could not compare the files. We caught a " + ex.getClass().getName() + " exception"); - ex.printStackTrace(); - } - } - - public void compareFiles(){ - File[] files = temporaryStorage.listFiles(); - for (int ii = 0; ii < files.length; ii++){ - File f = files[ii]; - compareFiles(f,f); - } - } - - private Data convertFile(File f, Converter cnv) throws Exception{ - - try{ - //String s = f.getName(); - //String extension = this.testConverters.getProperties().get(AlgorithmProperty.OUT_DATA).toString(); - System.out.println("Converting " + f.getCanonicalPath()); - Data inData = new BasicData(f.getCanonicalPath(),""); - Data dm = cnv.convert(inData); - - - - if(dm != null){ - System.out.println("Successfully Converted "); - return dm; - } - return null; - } - catch(Exception ex){ - System.out.println("Could not Convert"); - //this.fileErrors.put(s, ex); - //ex.printStackTrace(); - throw ex; - //return null; - } - } - - - public void testFile(File f){ - - - if(!f.isHidden()){ - System.out.println("Testing " + f.getName()); - if(f.isDirectory()){ - File[] files = f.listFiles(); - for (int ii = 0; ii < files.length; ii++) { - File ff = files[ii]; - testFile(ff); - } - } - else{ - try{ - Data dm = convertFile(f,this.testConverters); - if(dm != null){ - writeAsFile(dm, f.getName()); - compareFiles(f,(File)dm.getData()); - } - else { - System.out.println("Could not test the files. The resulting data was null."); - } - }catch(Exception ex){ - System.out.println("Could not test the files."); - } - } - } - - } - - public void testFiles(){ - //System.out.println(this.cfp.getFiles().length); - - File[] files = this.cfp.getFiles(); - for(int i = 0; i < files.length; i++){ - File f = files[i]; - this.testFile(f); - } - } - - public String toString(){ - String output = ""; - output += cfp.toString(); - output += testConverters.toString()+"\r\n"; - output += comparisonConverters.toString()+"\r\n"; - return output; - } - - private void writeAsFile(Data inDM, String fileName){ - String s = fileName.substring(0,fileName.lastIndexOf(".")); - if(inDM != null){ - try{ - copy((File)inDM.getData(), new File(temporaryStorage.getCanonicalPath()+ - File.separator+"converted"+ - s+ this.cfp.getExtension())); - }catch(Exception ex){ - ex.printStackTrace(); - } - - } - } - - private boolean copy(File in, File out) { - try { - FileInputStream fis = new FileInputStream(in); - FileOutputStream fos = new FileOutputStream(out); - - FileChannel readableChannel = fis.getChannel(); - FileChannel writableChannel = fos.getChannel(); - - writableChannel.truncate(0); - writableChannel.transferFrom(readableChannel, 0, readableChannel.size()); - fis.close(); - fos.close(); - return true; - } - catch (IOException ioe) { - System.out.println("Copy Error: IOException during copy\r\n" + ioe.getMessage()); - return false; - } - } - - public void printResults(){ - System.out.println("There are " + this.results.size() + " results"); - Iterator iter = this.results.keySet().iterator(); - while (iter.hasNext()){ - String s = (String) iter.next(); - System.out.println(s); - System.out.println("\t"+this.results.get(s)); - } - } - - -} Deleted: 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 2008-03-26 21:12:15 UTC (rev 723) +++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/OldTestResult.java 2008-03-26 21:29:56 UTC (rev 724) @@ -1,17 +0,0 @@ -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];} -} 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 2008-03-26 21:12:15 UTC (rev 723) +++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2008-03-26 21:29:56 UTC (rev 724) @@ -212,7 +212,7 @@ results[ii] = new Data[] {new BasicData(new File(filePath), format)}; - Dictionary metadata = results[ii][0].getMetaData(); + Dictionary metadata = results[ii][0].getMetadata(); metadata.put(DataProperty.LABEL, filePath); } 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 2008-03-26 21:12:15 UTC (rev 723) +++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2008-03-26 21:29:56 UTC (rev 724) @@ -322,7 +322,7 @@ } Data datum = data[0]; - Dictionary md = datum.getMetaData(); + Dictionary md = datum.getMetadata(); if (md.get(DataProperty.LABEL) == null) { md.put(DataProperty.LABEL, "result of " + converter.getShortName()); } else { @@ -357,7 +357,7 @@ private void alterMetaData(Data[] origFileData) { Data data = origFileData[0]; - Dictionary metadata = data.getMetaData(); + Dictionary metadata = data.getMetadata(); String label = (String) metadata.get(DataProperty.LABEL); if (label != null) { metadata.put(DataProperty.LABEL, getFileName(label)); Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/ConvertedDataSubGenerator.java =================================================================== --- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/ConvertedDataSubGenerator.java 2008-03-26 21:12:15 UTC (rev 723) +++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/ConvertedDataSubGenerator.java 2008-03-26 21:29:56 UTC (rev 724) @@ -28,11 +28,11 @@ Object fileData = firstData.getData(); if (fileData != null && fileData instanceof File) { this.convertedDataReport = - new ConvertedDataReport((File) fileData,(String) firstData.getMetaData().get(DataProperty.LABEL) + + new ConvertedDataReport((File) fileData,(String) firstData.getMetadata().get(DataProperty.LABEL) + " for " + fpr.getName() + " of " + tr.getName()); } else { this.convertedDataReport = - new ConvertedDataReport((String) firstData.getMetaData().get(DataProperty.LABEL) + + new ConvertedDataReport((String) firstData.getMetadata().get(DataProperty.LABEL) + " for " + fpr.getName() + " of " + tr.getName()); } } Modified: 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/FilePassResult.java 2008-03-26 21:12:15 UTC (rev 723) +++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/FilePassResult.java 2008-03-26 21:29:56 UTC (rev 724) @@ -116,7 +116,7 @@ } public String getOriginalFileLabel() { - return (String) getOriginalData()[0].getMetaData().get(DataProperty.LABEL); + return (String) getOriginalData()[0].getMetadata().get(DataProperty.LABEL); } public String getOriginalFileShortLabel() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |