Package com.sun.syndication.feed.synd

Examples of com.sun.syndication.feed.synd.SyndPerson


   
    protected static List createSyndPersons(List aPersons) {
        List persons = new ArrayList();
        for (Iterator iter = aPersons.iterator(); iter.hasNext(); ) {
            Person aPerson = (Person)iter.next();
            SyndPerson person = new SyndPersonImpl();
            person.setName(aPerson.getName());
            person.setUri(aPerson.getUri());
            person.setEmail(aPerson.getEmail());
            person.setModules(aPerson.getModules());
            persons.add(person);
        }
        return persons;
    }
View Full Code Here


        }

        List authors = entry.getAuthors();
        if (authors!=null && authors.size() > 0) {
            syndEntry.setAuthors(ConverterForAtom03.createSyndPersons(authors));
            SyndPerson person0 = (SyndPerson)syndEntry.getAuthors().get(0);
            syndEntry.setAuthor(person0.getName());
        }

        List contributors = entry.getContributors();
        if (contributors!=null && contributors.size() > 0) {
            syndEntry.setContributors(ConverterForAtom03.createSyndPersons(contributors));
View Full Code Here

        channel.setCopyright(syndFeed.getCopyright()); //c
        channel.setPubDate(syndFeed.getPublishedDate()); //c       

        if ((syndFeed.getAuthors() != null) && (syndFeed.getAuthors()
                                                            .size() > 0)) {
            SyndPerson author = (SyndPerson) syndFeed.getAuthors()
                                                     .get(0);
            channel.setManagingEditor(author.getName());
        }

        return channel;
    }
View Full Code Here

    @Override
    protected Item createRSSItem(SyndEntry sEntry) {
        Item item = super.createRSSItem(sEntry);    
        if (sEntry.getAuthors()!=null && sEntry.getAuthors().size() > 0) {
            SyndPerson author = (SyndPerson)sEntry.getAuthors().get(0);
            item.setAuthor(author.getEmail())
       

        Guid guid = null;
        String uri = sEntry.getUri();
        if (uri!=null) {
View Full Code Here

      json.put("Link", feed.getLink());

      List<SyndPerson> authors = feed.getAuthors();
      String jsonAuthor = null;
      if (authors != null && !authors.isEmpty()) {
        SyndPerson author = authors.get(0);
        if (author.getName() != null) {
          jsonAuthor = author.getName();
        } else if (author.getEmail() != null) {
          jsonAuthor = author.getEmail();
        }
      }
      JSONArray entries = new JSONArray();
      json.put("Entry", entries);
View Full Code Here

    Date published = entry.getPublishedDate(), updated = entry.getUpdatedDate();
    String contentType = null;

    if (authors != null) {
      for (Object o : authors) {
        SyndPerson author = (SyndPerson) o;
        String authorName = author.getName();
        if (checkString(authorName)) {
          parseMeta.add(Feed.FEED_AUTHOR, authorName);
        }
      }
    } else {
View Full Code Here

      json.put("Link", feed.getLink());

      List<SyndPerson> authors = feed.getAuthors();
      String jsonAuthor = null;
      if (authors != null && !authors.isEmpty()) {
        SyndPerson author = authors.get(0);
        if (author.getName() != null) {
          jsonAuthor = author.getName();
        } else if (author.getEmail() != null) {
          jsonAuthor = author.getEmail();
        }
      }
      JSONArray entries = new JSONArray();
      json.put("Entry", entries);
View Full Code Here

                if (authors.length > 0)
                {
                    List<SyndPerson> creators = new ArrayList<SyndPerson>();
                    for (Metadatum author : authors)
                    {
                        SyndPerson sp = new SyndPersonImpl();
                        sp.setName(author.value);
                        creators.add(sp);
                    }
                    entry.setAuthors(creators);
                }
View Full Code Here

    Date published = entry.getPublishedDate(), updated = entry.getUpdatedDate();
    String contentType = null;

    if (authors != null) {
      for (Object o : authors) {
        SyndPerson author = (SyndPerson) o;
        String authorName = author.getName();
        if (checkString(authorName)) {
          parseMeta.add(Feed.FEED_AUTHOR, authorName);
        }
      }
    } else {
View Full Code Here

        }

        List authors = entry.getAuthors();
        if (authors!=null && authors.size() > 0) {
            syndEntry.setAuthors(ConverterForAtom03.createSyndPersons(authors));
            SyndPerson person0 = (SyndPerson)syndEntry.getAuthors().get(0);
            syndEntry.setAuthor(person0.getName());
        }

        Date date = entry.getPublished();
        if (date!=null) {
            syndEntry.setPublishedDate(date);
View Full Code Here

TOP

Related Classes of com.sun.syndication.feed.synd.SyndPerson

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.