Package com.sun.syndication.feed.atom

Examples of com.sun.syndication.feed.atom.Person


        postLink.setHref(postUrl);
        entry.setAlternateLinks(Arrays.asList(postLink));
    }

    private void setAuthor(Post post, Entry entry) {
        Person person = new Person();
        person.setName(post.getAuthor().getName());
        entry.setAuthors(Arrays.asList(person));
    }
View Full Code Here


        List authors = sEntry.getAuthors();
        if (authors!=null && authors.size() > 0) {
            aEntry.setAuthors(ConverterForAtom03.createAtomPersons(authors));
        } else if (sEntry.getAuthor() != null) {
            Person person = new Person();
            person.setName(sEntry.getAuthor());
            authors = new ArrayList();
            authors.add(person);
            aEntry.setAuthors(authors);
        }
View Full Code Here

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

    }
   
    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 sAuthors = sEntry.getAuthors();
        if (sAuthors!=null && sAuthors.size() > 0) {
            aEntry.setAuthors(createAtomPersons(sAuthors));
        } else if (sEntry.getAuthor() != null) {
            Person person = new Person();
            person.setName(sEntry.getAuthor());
            List authors = new ArrayList();
            authors.add(person);
            aEntry.setAuthors(authors);
        }
View Full Code Here

        }
        return (links.size()>0) ? links : null;
    }
   
    private Person parsePerson(String baseURI, Element ePerson) {
        Person person = new Person();
        Element e = ePerson.getChild("name",getAtomNamespace());
        if (e!=null) {
            person.setName(e.getText());
        }
        e = ePerson.getChild("uri",getAtomNamespace());
        if (e!=null) {
            person.setUri(e.getText());
            if (isRelativeURI(e.getText())) {
               person.setUriResolved(resolveURI(baseURI, ePerson, e.getText()));
            }
        }
        e = ePerson.getChild("email",getAtomNamespace());
        if (e!=null) {
            person.setEmail(e.getText());
        }
        person.setModules(parsePersonModules(ePerson));       
        return person;
    }
View Full Code Here

        com.sun.syndication.feed.atom.Feed feed = new com.sun.syndication.feed.atom.Feed();
        feed.setTitle(feedTitle);
        Content subtitle = new Content();
        subtitle.setValue(feedDescription);
        feed.setSubtitle(subtitle);
        Person author = new Person();
        author.setName(feedAuthor);
        feed.setAuthors(Collections.singletonList(author));
        Link link = new Link();
        link.setHref("http://incubator.apache.org/tuscany");
        feed.getAlternateLinks().add(link);
View Full Code Here

        atomEntry.setContentscontents);
        atomEntry.setPublished( entry.getPubTime());
        atomEntry.setUpdated(   entry.getUpdateTime());
       
        UserData creator = entry.getCreator();
        Person author = new Person();
        author.setName(         creator.getUserName());
        author.setEmail(        creator.getEmailAddress());
        atomEntry.setAuthors(   Collections.singletonList(author));
       
        List categories = new ArrayList();
        Category atomCat = new Category();
        atomCat.setTerm(entry.getCategory().getPath());
View Full Code Here

        atomEntry.setContentscontents);
        atomEntry.setPublished( entry.getPubTime());
        atomEntry.setUpdated(   entry.getUpdateTime());
       
        UserData creator = entry.getCreator();
        Person author = new Person();
        author.setName(         creator.getUserName());
        author.setEmail(        creator.getEmailAddress());
        atomEntry.setAuthors(   Collections.singletonList(author));
       
        List categories = new ArrayList();
        Category atomCat = new Category();
        atomCat.setTerm(entry.getCategory().getPath());
View Full Code Here

        List authors = sEntry.getAuthors();
        if (authors!=null && authors.size() > 0) {
            aEntry.setAuthors(ConverterForAtom03.createAtomPersons(authors));
        } else if (sEntry.getAuthor() != null) {
            Person person = new Person();
            person.setName(sEntry.getAuthor());
            authors = new ArrayList();
            authors.add(person);
            aEntry.setAuthors(authors);
        }
View Full Code Here

TOP

Related Classes of com.sun.syndication.feed.atom.Person

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.