Enum Class MediaType

java.lang.Object
java.lang.Enum<MediaType>
nl.vpro.domain.media.MediaType
All Implemented Interfaces:
Serializable, Comparable<MediaType>, java.lang.constant.Constable, 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 Details

    • MEDIA

      public static final MediaType MEDIA
      The abstract type denoting every possible media type
    • PROGRAM

      public static final MediaType PROGRAM
      The abstract type denoting every type of a Program
    • 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
    • GROUP

      public static final MediaType GROUP
      The abstract type denoting every type of a Group
    • 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 a Segment
    • RECORDING

      public static final MediaType RECORDING
      Since:
      2.1
    • PROMO

      public static final MediaType PROMO
  • Method Details

    • values

      public static MediaType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MediaType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<MediaType>
    • setType

      protected void setType(MediaObject o) throws InvocationTargetException, IllegalAccessException
      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()
    • of

      public static MediaType of(String type)
    • 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 certain getSubType().
      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