Class PlaylistModel

  • All Implemented Interfaces:
    Cloneable

    public class PlaylistModel
    extends ManifestModel
    Provides implementations that are common to all Playlist models
    • Constructor Detail

      • PlaylistModel

        public PlaylistModel()
    • Method Detail

      • 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 java.net.URI getUri()
        Get the uri of the playlist
        Returns:
        URI the playlist uri
      • setUri

        public void setUri​(java.net.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
      • 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​(java.util.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
      • clone

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

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