Package nl.vpro.domain.media
Enum MediaType
- java.lang.Object
-
- java.lang.Enum<MediaType>
-
- nl.vpro.domain.media.MediaType
-
- All Implemented Interfaces:
Serializable
,Comparable<MediaType>
,Displayable
public enum MediaType extends Enum<MediaType> implements Displayable
This class provides a combined view on all program and group types and their configuration options. Both program and groups have a type property, but there is now way to add this property to their abstract super class while providing two implementations of a generic super type.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALBUM
ARCHIVE
Deprecated.BROADCAST
CLIP
COLLECTION
GROUP
The abstract type denoting every type of aGroup
MEDIA
The abstract type denoting every possible media typeMOVIE
PLAYLIST
PROGRAM
The abstract type denoting every type of aProgram
PROMO
RECORDING
SEASON
SEGMENT
SEGMENTTYPE
The abstract type denoting every type of aSegment
SERIES
STRAND
TRACK
TRAILER
UMBRELLA
VISUALRADIO
VISUALRADIOSEGMENT
-
Field Summary
-
Fields inherited from interface nl.vpro.i18n.Displayable
NULL
-
-
Method Summary
-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
-
Methods inherited from interface nl.vpro.i18n.Displayable
display, getDisplayName, getDisplayName, getIcon, getIconClass, getPluralDisplayName, getPluralDisplayName
-
-
-
-
Enum Constant Detail
-
MEDIA
public static final MediaType MEDIA
The abstract type denoting every possible media type
-
BROADCAST
public static final MediaType BROADCAST
-
CLIP
public static final MediaType CLIP
-
STRAND
public static final MediaType STRAND
-
TRAILER
public static final MediaType TRAILER
-
MOVIE
public static final MediaType MOVIE
-
SERIES
public static final MediaType SERIES
-
SEASON
public static final MediaType SEASON
-
UMBRELLA
public static final MediaType UMBRELLA
-
ARCHIVE
@Deprecated public static final MediaType ARCHIVE
Deprecated.
-
COLLECTION
public static final MediaType COLLECTION
-
PLAYLIST
public static final MediaType PLAYLIST
-
ALBUM
public static final MediaType ALBUM
-
SEGMENT
public static final MediaType SEGMENT
-
TRACK
public static final MediaType TRACK
-
VISUALRADIO
public static final MediaType VISUALRADIO
-
VISUALRADIOSEGMENT
public static final MediaType VISUALRADIOSEGMENT
-
SEGMENTTYPE
public static final MediaType SEGMENTTYPE
The abstract type denoting every type of aSegment
-
RECORDING
public static final MediaType RECORDING
- Since:
- 2.1
-
PROMO
public static final MediaType PROMO
-
-
Method Detail
-
values
public static MediaType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MediaType c : MediaType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MediaType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
setType
protected void setType(MediaObject o) throws InvocationTargetException, IllegalAccessException
-
getMediaInstance
public final MediaObject getMediaInstance()
-
getMediaClass
public final String getMediaClass()
-
getMediaObjectClass
public final Class<? extends MediaObject> getMediaObjectClass()
-
hasSegments
public boolean hasSegments()
-
canHaveScheduleEvents
public boolean canHaveScheduleEvents()
- Since:
- 5.11
-
hasEpisodeOf
public final boolean hasEpisodeOf()
-
preferredEpisodeOfTypes
public MediaType[] preferredEpisodeOfTypes()
-
allowedEpisodeOfTypes
public MediaType[] allowedEpisodeOfTypes()
-
canContainEpisodes
public final boolean canContainEpisodes()
-
preferredEpisodeTypes
public MediaType[] preferredEpisodeTypes()
-
allowedEpisodeTypes
public MediaType[] allowedEpisodeTypes()
-
hasMemberOf
public boolean hasMemberOf()
-
preferredMemberOfTypes
public MediaType[] preferredMemberOfTypes()
-
allowedMemberOfTypes
public MediaType[] allowedMemberOfTypes()
-
hasMembers
public boolean hasMembers()
-
preferredMemberTypes
public MediaType[] preferredMemberTypes()
-
allowedMemberTypes
public MediaType[] allowedMemberTypes()
-
hasOrdering
public boolean hasOrdering()
-
getSubType
public abstract SubMediaType getSubType()
-
getSubTypes
public List<SubMediaType> getSubTypes()
-
getMediaType
public static @NonNull MediaType getMediaType(MediaObject media)
-
createInstance
@Deprecated public MediaObject createInstance()
Deprecated.
-
leafValues
public static MediaType[] leafValues()
Returns all 'leaf' mediaTypes. That are all non abstract instances, that actually have a certaingetSubType()
.- Since:
- 5.8
-
leafValues
public static MediaType[] leafValues(Class<? extends MediaObject> clazz)
- Since:
- 5.8
-
getClasses
public static Class<?>[] getClasses(Collection<MediaType> types)
- Since:
- 2.1
-
valuesOf
public static Collection<MediaType> valuesOf(String types)
- Since:
- 2.1
-
-