Class TagModel
- Object
-
- com.wowza.wms.manifest.model.ManifestModelLogging
-
- com.wowza.wms.manifest.model.m3u8.tag.TagModel
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
TagModelAllowCache
,TagModelByteRange
,TagModelDiscontinuity
,TagModelDiscontinuitySequence
,TagModelEndlist
,TagModelIFramesOnly
,TagModelIndependentSegments
,TagModelINF
,TagModelKey
,TagModelM3U
,TagModelMap
,TagModelMedia
,TagModelMediaSequence
,TagModelPartialSegment
,TagModelPartialSegmentINF
,TagModelPlaylistType
,TagModelPreFetch
,TagModelPreloadHint
,TagModelProgramDateTime
,TagModelRenditionReport
,TagModelServerControl
,TagModelSessionData
,TagModelSessionKey
,TagModelSkip
,TagModelStart
,TagModelStreamInfCommon
,TagModelTargetDuration
,TagModelUnknown
,TagModelURI
,TagModelVersion
public abstract class TagModel extends ManifestModelLogging implements Cloneable
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<Attribute>
attributes
protected String
tagName
-
Constructor Summary
Constructors Modifier Constructor Description protected
TagModel(String tagName)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
addAllAttributes(java.util.Collection<? extends Attribute> c)
boolean
addAttribute(Attribute attribute)
Object
clone()
static boolean
equals(TagModel o1, TagModel o2)
boolean
equals(Object obj)
static <T extends TagModel>
T[]findTags(Class<T> cls, java.util.Collection<TagModel> tags)
void
formatAttributes(StringBuilder sb)
String
formatBoolean(Boolean value)
Format a Boolean tag value.String
formatBooleanAttribute(String name, Boolean value)
Format a Boolean tag attribute.String
formatDoubleAttribute(String name, Double value)
Format an Double tag attribute.String
formatEnumAttribute(String name, Enum value)
Format an Enumerated tag attribute.String
formatFloat(Float value)
Format a Float tag value.String
formatFloatAttribute(String name, Float value)
Format an Float tag attribute.String
formatInteger(Integer value)
Format a Integer tag value.String
formatIntegerAttribute(String name, Integer value)
Format a "decimal-integer" tag attribute from an Integer value.String
formatLong(Long value)
Format a Long tag value.String
formatLongAttribute(String name, Long value)
Format a "decimal-integer" tag attribute from a Long value.String
formatQuotedStringAttribute(String name, String value)
Format a quoted-string tag attribute.String
formatString(String value)
Format a String tag value.String
formatUnquotedStringAttribute(String name, String value)
Format an unquoted-string tag attribute.String
formatValue(Object value)
Format a Float, Integer, or String tag value.String
getContextStr()
Get the context string associated with the Model to include with the log statementsString
getTag()
String
getTagName()
java.util.List<Attribute>
getUnknownAttributes()
int
hashCode()
abstract boolean
isMediaSegmentTag()
abstract boolean
isValid(Integer version)
void
setContextStr(String contextStr)
abstract String
toString()
abstract boolean
validForMasterPlaylist()
abstract boolean
validForMediaPlaylist()
abstract void
write(TagWriter writer)
-
Methods inherited from class com.wowza.wms.manifest.model.ManifestModelLogging
getDebugLog, logDebug, logError, logError, logError, logInfo, logWarn, setDebugLog, setUseSystemOut, usingSystemOut
-
-
-
-
Field Detail
-
attributes
protected java.util.List<Attribute> attributes
-
tagName
protected 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 classObject
-
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 namevalue
- 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 namevalue
- 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 namevalue
- 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 namevalue
- 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 namevalue
- 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 namevalue
- 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 namevalue
- 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 namevalue
- 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
-
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 classManifestModelLogging
- Returns:
- String
-
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 classObject
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classObject
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
clone
in classManifestModelLogging
- Throws:
CloneNotSupportedException
-
findTags
public static <T extends TagModel> T[] findTags(Class<T> cls, java.util.Collection<TagModel> tags)
-
-