|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.ecs.GenericElement | +--org.apache.ecs.ElementAttributes
This class provides a common set of attributes set* methods for all classes. It is abstract to prevent direct instantiation.
Field Summary | |
private char |
attribute_equality_sign
What is the equality character for an attribute. |
private Filter |
attribute_filter
Filter to use to escape attribute input |
private boolean |
attribute_quote
Should we wrap quotes around an attribute? |
private char |
attribute_quote_char
What character should we use for quoting attributes. |
private boolean |
filter_attribute_state
Should we filter the value of the element attributes |
Fields inherited from class org.apache.ecs.GenericElement |
__text, _defaultFilter, begin_end_modifier, begin_end_modifier_defined, begin_start_modifier, begin_start_modifier_defined, case_type, codeset, element, element_type, end_element, end_end_modifier, end_end_modifier_defined, end_modifier_defined, end_start_modifier, end_start_modifier_defined, end_tag, filter, filter_state, position, pretty_print, start_modifier_defined, start_tag, tabLevel, VERSION |
Fields inherited from interface org.apache.ecs.Attributes |
NO_ATTRIBUTE_VALUE |
Fields inherited from interface org.apache.ecs.Element |
CENTER, LEFT, LOWERCASE, MIXEDCASE, RIGHT, UPPERCASE |
Constructor Summary | |
ElementAttributes()
Basic Constructor. |
Method Summary | |
Element |
addAttribute(java.lang.String attribute_name,
int attribute_value)
Add an attribute to the element. |
Element |
addAttribute(java.lang.String attribute_name,
java.lang.Integer attribute_value)
Add an attribute to the element. |
Element |
addAttribute(java.lang.String attribute_name,
java.lang.Object attribute_value)
Add an attribute to the element. |
Element |
addAttribute(java.lang.String attribute_name,
java.lang.String attribute_value)
Add an attribute to the element. |
java.util.Enumeration |
attributes()
Return a list of the attributes associated with this element. |
java.lang.String |
createStartTag()
This method overrides createStartTag() in Generic Element. |
java.lang.String |
getAttribute(java.lang.String attribute)
Return the specified attribute. |
char |
getAttributeEqualitySign()
Get the equality sign for an attribute. |
Filter |
getAttributeFilter()
Get the filter for all element attributes. |
boolean |
getAttributeFilterState()
Find out if we want to filter the elements attributes or not. |
boolean |
getAttributeQuote()
Do we surround attributes with qoutes? |
char |
getAttributeQuoteChar()
Get the character used to quote attributes. |
boolean |
hasAttribute(java.lang.String attribute)
does the element have a particular attribute? |
Element |
removeAttribute(java.lang.String attribute_name)
remove an attribute from the element |
Element |
setAttributeEqualitySign(char equality_sign)
Set the equality sign for an attribute. |
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. |
Element |
setAttributeQuote(boolean attribute_quote)
Set wether or not we surround the attributes with quotes. |
Element |
setAttributeQuoteChar(char quote_char)
Set the character used to quote attributes. |
Element |
setClass(java.lang.String element_class)
Set the element class for Cascading Style Sheets. |
Element |
setDir(java.lang.String dir)
Sets the DIR="" attribute |
Element |
setID(java.lang.String id)
Set the element id for Cascading Style Sheets. |
Element |
setLang(java.lang.String lang)
Sets the LANG="" attribute |
Element |
setStyle(java.lang.String style)
Sets the STYLE="" attribute |
Element |
setTitle(java.lang.String title)
Sets the TITLE="" attribute |
Methods inherited from class java.lang.Object |
|
Methods inherited from interface org.apache.ecs.ElementRegistry |
addElementToRegistry, addElementToRegistry, registryHasElement, registryHasElement, removeElementFromRegistry, removeElementFromRegistry |
Field Detail |
private Filter attribute_filter
private boolean filter_attribute_state
private char attribute_equality_sign
private char attribute_quote_char
private boolean attribute_quote
Constructor Detail |
public ElementAttributes()
Method Detail |
public Element setAttributeQuoteChar(char quote_char)
setAttributeQuoteChar
in interface Attributes
quote_char
- character used to quote attributespublic char getAttributeQuoteChar()
getAttributeQuoteChar
in interface Attributes
public Element setAttributeEqualitySign(char equality_sign)
setAttributeEqualitySign
in interface Attributes
equality_sign
- The equality sign used for attributes.public char getAttributeEqualitySign()
getAttributeEqualitySign
in interface Attributes
public boolean getAttributeQuote()
Attributes
getAttributeQuote
in interface Attributes
public Element setAttributeQuote(boolean attribute_quote)
setAttributeQuote
in interface Attributes
public Element setID(java.lang.String id)
public Element setClass(java.lang.String element_class)
public Element setLang(java.lang.String lang)
lang
- the LANG="" attributepublic Element setStyle(java.lang.String style)
style
- the STYLE="" attributepublic Element setDir(java.lang.String dir)
dir
- the DIR="" attributepublic Element setTitle(java.lang.String title)
title
- the TITLE="" attributepublic boolean getAttributeFilterState()
public Element setAttributeFilterState(boolean filter_attribute_state)
setAttributeFilterState
in interface Attributes
filter_attribute_state
- do we want to filter the attributes of this element?public Element setAttributeFilter(Filter attribute_filter)
setAttributeFilter
in interface Attributes
Filter
- the filter we want to use for element attributes. By public Filter getAttributeFilter()
getAttributeFilter
in interface Attributes
Filter
- the filter we want to use for element attributes. By public Element addAttribute(java.lang.String attribute_name, java.lang.Object attribute_value)
addAttribute
in interface Attributes
org.apache.ecs.Attributes
name
- name of the attributeelement
- value of the attribute.public Element addAttribute(java.lang.String attribute_name, int attribute_value)
addAttribute
in interface Attributes
org.apache.ecs.Attributes
name
- name of the attributeelement
- value of the attribute.public Element addAttribute(java.lang.String attribute_name, java.lang.String attribute_value)
addAttribute
in interface Attributes
org.apache.ecs.Attributes
name
- name of the attributeelement
- value of the attribute.public Element addAttribute(java.lang.String attribute_name, java.lang.Integer attribute_value)
addAttribute
in interface Attributes
org.apache.ecs.Attributes
name
- name of the attributeelement
- value of the attribute.public Element removeAttribute(java.lang.String attribute_name)
removeAttribute
in interface Attributes
org.apache.ecs.Attributes
name
- remove the attribute of this namepublic boolean hasAttribute(java.lang.String attribute)
hasAttribute
in interface Attributes
org.apache.ecs.Attributes
name
- of the attribute to ask the element for.public java.util.Enumeration attributes()
public java.lang.String getAttribute(java.lang.String attribute)
attribute
- The name of the attribute to fetchpublic java.lang.String createStartTag()
createStartTag
in class GenericElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |