Package org.apache.wink.common.model.synd

Examples of org.apache.wink.common.model.synd.SyndPerson


        }
        if (syndEntry.getSummary() != null && syndEntry.getSummary().getValue() != null) {
            setDescription(syndEntry.getSummary().getValue());
        }
        if (syndEntry.getAuthors().size() > 0) {
            SyndPerson syndAuthor = syndEntry.getAuthors().get(0);
            if (syndAuthor.getEmail() != null) {
                setAuthor(syndAuthor.getEmail());
            }
        }
        getCategories().clear();
        for (SyndCategory syndCategory : syndEntry.getCategories()) {
            getCategories().add(new RssCategory(syndCategory));
View Full Code Here


        }
        if (getDescription() != null) {
            syndEntry.setSummary(new SyndText(getDescription()));
        }
        if (getAuthor() != null) {
            SyndPerson syndAuthor = new SyndPerson();
            String authorEmail = getAuthor();
            syndAuthor.setEmail(authorEmail);
            syndAuthor.setName(authorEmail.substring(0, authorEmail.indexOf("@"))); //$NON-NLS-1$
            syndEntry.getAuthors().add(syndAuthor);
        }
        syndEntry.getCategories().clear();
        for (RssCategory rssCategory : getCategories()) {
            SyndCategory syndCategory = new SyndCategory();
View Full Code Here

    private List<SyndPerson> getAuthorsAsSynd() {
        List<SyndPerson> authors = new ArrayList<SyndPerson>();
        for (AtomPerson value : getAuthors()) {
            if (value != null) {
                authors.add(value.toSynd(new SyndPerson()));
            }
        }
        return authors;
    }
View Full Code Here

        }
        if (syndFeed.getRights() != null && syndFeed.getRights().getValue() != null) {
            setCopyright(syndFeed.getRights().getValue());
        }
        if (syndFeed.getAuthors().size() > 0) {
            SyndPerson author = syndFeed.getAuthors().get(0);
            if (author.getEmail() != null) {
                setManagingEditor(author.getEmail());
            }
        }
        if (syndFeed.getUpdated() != null) {
            setLastBuildDate(convertJavaDateToRssDate(syndFeed.getUpdated()));
        }
View Full Code Here

        }
        if (getCopyright() != null) {
            syndFeed.setRights(new SyndText(getCopyright()));
        }
        if (getManagingEditor() != null) {
            SyndPerson syndAuthor = new SyndPerson();
            String authorEmail = getManagingEditor();
            syndAuthor.setEmail(authorEmail);
            syndAuthor.setName(authorEmail.substring(0, authorEmail.indexOf("@"))); //$NON-NLS-1$
            syndFeed.getAuthors().add(syndAuthor);
        }
        if (getLastBuildDate() != null) {
            syndFeed.setUpdated(convertRssDateToJavaDate(getLastBuildDate()));
        }
View Full Code Here

        feed.addLink(syndLink);
        SyndCategory category = new SyndCategory();
        category.setScheme(COL_CATEGORY_SCHEME);
        category.setTerm(COL_CATEGORY_TERM);
        feed.addCategory(category);
        SyndPerson person = new SyndPerson();
        person.setName(COL_OWNER);
        feed.addAuthor(person);
        feed.setSubtitle(new SyndText(COL_SUB_TITLE));
        return feed;
    }
View Full Code Here

        SyndEntry syndEntry = new SyndEntry();
        syndEntry.setTitle(new SyndText(TITLE));
        syndEntry.setId(ID);
        syndEntry.setUpdated(CURRENT_DATE);
        syndEntry.setPublished(CURRENT_DATE);
        SyndPerson person = new SyndPerson();
        person.setName(OWNER);
        syndEntry.addAuthor(person);
        syndEntry.setSummary(new SyndText(SUMMARY));
        SyndCategory syndCategory = new SyndCategory();
        syndCategory.setScheme(CATEGORY_SCHEME);
        syndCategory.setTerm(CATEGORY_TERM);
View Full Code Here

     */
    private SyndFeed createUsersSyndFeed(Collection<User> users, LinkBuilders linkBuilders) {
        SyndFeed usersSyndFeed = new SyndFeed();
        usersSyndFeed.setId("urn:com:hp:users");
        usersSyndFeed.setTitle(new SyndText("Users"));
        usersSyndFeed.addAuthor(new SyndPerson("admin"));
        usersSyndFeed.setUpdated(new Date());

        // 1. Generate collection system links: "edit", "alternate"
        linkBuilders.createSystemLinksBuilder(). // Create SystemLinksBuilder
            build(usersSyndFeed.getLinks()); // Build all system links
View Full Code Here

    @Produces( {MediaType.APPLICATION_ATOM_XML, MediaType.APPLICATION_JSON})
    public SyndFeed getSyndFeed(@Context Providers providers, @Context UriInfo uriInfo) {
        SyndFeed synd = new SyndFeed();
        synd.setId("urn:com:hp:users");
        synd.setTitle(new SyndText("Users"));
        synd.addAuthor(new SyndPerson("admin"));
        synd.setUpdated(new Date());

        // set the entries
        for (User user : users) {
            SyndEntry entry = new SyndEntry();
View Full Code Here

                                @Context LinkBuilders linkBuilders,
                                @Context UriInfo uriInfo) throws IOException {
        SyndFeed synd = new SyndFeed();
        synd.setId("urn:com:hp:qadefects:defects");
        synd.setTitle(new SyndText("Defects"));
        synd.addAuthor(new SyndPerson("admin"));
        synd.setUpdated(new Date());

        // set the entries
        for (DefectBean defect : getDefects()) {
            DefectAsset defectAsset = new DefectAsset(defect, true);
View Full Code Here

TOP

Related Classes of org.apache.wink.common.model.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.