private void setMetaData(
     HttpServletRequest request,
     HttpServletResponse response,
     CMVisual mediaItem,
     MediaContent mediaContent)
     throws URISyntaxException {
   String thumbnailUrl = getTumbnailUrl(request, response, mediaItem);
   if (thumbnailUrl != null) {
     Metadata md = new Metadata();
     md.setThumbnail(new Thumbnail[] {new Thumbnail(new URI(thumbnailUrl))});
     md.setTitle(getMediaTitle(mediaItem));
     mediaContent.setMetadata(md);
   }
 }
示例#2
0
  /**
   * <strong>&lt;media:copyright&gt;</strong>
   *
   * <p>Copyright information for media object. It has 1 optional attribute.
   *
   * <pre>
   *         &lt;media:copyright url="http://blah.com/additional-info.html"&gt;2005 FooBar Media&lt;/media:copyright&gt;
   * </pre>
   *
   * <p><em>url</em> is the url for a terms of use page or additional copyright information. If the
   * media is operating under a Creative Commons license, the Creative Commons module should be used
   * instead. It is an optional attribute.
   *
   * @return Link to more copyright information.
   */
  public Object clone() {
    Metadata md = new Metadata();
    md.setCategories(getCategories());
    md.setCopyright(getCopyright());
    md.setCopyrightUrl(getCopyrightUrl());
    md.setCredits(getCredits());
    md.setDescription(getDescription());
    md.setDescriptionType(getDescriptionType());
    md.setHash(getHash());
    md.setKeywords(getKeywords());
    md.setRatings(getRatings());
    md.setText(getText());
    md.setThumbnail(getThumbnail());
    md.setTitle(getTitle());
    md.setTitleType(getTitleType());
    md.setRestrictions(getRestrictions());

    return md;
  }