Package churchillobjects.rss4j

Examples of churchillobjects.rss4j.RssDocument


        assert exampleFeedUrl != null : "Could not load " + EXAMPLE_FILE_3;

        // Setup
        PackageSyncReport report = new PackageSyncReport();

        RssDocument rssDocument3 = loadDocument(exampleFeedUrl);

        parser.parseResults(rssDocument3, report, null);

        Set<ContentProviderPackageDetails> newPackages = report.getNewPackages();
View Full Code Here


    public void synchronizePackages(String repoName, PackageSyncReport report,
        Collection<ContentProviderPackageDetails> existingPackages) throws SyncException, InterruptedException {
        if (!active)
            return;

        RssDocument rssDocument;
        try {
            rssDocument = retrieveRssDocument();
        } catch (Exception e) {
            throw new SyncException("Error retrieving RSS document.", e);
        }
View Full Code Here

        } finally {
            method.releaseConnection();
        }

        // Parse the raw feed into churchill domain objects
        RssDocument parsedFeed = null;
        if (rawFeed != null) {
            parsedFeed = RssParser.parseRss(rawFeed);
        }

        return parsedFeed;
View Full Code Here

   * @param is The input source to parse.
   * @return The RssDocument object structure.
   * @throws RssParseException
   */
  RssDocument parseRss(InputSource is) throws RssParseException{
    document = new RssDocument();
    namespaces = new Vector();
    characters = new StringBuffer();
    parser = new SAXParser();
    parser.setContentHandler(this);
    parser.setErrorHandler(this);
    try{
      parser.parse(is);
    }
    catch(SAXException e){
      cleanUp();
      if(e.getException() instanceof RssParseException){
        throw (RssParseException)e.getException();
      }
      else{
        throw new RssParseException(e.getException());
      }
    }
    catch(IOException e){
      cleanUp();
      throw new RssParseException(e);
    }
    // local reference to the doc that will be returned, before cleanup
    RssDocument returnDoc = document;
    // release all local objects for gc
    cleanUp();
    return returnDoc;
  }
View Full Code Here

 
 
  public static void main(String[] args) throws RssGenerationException {
    // TODO Auto-generated method stub
   
    RssDocument doc = new RssDocument();
    doc.setVersion(RssDocument.VERSION_10);
   
    RssChannel channel = new RssChannel();
    channel.setChannelTitle("Karens Recipes | Most Recent");
    channel.setChannelLink("http://santasu.blogspot.com/feeds/posts/default?alt=rss");
    channel.setChannelDescription("The 10 most recently added recipes in the soup category.");
    channel.setChannelUri("http://santasu.blogspot.com/feeds/posts/default?alt=rss");
    doc.addChannel(channel);
   
    Enumeration ee = channel.items();
   

View Full Code Here

TOP

Related Classes of churchillobjects.rss4j.RssDocument

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.