Package org.rometools.feed.module.base.types

Examples of org.rometools.feed.module.base.types.FloatUnit


                tagValue = GoogleBaseParser.SHORT_DT_FMT.parse(text);
            }
        } else if((pd.getPropertyType() == IntUnit.class)||(pd.getPropertyType().getComponentType() == IntUnit.class)) {
            tagValue = new IntUnit(tag.getText());
        } else if((pd.getPropertyType() == FloatUnit.class)||(pd.getPropertyType().getComponentType() == FloatUnit.class)) {
            tagValue = new FloatUnit(tag.getText());
        } else if((pd.getPropertyType() == DateTimeRange.class)||(pd.getPropertyType().getComponentType() == DateTimeRange.class)) {
            tagValue = new DateTimeRange(LONG_DT_FMT.parse(tag.getChild("start",GoogleBaseParser.NS).getText().trim()),LONG_DT_FMT.parse(tag.getChild("end",GoogleBaseParser.NS).getText().trim()));
        } else if((pd.getPropertyType() == ShippingType.class)||(pd.getPropertyType().getComponentType() == ShippingType.class)) {
            FloatUnit price = new FloatUnit(tag.getChild("price",GoogleBaseParser.NS).getText().trim());
            ShippingType.ServiceEnumeration service = ShippingType.ServiceEnumeration.findByValue(tag.getChild("service",GoogleBaseParser.NS).getText().trim());

            if(service == null) {
                service = ShippingType.ServiceEnumeration.STANDARD;
            }
View Full Code Here


        } else if( type.equals( "float") ){
      tags.add( new CustomTagImpl( child.getName(), new Float( child.getTextTrim() ) ) );
        } else if( type.equals("intUnit") ){
      tags.add( new CustomTagImpl( child.getName(), new IntUnit( child.getTextTrim()) ) );
        } else if( type.equals( "floatUnit") ){
      tags.add( new CustomTagImpl( child.getName(), new FloatUnit( child.getTextTrim()) ) );
        } else if( type.equals( "date") ){
      try{
          tags.add( new CustomTagImpl( child.getName(), new ShortDate( GoogleBaseParser.SHORT_DT_FMT.parse( child.getTextTrim()))) );
      } catch( ParseException e ){
          log.log( Level.WARNING, "Unable to parse date type on "+child.getName(), e );
View Full Code Here

TOP

Related Classes of org.rometools.feed.module.base.types.FloatUnit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.