com.sun.syndication.feed.module.mediarss.types
Class Metadata

java.lang.Object
  extended by com.sun.syndication.feed.module.mediarss.types.Metadata
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Metadata
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Optional Elements

The following elements are optional and may appear as sub-elements of <channel>, <item>, <media:content> and/or <media:group>.

When an element appears at a shallow level, such as <channel> or <item>, it means that the element should be applied to every media object within its scope.

Duplicated elements appearing at deeper levels of the document tree have higher priority over other levels. For example, <media:content> level elements are favored over <item> level elements. The priority level is listed from strongest to weakest: <media:content>, <media:group>, <item>, <channel>.

Author:
cooper
See Also:
Serialized Form

Constructor Summary
Metadata()
          Creates a new instance of Metadata
 
Method Summary
 java.lang.Object clone()
          <media:copyright>
 boolean equals(java.lang.Object obj)
           
 Category[] getCategories()
          <media:category>
 java.lang.String getCopyright()
          <media:copyright>
 java.net.URI getCopyrightUrl()
          <media:copyright>
 Credit[] getCredits()
          <media:credit>
 java.lang.String getDescription()
          <media:description>
 java.lang.String getDescriptionType()
          <media:description>
 Hash getHash()
          <media:hash>
 java.lang.String[] getKeywords()
          <media:keywords>
 Rating[] getRatings()
          <media:rating>
 Restriction[] getRestrictions()
          <media:restriction>
 Text[] getText()
          <media:text>
 Thumbnail[] getThumbnail()
          <media:thumbnail>
 java.lang.String getTitle()
          <media:title>
 java.lang.String getTitleType()
          <media:title>
 int hashCode()
           
 void setCategories(Category[] categories)
          <media:category>
 void setCopyright(java.lang.String copyright)
          <media:copyright>
 void setCopyrightUrl(java.net.URI copyrightUrl)
          <media:copyright>
 void setCredits(Credit[] credits)
          <media:credit>
 void setDescription(java.lang.String description)
          <media:description>
 void setDescriptionType(java.lang.String descriptionType)
          <media:description>
 void setHash(Hash hash)
          <media:hash>
 void setKeywords(java.lang.String[] keywords)
          <media:keywords>
 void setRatings(Rating[] ratings)
          <media:rating>
 void setRestrictions(Restriction[] restrictions)
          <media:restriction>
 void setText(Text[] text)
          <media:text>
 void setThumbnail(Thumbnail[] thumbnail)
          <media:thumbnail>
 void setTitle(java.lang.String title)
          <media:title>
 void setTitleType(java.lang.String titleType)
          <media:title>
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Metadata

public Metadata()
Creates a new instance of Metadata

Method Detail

setCategories

public void setCategories(Category[] categories)
<media:category>

Allows a taxonomy to be set that gives an indication of the type of media content, and its particular contents. It has 2 optional attributes.

        <media:category scheme="http://search.yahoo.com/mrss/category_
        schema">music/artist/album/song</media:category>

        <media:category scheme="http://dmoz.org" label="Ace Ventura - Pet
        Detective">Arts/Movies/Titles/A/Ace_Ventura_Series/Ace_Ventura_
        -_Pet_Detective</media:category>

        <media:category scheme="urn:flickr:tags">ycantpark
        mobile</media:category>

scheme is the URI that identifies the categorization scheme. It is an optional attribute. If this attribute is not included, the default scheme is 'http://search.yahoo.com/mrss/category_schema'.

label is the human readable label that can be displayed in end user applications. It is an optional attribute.

Parameters:
categories - categories for the item

getCategories

public Category[] getCategories()
<media:category>

Allows a taxonomy to be set that gives an indication of the type of media content, and its particular contents. It has 2 optional attributes.

        <media:category scheme="http://search.yahoo.com/mrss/category_
        schema">music/artist/album/song</media:category>

        <media:category scheme="http://dmoz.org" label="Ace Ventura - Pet
        Detective">Arts/Movies/Titles/A/Ace_Ventura_Series/Ace_Ventura_
        -_Pet_Detective</media:category>

        <media:category scheme="urn:flickr:tags">ycantpark
        mobile</media:category>

