|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sunlabs.brazil.template.Template | +--sunlabs.brazil.template.ContentTemplate
Template class for extracting content out of remote html pages.
This class is used by the TemplateHandler, for extracting
the "content" out of html documents for later integration with
a look-and-feel template using one or more of:
SetTemplate
,
BSLTemplate
,
or
ReplaceFilter
,
The plan is to snag the title and the content, and put them into
request properties. The resultant processed output will be
discarded. The following properties are gathered:
Field Summary |
Fields inherited from class sunlabs.brazil.template.Template |
debug |
Constructor Summary | |
ContentTemplate()
|
Method Summary | |
boolean |
done(RewriteContext hr)
Extract useful properties out of the http mime headers. |
boolean |
init(RewriteContext hr)
Called before this template processes any tags. |
void |
tag_body(RewriteContext hr)
Grab the "body" attributes, and toss all output to this point. |
void |
tag_content(RewriteContext hr)
toss everything up to and including here, but turn on content accumulation. |
void |
tag_link(RewriteContext hr)
Extract data out of link tags into the properties. |
void |
tag_meta(RewriteContext hr)
Extract data out of meta tags into the properties. |
void |
tag_script(RewriteContext hr)
Append all "script" code while in the head section. |
void |
tag_slash_body(RewriteContext hr)
If no content tags are present, use the entire "body" instead. |
void |
tag_slash_content(RewriteContext hr)
Save the content gathered so far, and turn off content accumulation. |
void |
tag_slash_head(RewriteContext hr)
Mark end of head section. |
void |
tag_slash_title(RewriteContext hr)
Gather up the title - no tags allowed between title .... |
void |
tag_style(RewriteContext hr)
Append all "style" code while in the head section. |
void |
tag_title(RewriteContext hr)
Toss everything up to and including this entity. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ContentTemplate()
Method Detail |
public boolean init(RewriteContext hr)
Template
init
in interface TemplateInterface
init
in class Template
public void tag_title(RewriteContext hr)
public void tag_slash_title(RewriteContext hr)
public void tag_script(RewriteContext hr)
public void tag_style(RewriteContext hr)
public void tag_slash_head(RewriteContext hr)
public void tag_content(RewriteContext hr)
public void tag_body(RewriteContext hr)
public void tag_slash_content(RewriteContext hr)
public void tag_slash_body(RewriteContext hr)
public void tag_meta(RewriteContext hr)
public void tag_link(RewriteContext hr)
public boolean done(RewriteContext hr)
done
in interface TemplateInterface
done
in class Template
|
Version 2.1, Generated 12/30/04 Copyright (c) 2001-2004, Sun Microsystems. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |