Commit f55e2444 authored by wmunsil's avatar wmunsil

HN API changes called for by OCVET-69.

parent 4151b771
......@@ -11,14 +11,10 @@ import javax.tv.service.Service;
/**
* This class represents a piece of content. This can be audio, video or still
* image content. It is not directly linked to any file. This is done via the
* ContentResources. A ContentItem can have multiple ContentResources. The class
* itself implements Metadata but the real Metadata is stored in the
* MetadataNode. That means a call to <code>getMetadata("foo")</code> will be
* translated to <code>getMetadataRoot().getMetadata("foo");</code>
*
* ContentResources. A ContentItem can have multiple ContentResources.
*/
public interface ContentItem extends ContentEntry {
public interface ContentItem extends ContentEntry
{
/**
* Represents the base content item.
*/
......@@ -75,10 +71,10 @@ public interface ContentItem extends ContentEntry {
* In addition to being an IMAGE_ITEM content MAY be a photo.
*/
public static final String IMAGE_ITEM_PHOTO = "object.item.imageItem.photo";
/**
* Returns a boolean indicating if this content has audio.
*
*
* @return True if the content type has audio, otherwise returns false.
*/
public boolean hasAudio();
......@@ -86,14 +82,14 @@ public interface ContentItem extends ContentEntry {
/**
* Returns a boolean indicating if the ContentItem has video associated with
* it.
*
*
* @return True if the ContentItem contains video, otherwise returns false.
*/
public boolean hasVideo();
/**
* Returns a boolean indicating if the ContentItem has a still image.
*
*
* @return True if the ContentItem has a still image, otherwise returns
* false.
*/
......@@ -106,7 +102,7 @@ public interface ContentItem extends ContentEntry {
* ContentItem is not local the returned Service SHALL be a RemoteService.
* If the content associated with item has been deleted or is no longer
* accessable, this method SHALL return null.
*
*
* @return A JavaTV service if this content is presentable as a Service,
* null otherwise.
*/
......@@ -114,7 +110,7 @@ public interface ContentItem extends ContentEntry {
/**
* Returns the content class of this content item.
*
*
* @see #AUDIO_ITEM
* @see #AUDIO_ITEM_BOOK
* @see #AUDIO_ITEM_BROADCAST
......@@ -125,18 +121,18 @@ public interface ContentItem extends ContentEntry {
* @see #VIDEO_ITEM_MOVIE
* @see #VIDEO_ITEM_MUSIC_CLIP
* @see #IMAGE_ITEM_PHOTO
*
*
* @return The content class of this item.
*/
public String getContentClass();
/**
* Gets the title for this ContentItem, or null if the title is unknown.
*
*
* @return the String title for this item, or null if unknown.
*/
public String getTitle();
/**
* Deletes this ContentItem. Calls the {@link ContentResource#delete} method
* on each ContentResource contained in this ContentItem. Deletes a local
......@@ -149,7 +145,7 @@ public interface ContentItem extends ContentEntry {
* ContentItem as defined by this method.
* </p>
* The ContentItem is not valid anymore after this call.
*
*
* @throws java.lang.SecurityException
* if the application does not have write
* ExtendedFileAccessPermission.
......@@ -161,19 +157,19 @@ public interface ContentItem extends ContentEntry {
/**
* Returns the number of {@link ContentResource}s which are associated with
* this ContentItem.
*
*
* @return number of ContentResources.
*/
public int getResourceCount();
/**
* Returns the n<sup>th</sup> {@link ContentResource} of this ContentItem.
*
*
* @param n
* the index of the ContentResource
*
*
* @return the n<sup>th</sup ContentResource
*
*
* @throws ArrayIndexOutOfBoundsException
* if the n<sup>th</sup> value does not exist.
*/
......@@ -182,10 +178,10 @@ public interface ContentItem extends ContentEntry {
/**
* Returns the index of the specified ContentResource or -1 if the
* ContentResource does not exist in this ContentItem.
*
*
* @param r
* The ContentResource to check for.
*
*
* @return The index of the ContentResource or -1 if it doesn't exist in this
* ContentItem.
*/
......@@ -194,10 +190,10 @@ public interface ContentItem extends ContentEntry {
/**
* Checks whether the given {@link ContentResource} is part of this
* ContentItem..
*
*
* @param entry
* The ContentResource to check for.
*
*
* @return True if the ContentResource is part of this ContentItem,
* otherwise returns false.
*/
......@@ -206,7 +202,7 @@ public interface ContentItem extends ContentEntry {
/**
* Gets an array copy of ContentResources which are part of this
* ContentItem.
*
*
* @return Array of ContentResources.
*/
public ContentResource[] getResources();
......@@ -214,7 +210,7 @@ public interface ContentItem extends ContentEntry {
/**
* Gets an array copy of renderable ContentResources which are part of this
* ContentItem.
*
*
* @return Array of ContentResources contained in this ContentItem for for
* which ContentResource.isRenderable() returns true.
*/
......@@ -224,17 +220,17 @@ public interface ContentItem extends ContentEntry {
* Checks whether the local device has the capabilities to render this
* content item. This includes the ability to negotiate media protocol with
* the host device, the ability of the local device to render this
* content item's media format, and sufficient access permissions
* content item's media format, and sufficient access permissions
* for the calling application.
*
*
* This method will return true if any of the ContentResources contained in
* this ContentItem are renderable.
*
*
* This call does not consider immediate availability of resources required
* for presentation of this content.
*
*
* @return true if this content is renderable on the local device, false
* otherwise.
*/
public boolean isRenderable();
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment