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

com.sun.syndication.feed.module.georss.package.html Maven / Gradle / Ivy




  
    GeoRSS package documentation
  
  



This package contains classes to enable the rome rss library with georss support. 
GeoRSS describes a number of ways to encoding location in RSS feeds


    

Code Examples

GeoRSS Consumer

   SyndFeedInput input = new SyndFeedInput();
       SyndFeed feed = input.build(new XmlReader(new URL(
             "http://www.geonames.org/recent-changes.xml")));

       List<syndentry> entries = feed.getEntries();
       for (SyndEntry entry : entries) {
            GeoRSSModule geoRSSModule = GeoRSSUtils.getGeoRSS(entry);
            System.out.println(entry.getTitle() + " : lat="
                  + geoRSSModule.getPosition().getLatitude() + ",lng="
                  + geoRSSModule.getPosition().getLongitude() + ", desc="
                  + entry.getDescription().getValue() + "; time="
                  + entry.getPublishedDate());
       }
   

GeoRSS Producer

    GeoRSSModule geoRSSModule = new W3CGeoModuleImpl();
        //GeoRSSModule geoRSSModule = new SimpleModuleImpl();
        geoRSSModule.setPosition(new Position(47.0, 9.0));
        entry.getModules().add(geoRSSModule);
    




© 2015 - 2024 Weber Informatics LLC | Privacy Policy