scheme is the URI that identifies the categorization scheme. It is an optional attribute. If this attribute is not included, the default scheme is 'http://search.yahoo.com/mrss/category_schema'.

label is the human readable label that can be displayed in end user applications. It is an optional attribute.

Returns:
categories for the item.

setCopyright

public void setCopyright(java.lang.String copyright)
<media:copyright>

Copyright information for media object. It has 1 optional attribute.

        <media:copyright url="http://blah.com/additional-info.html">2005 FooBar Media</media:copyright>

url 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.

Parameters:
copyright - copyright text

getCopyright

public java.lang.String getCopyright()
<media:copyright>

Copyright information for media object. It has 1 optional attribute.

        <media:copyright url="http://blah.com/additional-info.html">2005 FooBar Media</media:copyright>

url 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.

Returns:
Copyright text

setCopyrightUrl

public void setCopyrightUrl(java.net.URI copyrightUrl)
<media:copyright>

Copyright information for media object. It has 1 optional attribute.

        <media:copyright url="http://blah.com/additional-info.html">2005 FooBar Media</media:copyright>

url 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.

Parameters:
copyrightUrl - link to more copyright information.

getCopyrightUrl

public java.net.URI getCopyrightUrl()
<media:copyright>

Copyright information for media object. It has 1 optional attribute.

        <media:copyright url="http://blah.com/additional-info.html">2005 FooBar Media</media:copyright>

url 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.

Returns:
Link to more copyright information.

setCredits

public void setCredits(Credit[] credits)
<media:credit>

Notable entity and the contribution to the creation of the media object. Current entities can include people, companies, locations, etc. Specific entities can have multiple roles, and several entities can have the same role. These should appear as distinct <media:credit> elements. It has 2 optional attributes.

        <media:credit role="producer" scheme="urn:ebu">entity name</media:credit>
 

role specifies the role the entity played. Must be lowercase. It is an optional attribute.

scheme is the URI that identifies the role scheme. It is an optional attribute. If this attribute is not included, the default scheme is 'urn:ebu'. See: European Broadcasting Union Role Codes.

Example roles:

        actor
        anchor person
        author
        choreographer
        composer
        conductor
        director
        editor
        graphic designer
        grip
        illustrator
        lyricist
        music arranger
        music group
        musician
        orchestra
        performer
        photographer
        producer
        reporter
        vocalist
 

Additional roles: European Broadcasting Union Role Codes

Parameters:
credits - credits for the item.

getCredits

public Credit[] getCredits()
<media:credit>

Notable entity and the contribution to the creation of the media object. Current entities can include people, companies, locations, etc. Specific entities can have multiple roles, and several entities can have the same role. These should appear as distinct <media:credit> elements. It has 2 optional attributes.

        <media:credit role="producer" scheme="urn:ebu">entity name</media:credit>
 

role specifies the role the entity played. Must be lowercase. It is an optional attribute.

scheme is the URI that identifies the role scheme. It is an optional attribute. If this attribute is not included, the default scheme is 'urn:ebu'. See: European Broadcasting Union Role Codes.

Example roles:

        actor
        anchor person
        author
        choreographer
        composer
        conductor
        director
        editor
        graphic designer
        grip
        illustrator
        lyricist
        music arranger
        music group
        musician
        orchestra
        performer
        photographer
        producer
        reporter
        vocalist
 

Additional roles: European Broadcasting Union Role Codes

Returns:
credits for the time.

setDescription

public void setDescription(java.lang.String description)
<media:description>

Short description describing the media object typically a sentence in length. It has 1 optional attribute.

        <media:description type="plain">This was some really bizarre band I listened to as a young lad.</media:description>

type specifies the type of text embedded. Possible values are either 'plain' or 'html'. Default value is 'plain'. All html must be entity-encoded. It is an optional attribute.

Parameters:
description - value of the description

getDescription

public java.lang.String getDescription()
<media:description>

