From: <bh...@us...> - 2006-10-16 19:35:11
|
Revision: 284 http://svn.sourceforge.net/cishell/?rev=284&view=rev Author: bh2 Date: 2006-10-16 12:35:06 -0700 (Mon, 16 Oct 2006) Log Message: ----------- some minor fixes and documentation Modified Paths: -------------- trunk/core/org.cishell.reference/src/org/cishell/reference/service/conversion/DataConversionServiceImpl.java Modified: trunk/core/org.cishell.reference/src/org/cishell/reference/service/conversion/DataConversionServiceImpl.java =================================================================== --- trunk/core/org.cishell.reference/src/org/cishell/reference/service/conversion/DataConversionServiceImpl.java 2006-10-16 19:34:05 UTC (rev 283) +++ trunk/core/org.cishell.reference/src/org/cishell/reference/service/conversion/DataConversionServiceImpl.java 2006-10-16 19:35:06 UTC (rev 284) @@ -115,7 +115,7 @@ * @see org.cishell.service.conversion.DataConversionService#findConverters(java.lang.String, java.lang.String) */ public Converter[] findConverters(String inFormat, String outFormat) { - saveGraph(); + //saveGraph(); if (inFormat != null && inFormat.length() > 0 && outFormat != null && outFormat.length() > 0) { @@ -141,8 +141,8 @@ String format = (String) converters[i].getProperties().get(OUT_DATA); //tmp - String inFormat = (String) converters[i].getProperties().get(IN_DATA); - System.out.println("Converter:"+converters.length+":"+ inFormat + "->" + format + "->" + outFormat); + //String inFormat = (String) converters[i].getProperties().get(IN_DATA); + //System.out.println("Converter:"+converters.length+":"+ inFormat + "->" + format + "->" + outFormat); if (!formats.contains(format)) { String filter = "(&("+ALGORITHM_TYPE+"="+TYPE_CONVERTER+")" + @@ -188,10 +188,9 @@ Collection converterList = new HashSet(); - //TODO: Check to see if inFormat matches the outFormat (for example: - //in=file:text/graphml out=file:* If so, need to add a null converter - //(w/ 0 sized servicereference array) to the converterList - + //Check to see if inFormat matches the outFormat (for example: + //in=file:text/graphml out=file:* If so, then add a null converter + //to the converterList. if (outFormat.indexOf('*') != -1) { String outFormatCopy = outFormat.replaceAll("[*]", ".*"); if (Pattern.matches(outFormatCopy, inFormat)) { @@ -272,7 +271,7 @@ public Converter[] findConverters(Data data, String outFormat) { if (data == null) { if (NULL_DATA.equalsIgnoreCase(""+outFormat)) { - return new Converter[]{new ConverterImpl(bContext, ciContext, new ServiceReference[0])}; + return new Converter[]{new NullConverter(""+outFormat)}; } else { return new Converter[0]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |