Java Code Examples for com.rometools.rome.feed.synd.SyndPerson#setName()

The following examples show how to use com.rometools.rome.feed.synd.SyndPerson#setName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConverterForAtom03.java    From rome with Apache License 2.0 5 votes vote down vote up
protected static List<SyndPerson> createSyndPersons(final List<SyndPerson> aPersons) {
    final List<SyndPerson> persons = new ArrayList<SyndPerson>();
    for (final SyndPerson person2 : aPersons) {
        final SyndPerson person = new SyndPersonImpl();
        person.setName(person2.getName());
        person.setUri(person2.getUri());
        person.setEmail(person2.getEmail());
        person.setModules(person2.getModules());
        persons.add(person);
    }
    return persons;
}
 
Example 2
Source File: ConverterForOPML10.java    From rome with Apache License 2.0 5 votes vote down vote up
protected void addOwner(final Opml opml, final SyndFeed syndFeed) {
    if (opml.getOwnerEmail() != null || opml.getOwnerName() != null) {
        final List<SyndPerson> authors = new ArrayList<SyndPerson>();
        final SyndPerson person = new SyndPersonImpl();
        person.setEmail(opml.getOwnerEmail());
        person.setName(opml.getOwnerName());
        authors.add(person);
        syndFeed.setAuthors(authors);
    }
}