Class MetaTag

All Implemented Interfaces:
Serializable, Cloneable, Node, Tag

public class MetaTag extends TagNode
A Meta Tag
See Also:
  • Constructor Details

    • MetaTag

      public MetaTag()
      Create a new meta tag.
  • Method Details

    • getIds

      public String[] getIds()
      Return the set of names handled by this tag.
      Specified by:
      getIds in interface Tag
      Overrides:
      getIds in class TagNode
      Returns:
      The names to be matched that create tags of this type.
    • getHttpEquiv

      public String getHttpEquiv()
      Get the HTTP-EQUIV attribute, if any.
      Returns:
      The value of the HTTP-EQUIV attribute, or null if the attribute doesn't exist.
    • getMetaContent

      public String getMetaContent()
      Get the CONTENT attribute, if any.
      Returns:
      The value of the CONTENT attribute, or null if the attribute doesn't exist.
    • getMetaTagName

      public String getMetaTagName()
      Get the NAME attribute, if any.
      Returns:
      The value of the NAME attribute, or null if the attribute doesn't exist.
    • setHttpEquiv

      public void setHttpEquiv(String httpEquiv)
      Set the HTTP-EQUIV attribute.
      Parameters:
      httpEquiv - The new value of the HTTP-EQUIV attribute.
    • setMetaTagContents

      public void setMetaTagContents(String metaTagContents)
      Set the CONTENT attribute.
      Parameters:
      metaTagContents - The new value of the CONTENT attribute.
    • setMetaTagName

      public void setMetaTagName(String metaTagName)
      Set the NAME attribute.
      Parameters:
      metaTagName - The new value of the NAME attribute.
    • doSemanticAction

      public void doSemanticAction() throws ParserException
      Perform the META tag semantic action. Check for a charset directive, and if found, set the charset for the page.
      Specified by:
      doSemanticAction in interface Node
      Overrides:
      doSemanticAction in class AbstractNode
      Throws:
      ParserException - If setting the encoding fails.