Short description describing the media object typically a sentence in length. It has 1 optional attribute.

        <media:description type="plain">This was some really bizarre band I listened to as a young lad.</media:description>

type specifies the type of text embedded. Possible values are either 'plain' or 'html'. Default value is 'plain'. All html must be entity-encoded. It is an optional attribute.

Returns:
value of the description

setDescriptionType

public void setDescriptionType(java.lang.String descriptionType)
<media:description>

Short description describing the media object typically a sentence in length. It has 1 optional attribute.

        <media:description type="plain">This was some really bizarre band I listened to as a young lad.</media:description>

type specifies the type of text embedded. Possible values are either 'plain' or 'html'. Default value is 'plain'. All html must be entity-encoded. It is an optional attribute.

Parameters:
descriptionType - type of the description.

getDescriptionType

public java.lang.String getDescriptionType()
<media:description>

Short description describing the media object typically a sentence in length. It has 1 optional attribute.

        <media:description type="plain">This was some really bizarre band I listened to as a young lad.</media:description>

type specifies the type of text embedded. Possible values are either 'plain' or 'html'. Default value is 'plain'. All html must be entity-encoded. It is an optional attribute.

Returns:
type of the description

setHash

public void setHash(Hash hash)
<media:hash>

This is the hash of the binary media file. It can appear multiple times as long as each instance is a different algo. It has 1 optional attribute.

        <media:hash algo="md5">dfdec888b72151965a34b4b59031290a</media:hash>

algo indicates the algorithm used to create the hash. Possible values are 'md5' and 'sha-1'. Default value is 'md5'. It is an optional attribute.

Parameters:
hash - sets the hash for the item.

getHash

public Hash getHash()
<media:hash>

This is the hash of the binary media file. It can appear multiple times as long as each instance is a different algo. It has 1 optional attribute.

        <media:hash algo="md5">dfdec888b72151965a34b4b59031290a</media:hash>

algo indicates the algorithm used to create the hash. Possible values are 'md5' and 'sha-1'. Default value is 'md5'. It is an optional attribute.

Returns:
returns a Hash object for the item.

setKeywords

public void setKeywords(java.lang.String[] keywords)
<media:keywords>

Highly relevant keywords describing the media object with typically a maximum of ten words. The keywords and phrases should be comma delimited.

        <media:keywords>kitty, cat, big dog, yarn, fluffy</media:keywords>

Parameters:
keywords - Array of keywords

getKeywords

public java.lang.String[] getKeywords()
<media:keywords>

Highly relevant keywords describing the media object with typically a maximum of ten words. The keywords and phrases should be comma delimited.

        <media:keywords>kitty, cat, big dog, yarn, fluffy</media:keywords>

Returns:
Array of keywords

setRatings

public void setRatings(Rating[] ratings)
<media:rating>

This allows the permissible audience to be declared. If this element is not included, it assumes that no restrictions are necessary. It has one optional attribute.

               <media:rating scheme="urn:simple">adult</media:rating>
               <media:rating scheme="urn:icra">r (cz 1 lz 1 nz 1 oz 1 vz 1)</media:rating>
               <media:rating scheme="urn:mpaa">pg</media:rating>

               <media:rating scheme="urn:v-chip">tv-y7-fv</media:rating>

scheme is the URI that identifies the rating scheme. It is an optional attribute. If this attribute is not included, the default scheme is urn:simple (adult | nonadult).

Parameters:
ratings - Ratings objects

getRatings

public Rating[] getRatings()
<media:rating>

This allows the permissible audience to be declared. If this element is not included, it assumes that no restrictions are necessary. It has one optional attribute.

               <media:rating scheme="urn:simple">adult</media:rating>
               <media:rating scheme="urn:icra">r (cz 1 lz 1 nz 1 oz 1 vz 1)</media:rating>
               <media:rating scheme="urn:mpaa">pg</media:rating>

               <media:rating scheme="urn:v-chip">tv-y7-fv</media:rating>

scheme is the URI that identifies the rating scheme. It is an optional attribute. If this attribute is not included, the default scheme is urn:simple (adult | nonadult).

