Package com.sun.syndication.feed.synd

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


      link.setLengthsyndEnclosure.getLength());
      return link;
    }

    public SyndLink createSyndLink(Link link) {
        SyndLink syndLink = new SyndLinkImpl();
        syndLink.setRel(     link.getRel());
        syndLink.setType(    link.getType());
        syndLink.setHref(    link.getHrefResolved());
        syndLink.setHreflang(link.getHreflang());
        syndLink.setLengthlink.getLength());
        syndLink.setTitle(   link.getTitle());
        return syndLink;
    }
View Full Code Here


        }
        return sLinks;
    }

    public SyndLink createSyndLink(Link link) {
        SyndLink syndLink = new SyndLinkImpl();
        syndLink.setRel(     link.getRel());
        syndLink.setType(    link.getType());
        syndLink.setHref(    link.getHrefResolved());
        syndLink.setTitle(   link.getTitle());
        return syndLink;
    }
View Full Code Here

      link.setLengthsyndEnclosure.getLength());
      return link;
    }

    public SyndLink createSyndLink(Link link) {
        SyndLink syndLink = new SyndLinkImpl();
        syndLink.setRel(     link.getRel());
        syndLink.setType(    link.getType());
        syndLink.setHref(    link.getHrefResolved());
        syndLink.setHreflang(link.getHreflang());
        syndLink.setLengthlink.getLength());
        syndLink.setTitle(   link.getTitle());
        return syndLink;
    }
View Full Code Here

   
            String href = item.getLink();
            if (href == null) {
                href = key.toString();
            }
            SyndLink link = new SyndLinkImpl();
            link.setRel("edit");
            link.setHref(href);
            feedEntry.getLinks().add(link);
            link = new SyndLinkImpl();
            link.setRel("alternate");
            link.setHref(href);
            feedEntry.getLinks().add(link);
            feedEntry.setLink(href);
   
            Date date = item.getDate();
            if (date == null) {
                date = new Date();
            }
            feedEntry.setPublishedDate(date);
            return feedEntry;
           
        } else if (data != null) {
            SyndEntry feedEntry = new SyndEntryImpl();
            feedEntry.setUri(key.toString());
            feedEntry.setTitle("item");
   
            // Convert the item to XML
            String value = mediator.mediate(data, itemClassType, itemXMLType, null).toString();
           
            SyndContent content = new SyndContentImpl();
            content.setType("text/xml");
            content.setValue(value);
            List<SyndContent> contents = new ArrayList<SyndContent>();
            contents.add(content);
            feedEntry.setContents(contents);
   
            SyndLink link = new SyndLinkImpl();
            link.setRel("edit");
            link.setHref(key.toString());
            feedEntry.getLinks().add(link);
            link = new SyndLinkImpl();
            link.setRel("alternate");
            link.setHref(key.toString());
            feedEntry.getLinks().add(link);
   
            feedEntry.setPublishedDate(new Date());
            return feedEntry;
        } else {
View Full Code Here

            content.setValue("Jane Doe_" + String.valueOf(i));
            content.setType("text");
            entry.setContents(Collections.singletonList(content));

            List<SyndLink> links = new ArrayList<SyndLink>();
            SyndLink link = new SyndLinkImpl();
            link.setRel("edit");
            link.setHref("" + id);
            links.add(link);
            entry.setLinks(links);

            links = new ArrayList<SyndLink>();
            link = new SyndLinkImpl();
            link.setRel("alternate");
            link.setHref("" + id);
            links.add(link);
            entry.setLinks(links);

            entry.setPublishedDate(new Date());
View Full Code Here

        }
        else {
            syndEntry.setUri(item.getLink());
        }
        if(item.getComments() != null){
            SyndLinkImpl comments = new SyndLinkImpl();
            comments.setRel("comments");
            comments.setHref(item.getComments());
            comments.setType("text/html");
        }
        return syndEntry;
    }
View Full Code Here

            content.setValue("Jane Doe_" + String.valueOf(i));
            content.setType("text");
            entry.setContents(Collections.singletonList(content));

            List<SyndLink> links = new ArrayList<SyndLink>();
            SyndLink link = new SyndLinkImpl();
            link.setRel("edit");
            link.setHref("" + id);
            links.add(link);
            entry.setLinks(links);

            links = new ArrayList<SyndLink>();
            link = new SyndLinkImpl();
            link.setRel("alternate");
            link.setHref("" + id);
            links.add(link);
            entry.setLinks(links);

            entry.setPublishedDate(new Date());
View Full Code Here

   
            String href = item.getLink();
            if (href == null) {
                href = key.toString();
            }
            SyndLink link = new SyndLinkImpl();
            link.setRel("edit");
            link.setHref(href);
            feedEntry.getLinks().add(link);
            link = new SyndLinkImpl();
            link.setRel("alternate");
            link.setHref(href);
            feedEntry.getLinks().add(link);
            feedEntry.setLink(href);
   
            Date date = item.getDate();
            if (date == null) {
                date = new Date();
            }
            feedEntry.setPublishedDate(date);
            return feedEntry;
           
        } else if (data != null) {
            SyndEntry feedEntry = new SyndEntryImpl();
            feedEntry.setUri(key.toString());
            feedEntry.setTitle("item");
   
            // Convert the item to XML
            String value = mediator.mediate(data, itemClassType, itemXMLType, null).toString();
           
            SyndContent content = new SyndContentImpl();
            content.setType("text/xml");
            content.setValue(value);
            List<SyndContent> contents = new ArrayList<SyndContent>();
            contents.add(content);
            feedEntry.setContents(contents);
   
            SyndLink link = new SyndLinkImpl();
            link.setRel("edit");
            link.setHref(key.toString());
            feedEntry.getLinks().add(link);
            link = new SyndLinkImpl();
            link.setRel("alternate");
            link.setHref(key.toString());
            feedEntry.getLinks().add(link);
   
            feedEntry.setPublishedDate(new Date());
            return feedEntry;
        } else {
View Full Code Here

    public void getBaseObjectWithEnclosure()
    {

        final SyndContent description = context.mock(SyndContent.class);
        final SyndEntryImpl entry = context.mock(SyndEntryImpl.class);
        final SyndLinkImpl link1 = context.mock(SyndLinkImpl.class, "link1");
        final SyndLinkImpl link2 = context.mock(SyndLinkImpl.class, "link2");

        final List<SyndLinkImpl> myLinks = new LinkedList<SyndLinkImpl>();
        myLinks.add(link1);
        myLinks.add(link2);
View Full Code Here

    @Test
    public void getBaseObjectWithoutImageUrls()
    {
        final SyndContent description = context.mock(SyndContent.class);
        final SyndEntryImpl entry = context.mock(SyndEntryImpl.class);
        final SyndLinkImpl link1 = context.mock(SyndLinkImpl.class);

        final List<SyndLinkImpl> myLinks = new LinkedList<SyndLinkImpl>();
        myLinks.add(link1);

        context.checking(new Expectations()
View Full Code Here

TOP

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

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.