Class TagModel

    • Field Detail

      • attributes

        protected java.util.List<Attribute> attributes
      • tagName

        protected String tagName
    • Constructor Detail

      • TagModel

        protected TagModel​(String tagName)
    • Method Detail

      • getTag

        public String getTag()
      • getTagName

        public String getTagName()
      • validForMasterPlaylist

        public abstract boolean validForMasterPlaylist()
      • validForMediaPlaylist

        public abstract boolean validForMediaPlaylist()
      • toString

        public abstract String toString()
        Overrides:
        toString in class Object
      • write

        public abstract void write​(TagWriter writer)
                            throws java.io.IOException
        Parameters:
        writer -
        Throws:
        java.io.IOException
      • isMediaSegmentTag

        public abstract boolean isMediaSegmentTag()
      • isValid

        public abstract boolean isValid​(Integer version)
      • addAttribute

        public boolean addAttribute​(Attribute attribute)
      • addAllAttributes

        public boolean addAllAttributes​(java.util.Collection<? extends Attribute> c)
      • getUnknownAttributes

        public java.util.List<Attribute> getUnknownAttributes()
      • formatUnquotedStringAttribute

        public String formatUnquotedStringAttribute​(String name,
                                                    String value)
        Format an unquoted-string tag attribute. Bad values and bad attribute names are reported in the output string.
        Parameters:
        name - is the attribute name
        value - is the String attribute's value
        Returns:
        the formatted attribute as '='
      • formatQuotedStringAttribute

        public String formatQuotedStringAttribute​(String name,
                                                  String value)
        Format a quoted-string tag attribute. Bad values and bad attribute names are reported in the output string.
        Parameters:
        name - is the attribute name
        value - is the String attribute's value
        Returns:
        the formatted attribute as '=""'
      • formatBooleanAttribute

        public String formatBooleanAttribute​(String name,
                                             Boolean value)
        Format a Boolean tag attribute. Bad values and bad attribute names are reported in the output string.
        Parameters:
        name - is the attribute name
        value - is the Boolean attribute's value
        Returns:
        the formatted Boolean attribute
      • formatIntegerAttribute

        public String formatIntegerAttribute​(String name,
                                             Integer value)
        Format a "decimal-integer" tag attribute from an Integer value. Bad values and bad attribute names are reported in the output string.
        Parameters:
        name - is the attribute name
        value - is the decimal-integer attribute's value as an Integer
        Returns:
        the formatted Integer attribute
      • formatLongAttribute

        public String formatLongAttribute​(String name,
                                          Long value)
        Format a "decimal-integer" tag attribute from a Long value. Bad values and bad attribute names are reported in the output string.
        Parameters:
        name - is the attribute name
        value - is the decimal-integer attribute's value as a Long
        Returns:
        the formatted decimal-integer attribute
      • formatFloatAttribute

        public String formatFloatAttribute​(String name,
                                           Float value)
        Format an Float tag attribute. Bad values and bad attribute names are reported in the output string.
        Parameters:
        name - is the attribute name
        value - is the Float attribute's value
        Returns:
        the formatted Float attribute
      • formatDoubleAttribute

        public String formatDoubleAttribute​(String name,
                                            Double value)
        Format an Double tag attribute. Bad values and bad attribute names are reported in the output string.
        Parameters:
        name - is the attribute name
        value - is the Double attribute's value
        Returns:
        the formatted Double attribute
      • formatEnumAttribute

        public String formatEnumAttribute​(String name,
                                          Enum value)
        Format an Enumerated tag attribute. Bad values and bad attribute names are reported in the output string.
        Parameters:
        name - is the attribute name
        value - is the Enumerated attribute's value
        Returns:
        the formatted Enumerated attribute
      • formatBoolean

        public String formatBoolean​(Boolean value)
        Format a Boolean tag value. Bad values are reported in the output string.
        Parameters:
        value - is the Boolean value
        Returns:
        the formatted Boolean
      • formatInteger

        public String formatInteger​(Integer value)
        Format a Integer tag value. Bad values are reported in the output string.
        Parameters:
        value - is the Integer value
        Returns:
        the formatted Integer
      • formatLong

        public String formatLong​(Long value)
        Format a Long tag value. Bad values are reported in the output string.
        Parameters:
        value - is the Long value
        Returns:
        the formatted Long
      • formatFloat

        public String formatFloat​(Float value)
        Format a Float tag value. Bad values are reported in the output string.
        Parameters:
        value - is the Float value
        Returns:
        the formatted Float
      • formatString

        public String formatString​(String value)
        Format a String tag value. Bad values are reported in the output string.
        Parameters:
        value - is the String value
        Returns:
        the formatted String
      • formatValue

        public String formatValue​(Object value)
        Format a Float, Integer, or String tag value. Bad values are reported in the output string.
        Parameters:
        value - is the Float, Integer, or String value
        Returns:
        the formatted value
      • setContextStr

        public void setContextStr​(String contextStr)
        Parameters:
        contextStr - the contextStr to set
      • formatAttributes

        public void formatAttributes​(StringBuilder sb)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • clone

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

        public static <T extends TagModel> T[] findTags​(Class<T> cls,
                                                        java.util.Collection<TagModel> tags)