StringTokenizer strtok = new StringTokenizer( sOldRepresentation, "," ); NumberFormat nf = NumberFormat.getNumberInstance( ); SimpleDateFormat sdf = new SimpleDateFormat( "MM/dd/yyyy", Locale.getDefault( ) ); StringBuffer sbNewRepresentation = new StringBuffer( "" ); while ( strtok.hasMoreTokens( ) ) { String sElement = strtok.nextToken( ).trim( ); if ( sElement.startsWith( "'" ) ) { sElement = sElement.substring( 1, sElement.length( ) - 1 ); } try { if ( axisType.equals( AxisType.DATE_TIME_LITERAL ) ) { sdf.parse( sElement ); } else if ( axisType.equals( AxisType.TEXT_LITERAL ) ) { if ( !sElement.startsWith( "'" ) ) { sElement = "'" + sElement + "'"; } } else { double dbl = nf.parse( sElement ).doubleValue( ); sElement = String.valueOf( dbl ); } } catch ( ParseException e ) {                     } sbNewRepresentation.append( sElement ); sbNewRepresentation.append( "," ); } return sbNewRepresentation.toString( ).substring( 0, sbNewRepresentation.length( ) - 1 );
return getNewSampleData( axisType );
	public static String getConvertedSampleDataRepresentation(			AxisType axisType, String sOldRepresentation )	{		StringTokenizer strtok = new StringTokenizer( sOldRepresentation, "," ); //$NON-NLS-1$		NumberFormat nf = NumberFormat.getNumberInstance( );		SimpleDateFormat sdf = new SimpleDateFormat( "MM/dd/yyyy", Locale.getDefault( ) ); //$NON-NLS-1$		StringBuffer sbNewRepresentation = new StringBuffer( "" ); //$NON-NLS-1$		while ( strtok.hasMoreTokens( ) )		{			String sElement = strtok.nextToken( ).trim( );			if ( sElement.startsWith( "'" ) ) //$NON-NLS-1$			{				sElement = sElement.substring( 1, sElement.length( ) - 1 );			}			try			{				if ( axisType.equals( AxisType.DATE_TIME_LITERAL ) )				{					sdf.parse( sElement );				}				else if ( axisType.equals( AxisType.TEXT_LITERAL ) )				{					if ( !sElement.startsWith( "'" ) ) //$NON-NLS-1$					{						sElement = "'" + sElement + "'"; //$NON-NLS-1$ //$NON-NLS-2$					}				}				else				{					double dbl = nf.parse( sElement ).doubleValue( );					sElement = String.valueOf( dbl );				}			}			catch ( ParseException e )			{				// Use the orginal sample data if parse exception encountered				// if ( axisType.equals( AxisType.DATE_TIME_LITERAL ) )				// {				// Calendar cal = Calendar.getInstance( Locale.getDefault( ) );				// StringBuffer sbNewDate = new StringBuffer( "" );				// //$NON-NLS-1$				// sbNewDate.append( cal.get( Calendar.MONTH ) + 1 );				// sbNewDate.append( "/" ); //$NON-NLS-1$				// // Increasing the date beyond the last date for the month				// // causes the month to roll over				// sbNewDate.append( cal.get( Calendar.DATE ) + iValueCount );				// sbNewDate.append( "/" ); //$NON-NLS-1$				// sbNewDate.append( cal.get( Calendar.YEAR ) );				// sElement = sbNewDate.toString( );				// }				// else				// {				// sElement = String.valueOf( 6.0 + iValueCount );				// }			}			sbNewRepresentation.append( sElement );			sbNewRepresentation.append( "," ); //$NON-NLS-1$		}		return sbNewRepresentation.toString( ).substring( 0,				sbNewRepresentation.length( ) - 1 );	}