com.ibm.as400.util.html
Class HTMLMeta

java.lang.Object
  extended by com.ibm.as400.util.html.HTMLTagAttributes
      extended by com.ibm.as400.util.html.HTMLMeta
All Implemented Interfaces:
HTMLTagElement, Serializable

public class HTMLMeta
extends HTMLTagAttributes
implements Serializable

The HTMLMeta class represents meta-information used within an HTMLHead tag. This meta information can be used in identifying, indexing, and defining information within the HTML document.

This example creates an HTMLMeta tag:

  // Create an HTMLMeta.
  HTMLMeta meta = new HTMLMeta("Expires", "Mon, 01 Jun 2000 12:00:00 CST");
  System.out.println(header);
  

Here is the output of the HTMLMeta tag:

  <meta http-equiv="Expires" content="Mon, 01 Jun 2000 12:00:00 CST" />
  

HTMLMeta objects generate the following events:

See Also:
Serialized Form

Constructor Summary
Constructor and Description
HTMLMeta()
          Constructs a default HTMLMeta object.
HTMLMeta(String HttpEquiv, String content)
          Constructs an HTMLMeta object with the specified meta HTTP-EQUIV and content.
HTMLMeta(String HttpEquiv, String content, String url)
          Constructs an HTMLMeta object with the specified meta HTTP-EQUIV, content, and URL.
 
Method Summary
Modifier and Type Method and Description
 String getContent()
          Returns the content of the HTMLMeta tag.
 String getDirection()
          Returns the direction of the text interpretation.
 String getFOTag()
          Returns a comment tag.
 String getHttpEquiv()
          Returns the HTTP-EQUIV of the meta tag.
 String getLanguage()
          Returns the language of the meta tag.
 String getName()
          Returns the name of the meta tag.
 String getTag()
          Returns the tag for the HTML heading.
 String getUrl()
          Returns the URL of the meta tag.
 void setContent(String content)
          Sets the content of the meta information.
 void setDirection(String dir)
          Sets the direction of the text interpretation.
 void setHttpEquiv(String HttpEquiv)
          Sets the HTTP-EQUIV of the meta tag.
 void setLanguage(String lang)
          Sets the language of the meta tag.
 void setName(String name)
          Sets the name of the meta tag.
 void setUrl(String url)
          Sets the URL to reload after the time specified in the content attribute.
 String toString()
          Returns a String representation for the HTMLMeta tag.
 
Methods inherited from class com.ibm.as400.util.html.HTMLTagAttributes
addPropertyChangeListener, getAttributes, getAttributeString, removePropertyChangeListener, setAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTMLMeta

public HTMLMeta()
Constructs a default HTMLMeta object.


HTMLMeta

public HTMLMeta(String HttpEquiv,
                String content)
Constructs an HTMLMeta object with the specified meta HTTP-EQUIV and content.

Parameters:
HttpEquiv - The HTTP-EQUIV meta information.
content - The value of a named property.

HTMLMeta

public HTMLMeta(String HttpEquiv,
                String content,
                String url)
Constructs an HTMLMeta object with the specified meta HTTP-EQUIV, content, and URL.

Parameters:
HttpEquiv - The HTTP-EQUIV meta information.
content - The value of a named property.
url - The URL to reload after the time specified in the content attribute.
Method Detail

getContent

public String getContent()
Returns the content of the HTMLMeta tag.

Returns:
The value of a named property.

getDirection

public String getDirection()
Returns the direction of the text interpretation.

Returns:
The direction of the text.

getHttpEquiv

public String getHttpEquiv()
Returns the HTTP-EQUIV of the meta tag.

Returns:
The HTTP-EQUIV meta information.

getLanguage

public String getLanguage()
Returns the language of the meta tag.

Returns:
The language of the meta tag.

getName

public String getName()
Returns the name of the meta tag.

Returns:
The name of a property.

getUrl

public String getUrl()
Returns the URL of the meta tag.

Returns:
The URL to reload.

getTag

public String getTag()
Returns the tag for the HTML heading.

Specified by:
getTag in interface HTMLTagElement
Returns:
The tag.

getFOTag

public String getFOTag()
Returns a comment tag. This method should not be called. There is no XSL-FO support for this class.

Specified by:
getFOTag in interface HTMLTagElement
Returns:
The comment tag.

setContent

public void setContent(String content)
Sets the content of the meta information.

Parameters:
content - The value for a named property.

setDirection

public void setDirection(String dir)
Sets the direction of the text interpretation.

Parameters:
dir - The direction. One of the following constants defined in HTMLConstants: LTR or RTL.
See Also:
HTMLConstants

setHttpEquiv

public void setHttpEquiv(String HttpEquiv)
Sets the HTTP-EQUIV of the meta tag.

Parameters:
HttpEquiv - The HTTP-EQUIV meta information.

setLanguage

public void setLanguage(String lang)
Sets the language of the meta tag.

Parameters:
lang - The language. Example language tags include: en and en-US.

setName

public void setName(String name)
Sets the name of the meta tag. If the name is not set, it is assumed to be the same as the value of the HTTP-EQUIV.

Parameters:
name - The name of a property.

setUrl

public void setUrl(String url)
Sets the URL to reload after the time specified in the content attribute.

Parameters:
url - The URL to reload.

toString

public String toString()
Returns a String representation for the HTMLMeta tag.

Overrides:
toString in class Object
Returns:
The tag.