Returns:
Ratings objects

setRestrictions

public void setRestrictions(Restriction[] restrictions)
<media:restriction>

Allows restrictions to be placed on the aggregator rendering the media in the feed. Currently, restrictions are based on distributor (uri) and country codes. This element is purely informational and no obligation can be assumed or implied. Only one <media:restriction> element of the same type can be applied to a media object - all others will be ignored. Entities in this element should be space separated. To allow the producer to explicitly declare his/her intentions, two literals are reserved: 'all', 'none'. These literals can only be used once. This element has 1 required attribute, and 1 optional attribute (with strict requirements for its exclusion).

        <media:restriction relationship="allow" type="country">au us</media:restriction>

relationship indicates the type of relationship that the restriction represents (allow | deny). In the example above, the media object should only be syndicated in Australia and the United States. It is a required attribute.

Parameters:
restrictions - restrictions for the item.

getRestrictions

public Restriction[] getRestrictions()
<media:restriction>

Allows restrictions to be placed on the aggregator rendering the media in the feed. Currently, restrictions are based on distributor (uri) and country codes. This element is purely informational and no obligation can be assumed or implied. Only one <media:restriction> element of the same type can be applied to a media object - all others will be ignored. Entities in this element should be space separated. To allow the producer to explicitly declare his/her intentions, two literals are reserved: 'all', 'none'. These literals can only be used once. This element has 1 required attribute, and 1 optional attribute (with strict requirements for its exclusion).

        <media:restriction relationship="allow" type="country">au us</media:restriction>

relationship indicates the type of relationship that the restriction represents (allow | deny). In the example above, the media object should only be syndicated in Australia and the United States. It is a required attribute.

Returns:
restrictions for the item.

setText

public void setText(Text[] text)
<media:text>

Allows the inclusion of a text transcript, closed captioning, or lyrics of the media content. Many of these elements are permitted to provide a time series of text. In such cases, it is encouraged, but not required, that the elements be grouped by language and appear in time sequence order based on the start time. Elements can have overlapping start and end times. It has 4 optional attributes.

        <media:text type="plain" lang="en" start="00:00:03.000"
        end="00:00:10.000"> Oh, say, can you see</media:text>

        <media:text type="plain" lang="en" start="00:00:10.000"
        end="00:00:17.000">By the dawn's early light</media:text>
 

type specifies the type of text embedded. Possible values are either 'plain' or 'html'. Default value is 'plain'. All html must be entity-encoded. It is an optional attribute.

lang is the primary language encapsulated in the media object. Language codes possible are detailed in RFC 3066. This attribute is used similar to the xml:lang attribute detailed in the XML 1.0 Specification (Third Edition). It is an optional attribute.

start specifies the start time offset that the text starts being relevant to the media object. An example of this would be for closed captioning. It uses the NTP time code format (see: the time attribute used in <media:thumbnail>). It is an optional attribute.

end specifies the end time that the text is relevant. If this attribute is not provided, and a start time is used, it is expected that the end time is either the end of the clip or the start of the next <media:text> element.

Parameters:
text - text objects for the item.

getText

public Text[] getText()
<media:text>

Allows the inclusion of a text transcript, closed captioning, or lyrics of the media content. Many of these elements are permitted to provide a time series of text. In such cases, it is encouraged, but not required, that the elements be grouped by language and appear in time sequence order based on the start time. Elements can have overlapping start and end times. It has 4 optional attributes.

        <media:text type="plain" lang="en" start="00:00:03.000"
        end="00:00:10.000"> Oh, say, can you see</media:text>

        <media:text type="plain" lang="en" start="00:00:10.000"
        end="00:00:17.000">By the dawn's early light</media:text>
 

type specifies the type of text embedded. Possible values are either 'plain' or 'html'. Default value is 'plain'. All html must be entity-encoded. It is an optional attribute.

lang is the primary language encapsulated in the media object. Language codes possible are detailed in RFC 3066. This attribute is used similar to the xml:lang attribute detailed in the XML 1.0 Specification (Third Edition). It is an optional attribute.

