Package org.apache.abdera.model

Examples of org.apache.abdera.model.Feed


     //http://feedvalidator.org/testcases/atom/4.1.3.1/type-xhtml.xml
     IRI uri = baseURI.resolve("4.1.3.1/type-xml.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
    
     Feed feed = doc.getRoot();
     assertNotNull(feed);
     try {
       feed.getEntries();
     } catch (Exception e) {
       assertTrue(e instanceof OMException);
     }
   }
View Full Code Here


     //http://feedvalidator.org/testcases/atom/4.1.3.2/content-src-invalid-iri.xml
     IRI uri = baseURI.resolve("4.1.3.2/content-src-invalid-iri.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
    
     Feed feed = doc.getRoot();
     assertNotNull(feed);
     List<Entry> entries = feed.getEntries();
     for (Entry entry : entries) {
       Content content = entry.getContentElement();
       assertNotNull(content);
       try {
         content.getSrc();
View Full Code Here

     //http://feedvalidator.org/testcases/atom/4.1.3.2/content-src-relative-ref.xml
     IRI uri = baseURI.resolve("4.1.3.2/content-src-relative-ref.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
    
     Feed feed = doc.getRoot();
     assertNotNull(feed);
     List<Entry> entries = feed.getEntries();
     for (Entry entry : entries) {
       Content content = entry.getContentElement();
       assertNotNull(content);
       assertEquals(content.getContentType(), Content.Type.MEDIA);
       assertEquals(content.getResolvedSrc(), uri.resolve("2003/12/12/atom03.pdf"));
View Full Code Here

     //http://feedvalidator.org/testcases/atom/4.1.3.3/content-application-xthml.xml
     IRI uri = baseURI.resolve("4.1.3.3/content-application-xthml.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
    
     Feed feed = doc.getRoot();
     assertNotNull(feed);
     List<Entry> entries = feed.getEntries();
     for (Entry entry : entries) {
       Content content = entry.getContentElement();
       assertNotNull(content);
       assertEquals(entry.getContentElement().getContentType(), Content.Type.XML);
     }
View Full Code Here

     //http://feedvalidator.org/testcases/atom/4.1.3.3/content-svg.xml
     IRI uri = baseURI.resolve("4.1.3.3/content-svg.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
    
     Feed feed = doc.getRoot();
     assertNotNull(feed);
     List<Entry> entries = feed.getEntries();
     for (Entry entry : entries) {
       Content content = entry.getContentElement();
       assertNotNull(content);
       assertEquals(entry.getContentElement().getContentType(), Content.Type.XML);
     }
View Full Code Here

     //http://feedvalidator.org/testcases/atom/4.2.2.2/category-scheme-invalid-iri.xml
     IRI uri = baseURI.resolve("4.2.2.2/category-scheme-invalid-iri.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
    
     Feed feed = doc.getRoot();
     assertNotNull(feed);
     List<Entry> entries = feed.getEntries();
     for (Entry entry : entries) {
       List<Category> cats = entry.getCategories();
       for (Category cat : cats) {
         try {
           cat.getScheme();
View Full Code Here

   public static void testSection424GeneratorEscapedHtml() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.4/generator-escaped-html.xml
     IRI uri = baseURI.resolve("4.2.4/generator-escaped-html.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Feed feed = doc.getRoot();
     assertNotNull(feed);
     Generator generator = feed.getGenerator();
     assertEquals(generator.getText(),"<b>The</b> generator");
   }
View Full Code Here

   public static void testSection424GeneratorInvalidIri() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.4/generator-invalid-iri.xml
     IRI uri = baseURI.resolve("4.2.4/generator-invalid-iri.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Feed feed = doc.getRoot();
     assertNotNull(feed);
     Generator generator = feed.getGenerator();
     assertNotNull(generator);
     try {
       generator.getUri();
     } catch (Exception e) {
       assertTrue(e instanceof IRISyntaxException);
View Full Code Here

   public static void testSection424GeneratorNoText() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.4/generator-no-text.xml
     IRI uri = baseURI.resolve("4.2.4/generator-no-text.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Feed feed = doc.getRoot();
     assertNotNull(feed);
     Generator generator = feed.getGenerator();
     assertEquals(generator.getText(),"");
   }
View Full Code Here

   public static void testSection424GeneratorWithChild() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.4/generator-with-child.xml
     IRI uri = baseURI.resolve("4.2.4/generator-with-child.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Feed feed = doc.getRoot();
     assertNotNull(feed);
     Generator generator = feed.getGenerator();
     assertEquals(generator.getText(),"");
   }
View Full Code Here

TOP

Related Classes of org.apache.abdera.model.Feed

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.