Examples of ChannelFeed


Examples of com.google.gdata.data.youtube.ChannelFeed

    service.setConnectTimeout(2000);
    try {
      YouTubeQuery query = new YouTubeQuery(
          new URL(
              "https://gdata.youtube.com/feeds/api/channelstandardfeeds/most_viewed?time=all_time&max-results=10&orderby=viewCount&v=2"));
      ChannelFeed channels = service.query(query, ChannelFeed.class);
      result = new ArrayList<Channel>();
      for (ChannelEntry channel : channels.getEntries()) {
        Channel tubChannel = new Channel();
        String[] splittedId = channel.getId().split(":");
        tubChannel
            .setTitle(new Text(channel.getTitle().getPlainText()));
        tubChannel.setAlias(splittedId[splittedId.length - 1]);
View Full Code Here

Examples of yarfraw.core.datamodel.ChannelFeed

  
   @SuppressWarnings("unchecked")
   @Override
   public void encodeBegin(FacesContext facesContext) throws IOException
   {
      ChannelFeed channelFeed = (ChannelFeed) Contexts.getEventContext().get(FEED_IMPL_KEY);

      ItemEntry itemEntry = new ItemEntry();
      itemEntry.setUid(getUid());
      itemEntry.setTitle(makeText(getTitle()));
      itemEntry.addLink(getLink());
      String author = getAuthor();
      if (author != null)
      {
         Person authorPerson = new Person();
         authorPerson.setName(author);
         itemEntry.addAuthorOrCreator(authorPerson);
      }
      itemEntry.setDescriptionOrSummary(makeText(getSummary()));
      if (getUpdated() != null) {
         itemEntry.setUpdatedDate(getUpdated(), new SimpleDateFormat(ATOM_DATE_FORMAT));
      }
      if (getPublished() != null) {
         itemEntry.setPubDate(getPublished(), new SimpleDateFormat(ATOM_DATE_FORMAT));
      }

      channelFeed.addItem(itemEntry);
   }
View Full Code Here

Examples of yarfraw.core.datamodel.ChannelFeed

   @SuppressWarnings("unchecked")
   @Override
   public void encodeBegin(FacesContext facesContext) throws IOException
   {
      ChannelFeed channelFeed = new ChannelFeed();
      channelFeed.setUid(getUid());
      channelFeed.setTitle(getTitle());
      channelFeed.setDescriptionOrSubtitle(getSubtitle());
      if (getUpdated() != null)
      {
         channelFeed.setPubDate(getUpdated(), new SimpleDateFormat(ATOM_DATE_FORMAT));
      }
      channelFeed.addLink(getLink());
      Contexts.getEventContext().set(FEED_IMPL_KEY, channelFeed);
   }
View Full Code Here

Examples of yarfraw.core.datamodel.ChannelFeed

   }

   @Override
   public void encodeEnd(FacesContext facesContext) throws IOException
   {
      ChannelFeed channelFeed = (ChannelFeed) Contexts.getEventContext().get(FEED_IMPL_KEY);
      ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
      try
      {
         FeedWriter.writeChannel(feedFormat, channelFeed, byteStream);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.