All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rometools.modules.yahooweather.package.html Maven / Gradle / Ivy

The newest version!

  
    
  
  
      This package contains Modules for working with 
      Yahoo! Weather.
      
      

Example usage:

Retrieving information from a feed:

          SyndFeed feed = input.build( ... );
          YWeatherFeedModule yfeed = (YWeatherFeedModule) feed.getModule( YWeatherFeedModule.URI );
          System.out.println( yfeed.getLocation().getCity() );
          SyndEntry entry = (SyndEntry) feed.getEntries().get(0);
          YWeatherEntryModule yentry = (YWeatherEntryModule) entry.getModule( YWeatherEntryModule.URI );
          System.out.println( yentry.getForecasts()[0].getHigh();
      

To add information to a feed, construct a YWeatherModuleImpl and cast it to the appropriate interface:

          SyndEntry entry = new SyndEntryImpl();
          YWeatherEntryModule yentry = new YWeatherModuleImpl();
          yentry.setCondition( Condition("Partly Cloudy", ConditionCode.PARTLY_CLOUDY, 65, new Date() ) );
          entry.getModules.add(yentry);
        




© 2015 - 2025 Weber Informatics LLC | Privacy Policy