start specifies the start time offset that the text starts being relevant to the media object. An example of this would be for closed captioning. It uses the NTP time code format (see: the time attribute used in <media:thumbnail>). It is an optional attribute.

end specifies the end time that the text is relevant. If this attribute is not provided, and a start time is used, it is expected that the end time is either the end of the clip or the start of the next <media:text> element.

Returns:
Text objects for the item.

setThumbnail

public void setThumbnail(Thumbnail[] thumbnail)
<media:thumbnail>

Allows particular images to be used as representative images for the media object. If multiple thumbnails are included, and time coding is not at play, it is assumed that the images are in order of importance. It has 1 required attribute and 3 optional attributes.

        <media:thumbnail url="http://www.foo.com/keyframe.jpg" width="75" height="50" time="12:05:01.123" />

url specifies the url of the thumbnail. It is a required attribute.

height specifies the height of the thumbnail. It is an optional attribute.

width specifies the width of the thumbnail. It is an optional attribute.

time specifies the time offset in relation to the media object. Typically this is used when creating multiple keyframes within a single video. The format for this attribute should be in the DSM-CC's Normal Play Time (NTP) as used in RTSP [RFC 2326 3.6 Normal Play Time]. It is an optional attribute.

Parameters:
thumbnail - thumbnails for the image

getThumbnail

public Thumbnail[] getThumbnail()
<media:thumbnail>

Allows particular images to be used as representative images for the media object. If multiple thumbnails are included, and time coding is not at play, it is assumed that the images are in order of importance. It has 1 required attribute and 3 optional attributes.

        <media:thumbnail url="http://www.foo.com/keyframe.jpg" width="75" height="50" time="12:05:01.123" />

url specifies the url of the thumbnail. It is a required attribute.

height specifies the height of the thumbnail. It is an optional attribute.

width specifies the width of the thumbnail. It is an optional attribute.

time specifies the time offset in relation to the media object. Typically this is used when creating multiple keyframes within a single video. The format for this attribute should be in the DSM-CC's Normal Play Time (NTP) as used in RTSP [RFC 2326 3.6 Normal Play Time]. It is an optional attribute.

Returns:
Thumbnails for the image

setTitle

public void setTitle(java.lang.String title)
<media:title>

The title of the particular media object. It has 1 optional attribute.

        <media:title type="plain">The Judy's - The Moo Song</media:title>

type specifies the type of text embedded. Possible values are either 'plain' or 'html'. Default value is 'plain'. All html must be entity-encoded. It is an optional attribute.

Parameters:
title - Value of the title

getTitle

public java.lang.String getTitle()
<media:title>

The title of the particular media object. It has 1 optional attribute.

        <media:title type="plain">The Judy's - The Moo Song</media:title>

type specifies the type of text embedded. Possible values are either 'plain' or 'html'. Default value is 'plain'. All html must be entity-encoded. It is an optional attribute.

Returns:
value of the title.

setTitleType

public void setTitleType(java.lang.String titleType)
<media:title>

The title of the particular media object. It has 1 optional attribute.

        <media:title type="plain">The Judy's - The Moo Song</media:title>

type specifies the type of text embedded. Possible values are either 'plain' or 'html'. Default value is 'plain'. All html must be entity-encoded. It is an optional attribute.

Parameters:
titleType - type of the title.

getTitleType

public java.lang.String getTitleType()
<media:title>

The title of the particular media object. It has 1 optional attribute.

        <media:title type="plain">The Judy's - The Moo Song</media:title>

type specifies the type of text embedded. Possible values are either 'plain' or 'html'. Default value is 'plain'. All html must be entity-encoded. It is an optional attribute.

Returns:
type of the title

clone

public java.lang.Object clone()
<media:copyright>

Copyright information for media object. It has 1 optional attribute.

        <media:copyright url="http://blah.com/additional-info.html">2005 FooBar Media</media:copyright>

url 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.

Overrides:
clone in class java.lang.Object
Returns:
Link to more copyright information.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2006-2009. All Rights Reserved.