|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.ecs.Element
This class implements the ElementFactory.
Field Summary | |
private Filter |
attribute_filter
Filter to use to escape attribute input |
private int |
case_type
Default value to set case type |
private java.lang.String |
codeset
What codeset are we going to use the default is 8859_1 |
private java.util.Hashtable |
element
Where to get the element definition from |
private boolean |
end_element
Does this element need a closing tag? |
private java.lang.String |
end_modifier
What the end modifier should be |
private boolean |
end_modifier_defined
What the modifier should be...optimization variable |
private Filter |
filter
Filter to use to escape input |
private boolean |
filter_attribute_state
Should we filter the value of the element attributes |
private boolean |
filter_state
Should we filter the value of <>VALUE</> |
protected static java.lang.String |
NO_ATTRIBUTE_VALUE
Does this element attribute value need a =""? |
private java.lang.String |
start_modifier
What the start modifier should be |
private boolean |
start_modifier_defined
What the modifier should be...optimization variable |
private static java.lang.String |
VERSION
Version number for codebase |
Constructor Summary | |
Element()
Base class for defining all elements. |
Method Summary | |
void |
addAttribute(java.lang.String attribute_name,
java.lang.Object attribute_value)
Add an attribute to the element. |
protected java.lang.String |
alterCase(java.lang.String value)
Alter the case of this element so that it is rendered according to whatever the value of case_type is. |
protected boolean |
getAttributeFilterState()
Find out if we want to filter the elements attributes or not. |
int |
getCase()
Find out what case the element is supposed to be rendered in. |
java.lang.String |
getCodeSet()
Find out what the current codeset is. |
protected java.util.Hashtable |
getElementHashEntry()
Get the Hashtable representation of an element. |
java.lang.String |
getEndModifier()
What is the element modifier for this tag. |
private boolean |
getEndModifierDefined()
Modifier optimization |
Filter |
getFilter()
Get the filter that is currently in use. |
boolean |
getFilterState()
get the filter state of the element. |
java.lang.String |
getHtmlElementType()
Find out what type of element this is. |
boolean |
getNeedClosingTag()
Determine if this element needs to be closed. |
java.lang.String |
getStartModifier()
What is the element modifier for this tag. |
private boolean |
getStartModifierDefined()
Modifier optimization |
java.lang.String |
getVersion()
What version of htmlGen is this? |
boolean |
hasAttribute(java.lang.String attribute)
|
void |
output(java.io.OutputStream out)
Add the element to the designated OutputStream. |
void |
output(java.io.PrintWriter pw)
Add element to the designated PrintWriter. |
void |
removeAttribute(java.lang.String attribute_name)
|
Element |
removeEndModifier()
Remove the element modifier for this tag. |
Element |
removeStartModifier()
Remove the element modifier for this tag. |
Element |
setAttributeFilter(Filter attribute_filter)
Set up a new filter for all element attributes. |
Element |
setAttributeFilterState(boolean filter_attribute_state)
Tell the element if we want to filter its attriubtes. |
void |
setCase(int case_type)
Determine what case the html element should be rendered. |
void |
setCodeSet(java.lang.String codeset)
Determine what codeset should be used. |
Element |
setEndModifier(java.lang.String modifier)
Set the element modifier the default is no modifier. |
private void |
setEndModifierDefined(boolean val)
Modifier optimization |
void |
setFilter(Filter filter)
Override the default filter with a user supplied filter. |
void |
setFilterState(boolean filter_state)
set the filter state of the element. |
void |
setHtmlElementType(java.lang.String html_element)
Determine what type of element this is A,BR,EM,ACRONYM |
Element |
setModifier(java.lang.String modifier)
Set the element modifier the default is no modifier. |
Element |
setModifier(java.lang.String start_modifier,
java.lang.String end_modifier)
Set the element modifier the default is no modifier. |
void |
setNeedClosingTag(boolean close)
Does this element need a closing tag. |
Element |
setStartModifier(java.lang.String modifier)
Set the element modifier the default is no modifier. |
private void |
setStartModifierDefined(boolean val)
Modifier optimization |
java.lang.String |
toString()
Override toString() method to print something meaningful |
java.lang.String |
toString(java.lang.String codeset)
Override toString(encode) method to print something meaningful |
Methods inherited from class java.lang.Object |
|
Field Detail |
private Filter filter
private Filter attribute_filter
private boolean filter_state
private boolean filter_attribute_state
private static final java.lang.String VERSION
private int case_type
private java.util.Hashtable element
private boolean end_element
protected static final java.lang.String NO_ATTRIBUTE_VALUE
private java.lang.String codeset
private java.lang.String start_modifier
private java.lang.String end_modifier
private boolean start_modifier_defined
private boolean end_modifier_defined
Constructor Detail |
public Element()
Method Detail |
protected java.util.Hashtable getElementHashEntry()
public Element setModifier(java.lang.String modifier)
modifier
- the modifier for the element a ? would result public Element setStartModifier(java.lang.String modifier)
modifier
- the modifier for the element a ? would result public Element setEndModifier(java.lang.String modifier)
modifier
- the modifier for the element a ? would result protected boolean getAttributeFilterState()
public Element setAttributeFilterState(boolean filter_attribute_state)
filter_attribute_state
- do we want to filter the attributes of this element?public Element setAttributeFilter(Filter attribute_filter)
Filter
- the filter we want to use for element attributes. By public Element setModifier(java.lang.String start_modifier, java.lang.String end_modifier)
modifier
- the modifier for the element a ? would result public java.lang.String getStartModifier()
public java.lang.String getEndModifier()
public Element removeStartModifier()
public Element removeEndModifier()
private void setStartModifierDefined(boolean val)
private void setEndModifierDefined(boolean val)
private boolean getStartModifierDefined()
private boolean getEndModifierDefined()
public void addAttribute(java.lang.String attribute_name, java.lang.Object attribute_value)
public void removeAttribute(java.lang.String attribute_name)
public boolean hasAttribute(java.lang.String attribute)
public void setFilter(Filter filter)
public void setFilterState(boolean filter_state)
filter_state
- (true|false) do we want to use a filter? default true;public boolean getFilterState()
public Filter getFilter()
public java.lang.String getVersion()
public void setCase(int case_type)
public int getCase()
public void setHtmlElementType(java.lang.String html_element)
public java.lang.String getHtmlElementType()
public void setCodeSet(java.lang.String codeset)
public java.lang.String getCodeSet()
public void setNeedClosingTag(boolean close)
public boolean getNeedClosingTag()
protected java.lang.String alterCase(java.lang.String value)
public final java.lang.String toString()
public final java.lang.String toString(java.lang.String codeset)
public void output(java.io.OutputStream out)
public void output(java.io.PrintWriter pw)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |