public class Metadata extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Metadata.AudiobookChapter
The standard metadata keys defined for "Audiobook chapter" media.
|
static class |
Metadata.Generic
The standard metadata keys defined for "Generic" media.
|
static class |
Metadata.MetadataType
Describes the type of the data found inside the
metadata. |
static class |
Metadata.Movie
The standard metadata keys defined for "Movie" media.
|
static class |
Metadata.MusicTrack
The standard metadata keys defined for "Music track" media.
|
static class |
Metadata.Photo
The standard metadata keys defined for "Photo" media.
|
static class |
Metadata.TvShow
The standard metadata keys defined for "TV show" media.
|
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DATE_TIME_PATTERN
The format pattern to use when converting to string
|
static String |
IMAGES
The key used for metadata images
|
static String |
METADATA_TYPE
The key used for
Metadata.MetadataType |
protected static String[] |
TIME_ZONE_PATTERNS
An array of the supported time zone patterns
|
| Modifier and Type | Method and Description |
|---|---|
static String |
dateToString(Calendar calendar)
Converts a
Calendar instance to a "metadata date" formatted
string. |
protected static String |
extractDate(String dateTimeString)
Extracts the "date part" of the date and time string.
|
static List<Image> |
extractImages(Map<String,Object> metadata)
|
protected static String |
extractTime(String dateTimeString)
Extracts the "time part" of the date and time string.
|
static Calendar |
parseDate(String dateTimeString)
Attempts to parse a date and time string formatted as a "metadata date"
to a
Calendar instance. |
static boolean |
setImages(Map<String,Object> metadata,
Collection<Image> images)
|
static boolean |
setImages(Map<String,Object> metadata,
Image... images)
|
protected static final String[] TIME_ZONE_PATTERNS
protected static final String DATE_TIME_PATTERN
public static final String METADATA_TYPE
Metadata.MetadataTypepublic static final String IMAGES
@Nonnull public static List<Image> extractImages(@Nullable Map<String,Object> metadata)
public static boolean setImages(@Nullable Map<String,Object> metadata, Image... images)
metadata - to metadata to alter.images - the Image(s) to set.true if the metadata was altered, false if it
wasn't.public static boolean setImages(@Nullable Map<String,Object> metadata, @Nullable Collection<Image> images)
metadata - to metadata to alter.images - the Collection of Images to set.true if the metadata was altered, false if it
wasn't.@Nullable public static String dateToString(Calendar calendar)
Calendar instance to a "metadata date" formatted
string.calendar - the Calendar instance to convert.null if calendar is
null.@Nullable public static Calendar parseDate(String dateTimeString)
Calendar instance.dateTimeString - the date and time string to parse.Calendar or null.@Nullable protected static String extractDate(String dateTimeString)
dateTimeString - the date and time string to extract from.null.Copyright © 2022. All rights reserved.