|
||||||||||
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. The
class itself implements Metadata but the real Metadata is stored in the
MetadataNode. That means a call to getMetadata("foo")
will be
translated to
getMetadataRoot().getMetadata("foo");
Field Summary | |
---|---|
static int |
AUDIO_ITEM
Represents the base audio content. |
static int |
AUDIO_ITEM_BOOK
In addition to being an AUDIO_ITEM content MAY be an audio book. |
static int |
AUDIO_ITEM_BROADCAST
In addition to being an AUDIO_ITEM content MAY be broadcast on a radio station. |
static int |
AUDIO_ITEM_TRACK
In addition to being an AUDIO_ITEM content MAY be a track such as a song. |
static int |
IMAGE_ITEM
Base image item. |
static int |
IMAGE_ITEM_PHOTO
In addition to being an IMAGE_ITEM content MAY be a photo. |
static int |
VIDEO_ITEM
Represents the base video item. |
static int |
VIDEO_ITEM_BROADCAST
In addition to being a VIDEO_ITEM content MAY be a video broadcast. |
static int |
VIDEO_ITEM_MOVIE
In addition to being a VIDEO_ITEM content MAY be a movie. |
static int |
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 |
delete()
Deletes this ContentItem. |
int |
getContentClass()
Returns the content class of this content item. |
MetadataNode |
getMetadataRoot()
Gets the Metadata root object for this content. |
MetadataNode |
getParentNode()
Gets the parent node of this Metadata. |
ContentResource |
getResource(int n)
Returns the nth ContentResource of this ContentItem. |
int |
getResourceCount()
Returns the number of ContentResource s 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. |
Service |
getService()
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. |
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. |
Methods inherited from interface org.ocap.hn.content.ContentEntry |
---|
getContentSize, getCreationDate, getExtendedFileAccessPermissions, getMetadata, getName, getParent, getServer |
Field Detail |
---|
static final int AUDIO_ITEM
static final int AUDIO_ITEM_TRACK
static final int AUDIO_ITEM_BROADCAST
static final int AUDIO_ITEM_BOOK
static final int VIDEO_ITEM
static final int VIDEO_ITEM_MOVIE
static final int VIDEO_ITEM_BROADCAST
static final int VIDEO_ITEM_MUSIC_CLIP
static final int IMAGE_ITEM
static final int IMAGE_ITEM_PHOTO
Method Detail |
---|
boolean hasAudio()
boolean hasVideo()
boolean hasStillImage()
MetadataNode getMetadataRoot()
Service getService()
MetadataNode getParentNode()
MetadataNode.getParentNode()
int 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_PHOTO
boolean delete() throws IOException, SecurityException
ContentResource.delete()
method on each ContentResource contained in this ContentItem. Deletes
a local ContentItem only. If the #isLocal method
returns false a exception is thrown.
Note: this overrides the definition of ContentEntry
delete
in interface ContentEntry
SecurityException
- if the application does not
have write ExtendedFileAccessPermission.
IOException
- if the ContentItem is not local.int getResourceCount()
ContentResource
s which are associated with
this ContentItem.
ContentResource getResource(int n) throws ArrayIndexOutOfBoundsException
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |