Package org.apache.abdera.model

Examples of org.apache.abdera.model.Source


     //http://feedvalidator.org/testcases/atom/4.2.11/source-entry.xml
     IRI uri = baseURI.resolve("4.2.11/source-entry.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Source source = entry.getSource();
     assertNotNull(source);
   }
View Full Code Here


    dateTime.setString(AtomDate.format(now));
    assertEquals(dateTime.getString(), AtomDate.format(now));
    assertEquals(dateTime.getDate(), now);
    Service service = factory.newService();
    assertNotNull(service);
    Source source = factory.newSource();
    assertNotNull(source);
    el = factory.newElement(Constants.NAME);
    assertNotNull(el);
    assertEquals(el.getQName(), Constants.NAME);
    el = factory.newElement(Constants.NAME);
View Full Code Here

            try {
              if (o instanceof OMNode) {
                OMNode node = (OMNode) o;
                List<Link> links = null;
                if (node instanceof Source) {
                  Source source = (Source) node;
                  links = source.getLinks("alternate");
                } else if (node instanceof Entry) {
                  Entry entry = (Entry) node;
                  links = entry.getLinks("alternate");
                }
                if (links != null) results.addAll(links);
View Full Code Here

    dateTime.setString(AtomDate.format(now));
    assertEquals(dateTime.getString(), AtomDate.format(now));
    assertEquals(dateTime.getDate(), now);
    Service service = factory.newService();
    assertNotNull(service);
    Source source = factory.newSource();
    assertNotNull(source);
    el = factory.newElement(Constants.NAME);
    assertNotNull(el);
    assertEquals(el.getQName(), Constants.NAME);
    el = factory.newElement(Constants.NAME);
View Full Code Here

    dateTime.setString(AtomDate.format(now));
    assertEquals(dateTime.getString(), AtomDate.format(now));
    assertEquals(dateTime.getDate(), now);
    Service service = factory.newService();
    assertNotNull(service);
    Source source = factory.newSource();
    assertNotNull(source);
    el = factory.newElement(Constants.NAME);
    assertNotNull(el);
    assertEquals(el.getQName(), Constants.NAME);
    el = factory.newElement(Constants.NAME);
View Full Code Here

    //http://feedvalidator.org/testcases/atom/4.1.2/multiple-sources.xml
    IRI uri = baseURI.resolve("4.1.2/multiple-sources.xml");
    Document<Feed> doc = get(uri);
    if (doc == null) return;
    Entry entry = doc.getRoot().getEntries().get(0);
    Source source = entry.getSource();
    assertEquals(source.getId(), new IRI("urn:uuid:9b056ae0-f778-11d9-8cd6-0800200c9a66"));
  }  
View Full Code Here

     //http://feedvalidator.org/testcases/atom/4.2.11/missing-id.xml
     IRI uri = baseURI.resolve("4.2.11/missing-id.xml");
     Document<Feed> doc = get(uri);
     if (doc == null) return;
     Entry entry = doc.getRoot().getEntries().get(0);
     Source source = entry.getSource();
     assertNull(source.getId());
   }
View Full Code Here

     //http://feedvalidator.org/testcases/atom/4.2.11/missing-title.xml
     IRI uri = baseURI.resolve("4.2.11/missing-title.xml");
     Document<Feed> doc = get(uri);
     if (doc == null) return;
     Entry entry = doc.getRoot().getEntries().get(0);
     Source source = entry.getSource();
     assertNull(source.getTitle());
   }
View Full Code Here

     //http://feedvalidator.org/testcases/atom/4.2.11/missing-updated.xml
     IRI uri = baseURI.resolve("4.2.11/missing-updated.xml");
     Document<Feed> doc = get(uri);
     if (doc == null) return;
     Entry entry = doc.getRoot().getEntries().get(0);
     Source source = entry.getSource();
     assertNull(source.getUpdated());
   }
View Full Code Here

     //http://feedvalidator.org/testcases/atom/4.2.11/multiple-alternates-differing.xml
     IRI uri = baseURI.resolve("4.2.11/multiple-alternates-differing.xml");
     Document<Feed> doc = get(uri);
     if (doc == null) return;
     Entry entry = doc.getRoot().getEntries().get(0);
     Source source = entry.getSource();
     List<Link> links = source.getLinks("alternate");
     assertEquals(links.size(),2);
     assertEquals(links.get(0).getResolvedHref(), new IRI("http://example.org/"));
     assertEquals(links.get(1).getResolvedHref(), new IRI("http://example.es/"));
   }
View Full Code Here

TOP

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

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.