|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object magoffin.matt.ma2.support.AbstractMediaMetadata
public abstract class AbstractMediaMetadata
Basic implementation of MediaMetadata
.
Constructor Summary | |
---|---|
AbstractMediaMetadata()
|
Method Summary | |
---|---|
protected void |
addToMap(java.lang.Object key,
java.lang.String value)
Add a non-null value to the metadata Map. |
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. |
void |
setCreationDate(java.util.Date creationDate)
|
void |
setMetadataMap(java.util.Map<java.lang.String,java.lang.String> metadataMap)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface magoffin.matt.ma2.MediaMetadata |
---|
setMediaResource |
Constructor Detail |
---|
public AbstractMediaMetadata()
Method Detail |
---|
public java.util.Date getCreationDate()
MediaMetadata
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 MediaMetadata.setMediaResource(Resource)
has been called on this particular MediaMetadata
instance.
getCreationDate
in interface MediaMetadata
public java.util.Map<java.lang.String,java.lang.String> getMetadataMap()
MediaMetadata
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 MediaMetadata.setMediaResource(Resource)
has been called on this particular MediaMetadata
instance.
getMetadataMap
in interface MediaMetadata
protected void addToMap(java.lang.Object key, java.lang.String value)
If the value
is null then nothing
will be added to the Map. The Object.toString()
method
is called on the key
to add to the Map.
key
- the Map keyvalue
- the Map valuepublic void setCreationDate(java.util.Date creationDate)
creationDate
- The creationDate to set.public void setMetadataMap(java.util.Map<java.lang.String,java.lang.String> metadataMap)
metadataMap
- The metadataMap to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |