|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.html.HtmlElement | +--weblogic.html.ElementWithAttributes | +--weblogic.html.SinglePartElement | +--weblogic.html.MetaElement
A MetaElement is used to add META information to the head portion of an HtmlPage. A META element is a name/value pair, HTTP-EQUIV/CONTENT, or NAME/CONTENT. Meta elements allow for better indexing by robot-driven search engines. They also also some control over when a browser expires content from its cache and how often the client initiates a client-side pull. This class also supports Netscape dynamic documents, which tie refresh rate to another URL.
Use the final static Strings provided with this class as arguments for the constructors. Explicit constants are not provided for the Dublin Core types (more information at OCLC or W3C) or VW96 Schema (more information at Vancouver).
MetaElements are repeatable. Add them to an HtmlPage after the HtmlPage.getHead() method with HtmlElement.addElement().
Field Summary | |
static java.lang.String |
contentType
Deprecated. Constant for "metatype" argument in this class. |
static java.lang.String |
equivType
Deprecated. Constant for "metatype" argument in this class. |
static java.lang.String |
httpEquivContentName
Deprecated. Constant for the "metaname" argument in this class. |
static java.lang.String |
httpEquivContentStyleType
Deprecated. Constant for the "metaname" argument in this class. |
static java.lang.String |
httpEquivContentType
Deprecated. Constant for the "metaname" argument in this class. |
static java.lang.String |
httpEquivExpires
Deprecated. Constant for "metaname" argument in this class. |
static java.lang.String |
httpEquivPicsLabel
Deprecated. Constant for the "metaname" argument in this class. |
static java.lang.String |
httpEquivRefresh
Deprecated. Constant for "metaname" argument in this class. |
static java.lang.String |
httpEquivReplyTo
Deprecated. Constant for "metaname" argument in this class. |
static java.lang.String |
indexAll
Deprecated. Constant for the "content" argument in this class with the "nameRobots" metaname. |
static java.lang.String |
indexNoFollow
Deprecated. Constant for the "content" argument in this class with the "nameRobots" metaname. |
static java.lang.String |
nameAuthor
Deprecated. Constant for the "metaname" argument in this class. |
static java.lang.String |
nameDescription
Deprecated. Constant for the "metaname" argument in this class. |
static java.lang.String |
nameGenerator
Deprecated. Constant for "metaname" argument in this class. |
static java.lang.String |
nameKeywords
Deprecated. Constant for the "metaname" argument in this class. |
static java.lang.String |
nameRating
Deprecated. Constant for "metaname" argument in this class. |
static java.lang.String |
nameRevisitAfter
Deprecated. Constant for "metaname" argument in this class. |
static java.lang.String |
nameRobots
Deprecated. Constant for the "metaname" argument in this class. |
static java.lang.String |
nameType
Deprecated. Constant for "metatype" argument in this class. |
static java.lang.String |
noIndexButFollow
Deprecated. Constant for the "content" argument in this class with the "nameRobots" metaname. |
static java.lang.String |
robotsNone
Deprecated. Constant for the "content" argument in this class with the "nameRobots" metaname. |
static java.lang.String |
schemeType
Deprecated. Constant for "metatype" argument in this class. |
Fields inherited from class weblogic.html.HtmlElement |
codeset,
useObsolete |
Constructor Summary | |
MetaElement()
Deprecated. Constructs an empty MetaElement. |
|
MetaElement(int refreshrate,
java.lang.String url)
Deprecated. Sets HTTP-EQUIV="Refresh" to the specified interval and sets a URL to be reloaded after the interval. |
|
MetaElement(java.lang.String metatype,
java.lang.String metaname,
java.util.Date date)
Deprecated. Constructs a MetaElement with the specified type and name, with the content attribute set to the specified Date object. |
|
MetaElement(java.lang.String metatype,
java.lang.String metaname,
java.lang.String content)
Deprecated. Constructs a MetaElement with the specified type and content. |
Method Summary | |
protected java.lang.String |
getHtmlCode()
Deprecated. |
protected boolean |
printBody()
Deprecated. |
protected boolean |
printCR()
Deprecated. |
protected boolean |
printEndingTag()
Deprecated. |
MetaElement |
setAuthor(java.lang.String author)
Deprecated. Sets a META tag to report authorship of the document. |
MetaElement |
setContent(java.util.Date date)
Deprecated. Internal use only. |
MetaElement |
setContent(java.lang.String val)
Deprecated. Internal use only. |
MetaElement |
setDescription(java.lang.String desc)
Deprecated. Sets a META tag to report a description of the document. |
MetaElement |
setExpDate(java.util.Date date)
Deprecated. Sets the expiration date for a document. |
MetaElement |
setKeywords(java.lang.String keywords)
Deprecated. Sets a META tag to report keywords for the document. |
MetaElement |
setMetaname(java.lang.String metatype,
java.lang.String val)
Deprecated. Internal use only. |
MetaElement |
setRobots(java.lang.String robots)
Deprecated. Sets a META tag to report how robots should treat this document. |
Methods inherited from class weblogic.html.SinglePartElement |
getElement,
printBody,
printBody,
printBody,
setElement,
setElement,
widthAsLiteral |
Methods inherited from class weblogic.html.ElementWithAttributes |
addAttribute,
addAttribute,
escapeQuotes,
getBooleanAttribute,
getElementAttribute,
getLocalVar,
getQuotedAttribute,
output,
output,
output,
setBooleanAttribute,
setBooleanAttribute,
setClass,
setDirection,
setElementAttribute,
setElementAttribute,
setElementAttribute,
setElementAttribute,
setElementAttribute,
setId,
setLang,
setLocalVar,
setQuotedAttribute,
setStyle |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String nameType
public static final java.lang.String equivType
public static final java.lang.String contentType
public static final java.lang.String schemeType
public static final java.lang.String httpEquivContentType
public static final java.lang.String httpEquivContentName
public static final java.lang.String httpEquivContentStyleType
public static final java.lang.String httpEquivExpires
public static final java.lang.String httpEquivPicsLabel
public static final java.lang.String httpEquivRefresh
public static final java.lang.String httpEquivReplyTo
public static final java.lang.String nameAuthor
public static final java.lang.String nameDescription
public static final java.lang.String nameGenerator
public static final java.lang.String nameKeywords
public static final java.lang.String nameRating
public static final java.lang.String nameRevisitAfter
public static final java.lang.String nameRobots
public static final java.lang.String indexAll
public static final java.lang.String indexNoFollow
public static final java.lang.String noIndexButFollow
public static final java.lang.String robotsNone
Constructor Detail |
public MetaElement()
page.getBody() .addElement(new MetaElement().setAuthor("John Smith")) .addElement(new MetaElement().setDescription("Genealogical tables")) .addElement(new MetaElement().setKeywords("genealogy, Smith family")) .addElement(new MetaElement().setExpDate(new java.util.Date()));
public MetaElement(java.lang.String metatype, java.lang.String metaname, java.lang.String content)
The format for the "content" argument of the metatype
"httpEquivExpires" should follow IETF standard date
syntax, for example:
"Tue, 20 Aug 1996 14:25:27 GMT"
Valid "content" arguments for the metatype "nameRobots" are provided in this class as final static Strings. You can pass other contents as a String, for example "NOINDEX, NOFOLLOW".
metatype
- Name or HTTP-Equiv identifiermetaname
- Value for the identifiercontent
- String contentpublic MetaElement(java.lang.String metatype, java.lang.String metaname, java.util.Date date)
metatype
- Name or HTTP-Equiv identifiermetaname
- Value for the identifierdate
- Date object value CONTENTpublic MetaElement(int refreshrate, java.lang.String url)
refreshrate
- Number of seconds to reloadurl
- Document to be reloadedMethod Detail |
protected java.lang.String getHtmlCode()
protected boolean printEndingTag()
protected boolean printBody()
protected boolean printCR()
public MetaElement setAuthor(java.lang.String author)
author
- Author of the documentpublic MetaElement setDescription(java.lang.String desc)
description
- String description of the documentpublic MetaElement setKeywords(java.lang.String keywords)
keywords
- Comma-delimited list of keywordspublic MetaElement setRobots(java.lang.String robots)
robots
- Robots actionpublic MetaElement setExpDate(java.util.Date date)
date
- Java datepublic MetaElement setMetaname(java.lang.String metatype, java.lang.String val)
public MetaElement setContent(java.lang.String val)
public MetaElement setContent(java.util.Date date)
|
Documentation is available at http://e-docs.bea.com/wls/docs61 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |