public class MediaMetadata extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EPISODE_NR |
static String |
EPISODE_NR_DVD |
static String |
IMDB |
static String |
SEASON_NR |
static String |
SEASON_NR_DVD |
static String |
TMDB |
static String |
TMDB_SET |
static String |
TVDB |
Constructor and Description |
---|
MediaMetadata(String providerId)
Instantiates a new media metadata for the given provider.
|
Modifier and Type | Method and Description |
---|---|
void |
addCastMember(MediaCastMember cm)
Adds the cast member.
|
void |
addCertification(Certification certification)
Adds the certification.
|
void |
addCountry(String country)
Add the country if it is not present
|
void |
addExtraData(String key,
Object value)
Add an extra data.
|
void |
addGenre(MediaGenres genre)
Adds the genre.
|
void |
addMediaArt(List<MediaArtwork> art)
Adds the media art.
|
void |
addMediaArt(MediaArtwork ma)
Adds the media art.
|
void |
addProductionCompany(String productionCompany)
Add a production company
|
void |
addRating(MediaRating rating)
Add a rating
|
void |
addSpokenLanguage(String language)
Adds the given language if it is not present (2 digit: ISO 639-1)
|
void |
addSubItem(MediaMetadata item)
Add a sub item
|
void |
addTag(String tag)
Add a new tag
|
void |
addTrailer(MediaTrailer trailer)
Adds the trailer.
|
void |
clearMediaArt()
Clear media art.
|
int |
getAbsoluteNumber()
Get the absolute number (or -1 if not set)
|
List<MediaCastMember> |
getCastMembers()
Get all cast members.
|
List<MediaCastMember> |
getCastMembers(MediaCastMember.CastType type)
Gets the cast members for a given type.
|
List<Certification> |
getCertifications()
Gets the certifications.
|
String |
getCollectionName()
Get the collection name
|
List<String> |
getCountries()
Get the list of all countries
|
int |
getDisplayEpisodeNumber()
Get the display-episode number (or -1 if not set)
|
int |
getDisplaySeasonNumber()
Get the display-season number (or -1 if not set)
|
int |
getDvdEpisodeNumber()
Get the DVD episode number (or -1 if not set)
|
int |
getDvdSeasonNumber()
Get the DVD season number (or -1 if not set)
|
int |
getEpisodeNumber()
Get the episode number (or -1 if not set)
|
Map<String,Object> |
getExtraData()
Get all extra data.
|
Object |
getExtraData(String key)
Get an extra data.
|
List<MediaArtwork> |
getFanart()
Gets the fanart.
|
List<MediaGenres> |
getGenres()
Gets the genres.
|
Object |
getId(String key)
Gets an ID.
|
HashMap<String,Object> |
getIds()
Gets all IDs.
|
List<MediaArtwork> |
getMediaArt()
get all set artwork
|
List<MediaArtwork> |
getMediaArt(MediaArtwork.MediaArtworkType type)
Gets the media art.
|
String |
getOriginalLanguage()
Get the original title's language
|
String |
getOriginalTitle()
Get the original title
|
String |
getPlot()
Get the plot
|
List<String> |
getProductionCompanies()
Get all production companies
|
String |
getProviderId()
Gets the provider id.
|
List<MediaRating> |
getRatings()
Get the ratings
|
Date |
getReleaseDate()
Get the release date
|
int |
getRuntime()
Get the runtime in minutes
|
int |
getSeasonNumber()
Get the season number (or -1 if not set)
|
List<String> |
getSpokenLanguages()
Get a list of all spoken languages (2 digit: ISO 639-1)
|
MediaAiredStatus |
getStatus()
Get the airing status
|
List<MediaMetadata> |
getSubItems()
Get all subitems
|
String |
getTagline()
Get the tagline
|
List<String> |
getTags()
Get the tags
|
String |
getTitle()
Get the title
|
int |
getTop250()
Get the place in the top 250 or 0 if not set
|
List<MediaTrailer> |
getTrailers()
Gets the trailers.
|
int |
getYear()
Get the year
|
void |
mergeFrom(MediaMetadata md)
merges all entries from other MD into ours, IF VALUES ARE EMPTY
needs testing! |
void |
removeCountry(String country)
Remove the given country
|
void |
removeProductionCompany(String productionCompany)
Removes the given production company
|
void |
removeSpokenLanguage(String language)
Removes the given language
|
void |
removeTag(String tag)
Remove the given tag
|
void |
setAbsoluteNumber(int absoluteNumber)
Set the absolute number
|
void |
setAbsoluteNumber(Integer absoluteNumber)
Set the absolute number - nullsafe
|
void |
setCastMembers(List<MediaCastMember> castMembers)
set all given cast members
|
void |
setCertifications(List<Certification> certifications)
set the given certifications
|
void |
setCollectionName(String collectionName)
Set the collection name
|
void |
setCountries(List<String> countries)
Set the countries
|
void |
setDisplayEpisodeNumber(int displayEpisodeNumber)
Set the display-episode number
|
void |
setDisplayEpisodeNumber(Integer displayEpisodeNumber)
Set the display-episode number - nullsafe
|
void |
setDisplaySeasonNumber(int displaySeasonNumber)
Set the display-season number
|
void |
setDisplaySeasonNumber(Integer displaySeasonNumber)
Set the display-season number - nullsafe
|
void |
setDvdEpisodeNumber(int dvdEpisodeNumber)
Set the DVD episode number
|
void |
setDvdEpisodeNumber(Integer dvdEpisodeNumber)
Set the DVD episode number - nullsafe
|
void |
setDvdSeasonNumber(int dvdSeasonNumber)
Set the DVD season number
|
void |
setDvdSeasonNumber(Integer dvdSeasonNumber)
Set the DVD season number - nullsafe
|
void |
setEpisodeNumber(int episodeNumber)
Set the episode number
|
void |
setEpisodeNumber(Integer episodeNumber)
Set the episode number - nullsafe
|
void |
setGenres(List<MediaGenres> genres)
Sets all given genres
|
void |
setId(String key,
Object object)
Sets an ID.
|
void |
setMediaArt(List<MediaArtwork> artwork)
set all given artwork
|
void |
setOriginalLanguage(String originalLanguage)
Set the original title's language
|
void |
setOriginalTitle(String originalTitle)
Set the original title
|
void |
setPlot(String plot)
Set the plot
|
void |
setProductionCompanies(List<String> productionCompanies)
Set the production companies
|
void |
setRatings(List<MediaRating> newRatings)
Set the ratings
|
void |
setReleaseDate(Date releaseDate)
Set the release date
|
void |
setReleaseDate(org.joda.time.DateTime releaseDate)
Set the release date
|
void |
setRuntime(int runtime)
Set the runtime in minutes (full minutes)
|
void |
setRuntime(Integer runtime)
Set the runtime in minutes (full minutes) - nullsafe
|
void |
setSeasonNumber(int seasonNumber)
Set the season number
|
void |
setSeasonNumber(Integer seasonNumber)
Set the season number - nullsafe
|
void |
setSpokenLanguages(List<String> spokenLanguages)
Set the spoken languages (2 digit: ISO 639-1)
|
void |
setStatus(MediaAiredStatus status)
Set the airing status
|
void |
setStatus(String statusAsText)
Parse/Set the airing status
|
void |
setTagline(String tagline)
Set the tagline
|
void |
setTags(List<String> tags)
Set tags
|
void |
setTitle(String title)
Set the title
|
void |
setTop250(int top250)
Set the place in the top 250
|
void |
setTop250(Integer top250)
Set the place in the top 250 - nullsafe
|
void |
setTrailers(List<MediaTrailer> trailers)
set all given trailers
|
void |
setYear(int year)
Set the year
|
void |
setYear(Integer year)
Set the year - nullsafe
|
String |
toString()
Uses
ReflectionToStringBuilder to generate a toString for the specified object. |
public static final String IMDB
public static final String TMDB
public static final String TVDB
public static final String TMDB_SET
public static final String EPISODE_NR
public static final String SEASON_NR
public static final String EPISODE_NR_DVD
public static final String SEASON_NR_DVD
public MediaMetadata(String providerId)
providerId
- the provider idpublic void mergeFrom(MediaMetadata md)
md
- other MediaMetadatapublic String getProviderId()
public List<MediaGenres> getGenres()
public void setGenres(List<MediaGenres> genres)
genres
- a list of all genres to be setpublic List<MediaCastMember> getCastMembers(MediaCastMember.CastType type)
type
- the typepublic List<MediaArtwork> getMediaArt(MediaArtwork.MediaArtworkType type)
type
- the typepublic void addGenre(MediaGenres genre)
genre
- the genrepublic void addCastMember(MediaCastMember cm)
cm
- the cast memberpublic List<MediaArtwork> getMediaArt()
public void setMediaArt(List<MediaArtwork> artwork)
artwork
- a list of all artwork to setpublic void addMediaArt(MediaArtwork ma)
ma
- the mapublic void clearMediaArt()
public void addMediaArt(List<MediaArtwork> art)
art
- the artpublic List<MediaCastMember> getCastMembers()
public void setCastMembers(List<MediaCastMember> castMembers)
castMembers
- a list of cast members to be setpublic List<MediaArtwork> getFanart()
public void addSubItem(MediaMetadata item)
item
- the subitem to be addedpublic List<MediaMetadata> getSubItems()
public void addCertification(Certification certification)
certification
- the certificationpublic List<Certification> getCertifications()
public void setCertifications(List<Certification> certifications)
certifications
- a list of all certifications to setpublic void addTrailer(MediaTrailer trailer)
trailer
- the trailerpublic List<MediaTrailer> getTrailers()
public void setTrailers(List<MediaTrailer> trailers)
trailers
- a list of all trailers to be setpublic void setId(String key, Object object)
key
- the ID-keyobject
- the idpublic List<String> getProductionCompanies()
public void setProductionCompanies(List<String> productionCompanies)
productionCompanies
- set the given list of production companiespublic void addProductionCompany(String productionCompany)
productionCompany
- add the given production company if it is not yet presentpublic void removeProductionCompany(String productionCompany)
productionCompany
- the production company to be removedpublic List<String> getSpokenLanguages()
public void setSpokenLanguages(List<String> spokenLanguages)
spokenLanguages
- the spoken languages to be setpublic void addSpokenLanguage(String language)
language
- the language to be setpublic void removeSpokenLanguage(String language)
language
- the language to be removedpublic List<String> getCountries()
public void setCountries(List<String> countries)
countries
- the countries to be setpublic void addCountry(String country)
country
- the country to be addedpublic void removeCountry(String country)
country
- the country to be removedpublic String getTitle()
public void setTitle(String title)
title
- the title to be setpublic String getOriginalTitle()
public void setOriginalTitle(String originalTitle)
originalTitle
- the origial title to be setpublic String getOriginalLanguage()
public void setOriginalLanguage(String originalLanguage)
originalLanguage
- the original title to be setpublic int getYear()
public void setYear(int year)
year
- the year to be setpublic void setYear(Integer year)
year
- the year to be setpublic Date getReleaseDate()
public void setReleaseDate(Date releaseDate)
releaseDate
- the release date to be setpublic void setReleaseDate(org.joda.time.DateTime releaseDate)
releaseDate
- the release date to be setpublic String getPlot()
public void setPlot(String plot)
plot
- the plot to be setpublic String getTagline()
public void setTagline(String tagline)
tagline
- the tagline to be setpublic String getCollectionName()
public void setCollectionName(String collectionName)
collectionName
- the collection name to be setpublic int getRuntime()
public void setRuntime(int runtime)
runtime
- the runtime in minutes to be setpublic void setRuntime(Integer runtime)
runtime
- the runtime in minutes to be setpublic List<MediaRating> getRatings()
public void setRatings(List<MediaRating> newRatings)
newRatings
- the ratings to be setpublic void addRating(MediaRating rating)
rating
- the rating to be setpublic int getTop250()
public void setTop250(int top250)
top250
- the place to be setpublic void setTop250(Integer top250)
top250
- the place to be setpublic int getEpisodeNumber()
public void setEpisodeNumber(int episodeNumber)
episodeNumber
- the episode number to be setpublic void setEpisodeNumber(Integer episodeNumber)
episodeNumber
- the episode number to be setpublic int getSeasonNumber()
public void setSeasonNumber(int seasonNumber)
seasonNumber
- the season number to be setpublic void setSeasonNumber(Integer seasonNumber)
seasonNumber
- the season number to be setpublic int getDvdEpisodeNumber()
public void setDvdEpisodeNumber(int dvdEpisodeNumber)
dvdEpisodeNumber
- the DVD episode number to be setpublic void setDvdEpisodeNumber(Integer dvdEpisodeNumber)
dvdEpisodeNumber
- the DVD episode number to be setpublic int getDvdSeasonNumber()
public void setDvdSeasonNumber(int dvdSeasonNumber)
dvdSeasonNumber
- the DVD season number to be setpublic void setDvdSeasonNumber(Integer dvdSeasonNumber)
dvdSeasonNumber
- the DVD season number to be setpublic int getDisplayEpisodeNumber()
public void setDisplayEpisodeNumber(int displayEpisodeNumber)
displayEpisodeNumber
- the display-episode number to be setpublic void setDisplayEpisodeNumber(Integer displayEpisodeNumber)
displayEpisodeNumber
- the display-episode number to be setpublic int getDisplaySeasonNumber()
public void setDisplaySeasonNumber(int displaySeasonNumber)
displaySeasonNumber
- the display-season number to be setpublic void setDisplaySeasonNumber(Integer displaySeasonNumber)
displaySeasonNumber
- the display-season number to be setpublic int getAbsoluteNumber()
public void setAbsoluteNumber(int absoluteNumber)
absoluteNumber
- the absolute number to be setpublic void setAbsoluteNumber(Integer absoluteNumber)
absoluteNumber
- the absolute number to be setpublic MediaAiredStatus getStatus()
public void setStatus(MediaAiredStatus status)
status
- the airing status to be setpublic void setStatus(String statusAsText)
statusAsText
- the airing status to be parsed and setpublic Map<String,Object> getExtraData()
public void addExtraData(String key, Object value)
key
- the keyvalue
- the valuepublic Object getExtraData(String key)
key
- the keypublic void addTag(String tag)
tag
- the tagpublic void removeTag(String tag)
tag
- the tag to be removedCopyright © 2012–2019 tinyMediaManager. All rights reserved.