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