Class PlaylistModel

All Implemented Interfaces:
Cloneable

public class PlaylistModel extends ManifestModel
Provides implementations that are common to all Playlist models
  • Field Details

  • Constructor Details

    • PlaylistModel

      public PlaylistModel()
  • Method Details

    • setMasterPlaylist

      public void setMasterPlaylist()
      Mark the playlist this instance represents as a master playlist.
    • setMediaPlaylist

      public void setMediaPlaylist()
      Mark the playlist this instance represents as a media playlist.
    • isMasterPlaylist

      public boolean isMasterPlaylist()
      Is the playlist represented by this class a Master playlist?
      Returns:
      true if the playlist represented by this model is a master playlist
    • isMediaPlaylist

      public boolean isMediaPlaylist()
      Is the playlist represent by this class a Media Playlist
      Returns:
      true if the playlist is a media playlist
    • getUri

      public URI getUri()
      Get the uri of the playlist
      Returns:
      URI the playlist uri
    • setUri

      public void setUri(URI uri)
      Set the uri of the playlist
      Parameters:
      uri - of the playlist
    • getVersion

      public int getVersion()
      Get the playlist version
      Returns:
      integer version number
    • isExtended

      public boolean isExtended()
      Is this an extended M3U8 playlist
      Returns:
      true if the playlist represented by this model is extended
    • getContextStr

      public String getContextStr()
      Description copied from class: ManifestModelLogging
      Get the context string associated with the Model to include with the log statements
      Specified by:
      getContextStr in class ManifestModelLogging
      Returns:
      String
    • setContextStr

      public void setContextStr(String context)
      Specific to Playlist reader to set the context in which the playlist is reading. Intent would be this would be the Source stream name to associate the log entries with
      Parameters:
      context - context of the reader
    • addTag

      public boolean addTag(TagModel tag)
      Add a tag to the playlist model and propagate context and debug settings
      Parameters:
      tag - to be added to the playlist model
      Returns:
      true if the tag was added
    • addAllTags

      public boolean addAllTags(Collection<? extends TagModel> tags)
      Add a list of tags to the playlistmodel and propagate context and debug settings
      Parameters:
      tags - - list of tags to be added to the playlist model
      Returns:
      true if all the tags were added to the playlist model
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class ManifestModel
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ManifestModel
    • toString

      public String toString()
      Overrides:
      toString in class ManifestModel
    • clone

      public Object clone() throws CloneNotSupportedException
      Overrides:
      clone in class ManifestModelLogging
      Throws:
      CloneNotSupportedException
    • getProperties

      public WMSProperties getProperties()
    • write

      public void write(TagWriter tagWriter) throws IOException
      Specified by:
      write in class ManifestModel
      Throws:
      IOException