View Javadoc

1   package org.codehaus.xfire.aegis.type;
2   
3   import org.codehaus.xfire.SOAPConstants;
4   import org.dom4j.QName;
5   
6   
7   /***
8    * Integer Type.
9    * 
10   * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
11   */
12  public class DoubleType
13  	extends SimpleType
14  {
15  	public Object coerceString(String string)
16  	{
17  		return new Double( Double.parseDouble(string) );
18  	}
19      
20  	public String coerceValue(Object value)
21  	{
22          return ((Double)value).toString();
23      }
24  
25  	public QName getDefaultSchemaType()
26  	{
27  		return QName.get("double", SOAPConstants.XSD);
28  	}
29  }