javax.microedition.media.control
Interface MetaDataControl

All Superinterfaces:
Control

public interface MetaDataControl
extends Control

MetaDataControl is used to retrieve metadata information included within the media streams. A MetaDataControl object recognizes and stores metadata and provides XML-like accessor methods to retrieve this information.

Predefined keys are provided to refer to commonly used metadata fields (title, copyright, data, author).

Custom RIM Metadata Keys

In addition to the provided metadata keys, several metadata key Strings are used for the various metadata schemes supported. Below is a list of the String key values and the version that support was introduced.

Media Applies ToAvailable SinceString Key
ID3v14.2album
author
comment
genre
title
date
ID3v1.14.7.1trackNumber
ID3v24.2BPM
composer
copyright
day-month
encoder
time
subtitle
language
length
orchestra
conductor
publisher
size
ISRC
URL
4.7.1playlistDelay
textWriter
fileType
contentGroupDescription
initialKey
mediaType
originalAlbum
originalFilename
originalArtist
originalReleaseYear
fileOwner
remixedBy
partOfASet
recordingDates
InternetRadioStationName
InternetRadioStationOwner
encoderSettings
termsOfUse
textTranscription
commercialInformationURL
officialAudioFileURL
officialArtistURL
officialAudioSourceURL
officialInternetRadioStationURL
paymentURL
publisherURL
ID3v2.44.2date
mood
4.7.1encodingTime
originalReleaseTime
releaseTime
taggingTime
producedNotice
albumSortOrder
performerSortOrderKey
titleSortOrder
setSubtitle
Windows Media4.2.1rating
period
producer
4.7.1contentDistributor
parentalRating
promotionURL
metadataProvider
toolName
toolVersion
JPG, PNG, GIF4.2description
keywords
cameraMake
cameraModel
orientation
exposureTime
FNumber
ISOSpeed
software
disclaimer
warning
source
signature

Since:
BlackBerry API 4.0.0

Field Summary
static String AUTHOR_KEY
          Default key for AUTHOR information.
static String COPYRIGHT_KEY
          Default key for COPYRIGHT information.
static String DATE_KEY
          Default key for DATE information.
static String TITLE_KEY
          Default key for TITLE information.
 
Method Summary
 String getKeyValue(String key)
          Retrieve the value found int the metadata associated with the given key.
 String[] getKeys()
          Return the list of keys for the available metadata values.
 



Field Detail

AUTHOR_KEY

static final String AUTHOR_KEY
Default key for AUTHOR information.

Value "author" is assigned to AUTHOR_KEY.

See Also:
Constant Field Values
Since:
BlackBerry API 4.0.0

COPYRIGHT_KEY

static final String COPYRIGHT_KEY
Default key for COPYRIGHT information.

Value "copyright" is assigned to COPYRIGHT_KEY.

See Also:
Constant Field Values
Since:
BlackBerry API 4.0.0

DATE_KEY

static final String DATE_KEY
Default key for DATE information.

Value "data" is assinged to DATE_KEY.

See Also:
Constant Field Values
Since:
BlackBerry API 4.0.0

TITLE_KEY

static final String TITLE_KEY
Default key for TITLE information.

Value "title" is assigned to TITLE_KEY.

See Also:
Constant Field Values
Since:
BlackBerry API 4.0.0


Method Detail

getKeys

String[] getKeys()
Return the list of keys for the available metadata values. The returned array must be an array with at least one key.

Returns:
The list of keys for the available metadata values.
Since:
BlackBerry API 4.0.0

getKeyValue

String getKeyValue(String key)
Retrieve the value found int the metadata associated with the given key. Only keys obtained from getKeys are valid and can be used to retrieve metadata values. If null or an invalid key is used, an IllegalArgumentException will be thrown.

Some keys are valid but the associated metadata may not be available before a certain portion of the media is played. For example, some streaming media types may contain metadata that's stored at the end of the file. As a result, the metadata may not be available until the playback reaches the end of media. When that ahppens, calling getKeyValues with those keys will return null before the data is available. However, when the playback reaches the end of media, all metadata values must be made available.

Parameters:
key - A key to retrieve the value.
Returns:
The value of the key or null if the given key is valid but the value is not yet available.
Throws:
IllegalArugmentException - Thrown if the given key is null or invalid.
Since:
BlackBerry API 4.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal