Package org.apache.abdera.model

Examples of org.apache.abdera.model.Feed.addAuthor()


    private Feed createFeed(RequestContext searchRequest, Map<String, String> parameters, List<T> searchResults) {
        Factory factory = searchRequest.getAbdera().getFactory();
        Feed feed = factory.newFeed();
        feed.setId(this.getOpenSearchFeedId(searchRequest));
        feed.setTitle(this.getOpenSearchFeedTitle(searchRequest));
        feed.addAuthor(this.getOpenSearchFeedAuthor(searchRequest));
        feed.setUpdated(this.getOpenSearchFeedUpdatedDate(searchRequest));
        feed.addLink(searchRequest.getUri().toString(), "self");
        int totalResults = this.getOpenSearchFeedTotalResults(searchRequest, parameters, searchResults);
        if (totalResults > -1) {
        ((IntegerElement) feed.addExtension(OpenSearchConstants.TOTAL_RESULTS))
View Full Code Here


    public ResponseContext getFeed(RequestContext request) {
        Feed feed = abdera.newFeed();
        feed.setId(config.getServerConfiguration().getServerUri() + "/" + config.getFeedId());
        feed.setTitle(config.getFeedTitle());
        feed.addAuthor(config.getFeedAuthor());
        feed.addLink(config.getFeedUri());
        feed.addLink(config.getFeedUri(), "self");
        feed.setUpdated(new Date());
        getEntries(request, feed, root);
        return ProviderHelper.returnBase(feed.getDocument(), 200, null);
View Full Code Here

    feed.setBaseUri("http://example.org");
   
    feed.setTitle("Example Feed");
    feed.addLink("http://example.org/");
    feed.setUpdated(new Date());
    feed.addAuthor("John Doe");
    feed.setId("urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6");
    feed.addContributor("Bob Jones");
    feed.addCategory("example");
   
    // Creates an entry and inserts it at the beginning of the list
View Full Code Here

      feed.setId("tag:example.org,2006:feed");
      feed.setTitle("Simple");
      feed.setUpdated(new Date());
      feed.addLink("");
      feed.addLink("","self");
      feed.addAuthor("Simple");
    } catch (Exception e) {}
    return feed.getDocument();
  }
 
  private synchronized Document<Service> get_service_doc(Abdera abdera) {
View Full Code Here

        Feed feed = factory.newFeed();
        feed.setTitle(feedTitle);
        feed.setSubtitle(feedDescription);
        Person author = factory.newAuthor();
        author.setName(feedAuthor);
        feed.addAuthor(author);
        feed.addLink("http://tuscany.apache.org/", "alternate");

        // Aggregate entries from atomFeed1, atomFeed2, rssFeed1 and rssFeed2
        List<Entry> entries = new ArrayList<Entry>();
        if (atomFeed1 != null) {
View Full Code Here

        Feed feed = factory.newFeed();
        feed.setTitle(feedTitle);
        feed.setSubtitle(feedDescription);
        Person author = factory.newAuthor();
        author.setName(feedAuthor);
        feed.addAuthor(author);
        feed.addLink("http://tuscany.apache.org", "alternate");
       
        Feed allFeed = getFeed();
        if (queryString.startsWith("title=")) {
            String title = queryString.substring(6);
View Full Code Here

        Feed feed = factory.newFeed();
        feed.setTitle(feedTitle);
        feed.setSubtitle(feedDescription);
        Person author = factory.newAuthor();
        author.setName(feedAuthor);
        feed.addAuthor(author);
        feed.addLink("http://tuscany.apache.org", "alternate");

        // Aggregate entries from atomFeed1, atomFeed2, rssFeed1 and rssFeed2
        List<Entry> entries = new ArrayList<Entry>();
        if (atomFeed1 != null) {
View Full Code Here

        Feed feed = factory.newFeed();
        feed.setTitle(feedTitle);
        feed.setSubtitle(feedDescription);
        Person author = factory.newAuthor();
        author.setName(feedAuthor);
        feed.addAuthor(author);
        feed.addLink("http://tuscany.apache.org", "alternate");
       
        Feed allFeed = getFeed();
        if (queryString.startsWith("title=")) {
            String title = queryString.substring(6);
View Full Code Here

        // Create a new Feed
        Factory factory = Abdera.getNewFactory();
        Feed feed = factory.newFeed();
        feed.setTitle("Apache Tuscany Feed Aggregator");
        feed.setSubtitle("A sample showing an SCA application to aggregate various types of feeds");
        feed.addAuthor("Apache Tuscany");
        feed.addLink("http://tuscany.apache.org");
        // Aggregate entries from feed1 and feed2
        try {       
            AlertsType alerts = this.alerts.getAllNewAlerts("");
View Full Code Here

            feed.setId(base + "/collections/entries");
            feed.setTitle("Entries");
            feed.setUpdated(new Date());
            feed.addLink(base + "/collections/entries");
            feed.addLink(base + "/collections/entries", "self");
            feed.addAuthor("James");
            Document<Feed> doc = feed.getDocument();
            return doc;
        } catch (Exception e) {
        }
        return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.