org.apache.servicemix.components.util
Class NumberConverter

java.lang.Object
  extended by org.apache.servicemix.components.util.NumberConverter
All Implemented Interfaces:
ContentConverter

public class NumberConverter
extends java.lang.Object
implements ContentConverter

Column converter for SimpleFlatFileMarshaler that converts string representations of numbers. Zero values and blank columns in flat files can be converted to empty strings (default setting)

Since:
3.2
Author:
Mayrbaeurl

Constructor Summary
NumberConverter()
           
 
Method Summary
 java.lang.String convertToFlatFileContent(java.lang.String contents)
          Converts the contents of a XML element to the contents of the flat file column
 java.lang.String convertToXml(java.lang.String contents)
          Converts the contents of column to the contents of the XML element
 void setBlankValueIsNull(boolean blankValueIsNull)
           
 void setZeroValueIsNull(boolean zeroValueIsNull)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberConverter

public NumberConverter()
Method Detail

convertToXml

public java.lang.String convertToXml(java.lang.String contents)
Description copied from interface: ContentConverter
Converts the contents of column to the contents of the XML element

Specified by:
convertToXml in interface ContentConverter
Parameters:
contents - contents of the flat file column
Returns:
contents for the XML element

convertToFlatFileContent

public java.lang.String convertToFlatFileContent(java.lang.String contents)
Description copied from interface: ContentConverter
Converts the contents of a XML element to the contents of the flat file column

Specified by:
convertToFlatFileContent in interface ContentConverter
Parameters:
contents - contents of the XML element
Returns:
contents for the flat file

setZeroValueIsNull

public final void setZeroValueIsNull(boolean zeroValueIsNull)

setBlankValueIsNull

public final void setBlankValueIsNull(boolean blankValueIsNull)


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.