|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MediaMetadata
Metadata about a media item.
This API exists to give a simple method to get meta data about a variety of media types (image, video, sound, etc) without needing to know the method the meta data was retrieved by.
Method Summary | |
---|---|
java.util.Date |
getCreationDate()
Get the date the item was created. |
java.util.Map<java.lang.String,java.lang.String> |
getMetadataMap()
Get a Map of all meta data values. |
MediaMetadata |
setMediaResource(org.springframework.core.io.Resource resource)
Set the media resource from which to extract metadata from. |
Method Detail |
---|
MediaMetadata setMediaResource(org.springframework.core.io.Resource resource)
After this method is called, the other methods on the returned instance should return meta data extracted from this resource. Note the returned instance may not be the same instance as the one the method is called on, so that during the extraction process a more-specific instance can be returned (e.g. for a digital camera metadata instance, a generic image metadata might be instantiated, but a more specific one returned by this method when it discovers the type of camera make/model the media resource was taken with).
resource
- the media resource being processed
java.util.Date getCreationDate()
This method should return a "creation date" for the media resource, if found in the resource's metadat. For example the EXIF metadata format stores the date/time the image was created, i.e. the date/time the photo was taken. This method should return that date. If no appropriate date can be found in the media resource's metadata, this method should return null.
This method can only be called after setMediaResource(Resource)
has been called on this particular MediaMetadata
instance.
java.util.Map<java.lang.String,java.lang.String> getMetadataMap()
This method should return a Map of all avaialble metadata values
extracted from the media resource that can be represented as simple
String values. These values can then be added to a MediaItem
instance's Metadata
(i.e. the List returned by
MediaItem.getMetadata()
.
This method can only be called after setMediaResource(Resource)
has been called on this particular MediaMetadata
instance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |