|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ContentItem
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.
| Field Summary | |
|---|---|
static String |
AUDIO_ITEM
Represents the base audio content. |
static String |
AUDIO_ITEM_BOOK
In addition to being an AUDIO_ITEM content MAY be an audio book. |
static String |
AUDIO_ITEM_BROADCAST
In addition to being an AUDIO_ITEM content MAY be broadcast on a radio station. |
static String |
AUDIO_ITEM_TRACK
In addition to being an AUDIO_ITEM content MAY be a track such as a song. |
static String |
IMAGE_ITEM
Base image item. |
static String |
IMAGE_ITEM_PHOTO
In addition to being an IMAGE_ITEM content MAY be a photo. |
static String |
ITEM
Represents the base content item. |
static String |
VIDEO_ITEM
Represents the base video item. |
static String |
VIDEO_ITEM_BROADCAST
In addition to being a VIDEO_ITEM content MAY be a video broadcast. |
static String |
VIDEO_ITEM_MOVIE
In addition to being a VIDEO_ITEM content MAY be a movie. |
static String |
VIDEO_ITEM_MUSIC_CLIP
In addition to being a VIDEO_ITEM content MAY be a music video clip, e.g. |
| Method Summary | |
|---|---|
boolean |
containsResource(ContentResource entry)
Checks whether the given ContentResource is part of this
ContentItem.. |
boolean |
deleteEntry()
Deletes this ContentItem. |
String |
getContentClass()
Returns the content class of this content item. |
javax.tv.service.Service |
getItemService()
If this ContentItem is presentable as a JavaTV Service than this method returns a javax.tv.service.Service, or derivative of a Service, e.g. |
ContentResource[] |
getRenderableResources()
Gets an array copy of renderable ContentResources which are part of this ContentItem. |
ContentResource |
getResource(int n)
Returns the nth ContentResource of this ContentItem. |
int |
getResourceCount()
Returns the number of ContentResources which are associated with
this ContentItem. |
int |
getResourceIndex(ContentResource r)
Returns the index of the specified ContentResource or -1 if the ContentResource does not exist in this ContentItem. |
ContentResource[] |
getResources()
Gets an array copy of ContentResources which are part of this ContentItem. |
String |
getTitle()
Gets the title for this ContentItem, or null if the title is unknown. |
boolean |
hasAudio()
Returns a boolean indicating if this content has audio. |
boolean |
hasStillImage()
Returns a boolean indicating if the ContentItem has a still image. |
boolean |
hasVideo()
Returns a boolean indicating if the ContentItem has video associated with it. |
boolean |
isRenderable()
Checks whether the local device has the capabilities to render this content item. |
| Methods inherited from interface org.ocap.hn.content.ContentEntry |
|---|
getContentSize, getCreationDate, getEntryParent, getExtendedFileAccessPermissions, getID, getParentID, getRootMetadataNode, getServer, isLocal |
| Field Detail |
|---|
static final String ITEM
static final String AUDIO_ITEM
static final String AUDIO_ITEM_TRACK
static final String AUDIO_ITEM_BROADCAST
static final String AUDIO_ITEM_BOOK
static final String VIDEO_ITEM
static final String VIDEO_ITEM_MOVIE
static final String VIDEO_ITEM_BROADCAST
static final String VIDEO_ITEM_MUSIC_CLIP
static final String IMAGE_ITEM
static final String IMAGE_ITEM_PHOTO
| Method Detail |
|---|
boolean hasAudio()
boolean hasVideo()
boolean hasStillImage()
javax.tv.service.Service getItemService()
String getContentClass()
AUDIO_ITEM,
AUDIO_ITEM_BOOK,
AUDIO_ITEM_BROADCAST,
AUDIO_ITEM_TRACK,
IMAGE_ITEM,
VIDEO_ITEM,
VIDEO_ITEM_BROADCAST,
VIDEO_ITEM_MOVIE,
VIDEO_ITEM_MUSIC_CLIP,
IMAGE_ITEM_PHOTOString getTitle()
boolean deleteEntry()
throws IOException
ContentResource.delete() method
on each ContentResource contained in this ContentItem. Deletes a local
ContentItem only. If the #isLocal method returns false an exception is
thrown.
Note: this overrides the definition of ContentEntry.deleteEntry().
If an application calls the ContentEntry.deleteEntry method on an object
that is an instance of ContentItem, the implementation SHALL delete the
ContentItem as defined by this method.
deleteEntry in interface ContentEntrySecurityException - if the application does not have write
ExtendedFileAccessPermission.
IOException - if the ContentItem is not local.int getResourceCount()
ContentResources which are associated with
this ContentItem.
ContentResource getResource(int n)
ContentResource of this ContentItem.
n - the index of the ContentResource
ArrayIndexOutOfBoundsException - if the nth value does not exist.int getResourceIndex(ContentResource r)
r - The ContentResource to check for.
boolean containsResource(ContentResource entry)
ContentResource is part of this
ContentItem..
entry - The ContentResource to check for.
ContentResource[] getResources()
ContentResource[] getRenderableResources()
boolean isRenderable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||