Package io.sf.carte.doc.style.css.parser
Class AttributeConditionVisitor
java.lang.Object
io.sf.carte.doc.style.css.parser.AttributeConditionVisitor
- All Implemented Interfaces:
io.sf.carte.util.Visitor<AttributeCondition>
public abstract class AttributeConditionVisitor
extends Object
implements io.sf.carte.util.Visitor<AttributeCondition>
Subclasses can be used to visit a selector (or a selector list) and replace
the namespaceURI, localName or value of the contained
AttributeCondition
s.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
setConditionLocalName
(AttributeCondition cond, String newLocalName) Sets the LocalName of the attribute condition.protected void
setConditionNamespaceURI
(AttributeCondition cond, String namespaceURI) Sets the namespaceURI of the attribute condition.protected void
setConditionValue
(AttributeCondition cond, String newValue) Sets the value of the attribute condition.abstract void
visit
(AttributeCondition condition) Visit an attribute condition, which can be used to modify its namespaceURI, localName or value.void
Visit a selector.void
visit
(SelectorList list) Visit a list of selectors.
-
Constructor Details
-
AttributeConditionVisitor
protected AttributeConditionVisitor()
-
-
Method Details
-
visit
Visit a list of selectors.- Parameters:
list
- the list of selectors.
-
visit
Visit a selector.- Parameters:
selector
- the selector.
-
setConditionNamespaceURI
protected void setConditionNamespaceURI(AttributeCondition cond, String namespaceURI) throws DOMException Sets the namespaceURI of the attribute condition.- Parameters:
cond
- the attribute condition to be set.namespaceURI
- the new namespaceURI.- Throws:
DOMException
- INVALID_ACCESS_ERR if the namespaceURI isnull
or empty.
-
setConditionLocalName
protected void setConditionLocalName(AttributeCondition cond, String newLocalName) throws DOMException Sets the LocalName of the attribute condition.- Parameters:
cond
- the attribute condition to be set.newLocalName
- the new LocalName.- Throws:
DOMException
- INVALID_ACCESS_ERR if the newLocalName isnull
or empty.
-
setConditionValue
Sets the value of the attribute condition.- Parameters:
cond
- the attribute condition to be set.newValue
- the new value.- Throws:
DOMException
- INVALID_ACCESS_ERR if theConditionType
isCLASS
and the value isnull
or empty.
-
visit
Visit an attribute condition, which can be used to modify its namespaceURI, localName or value.- Specified by:
visit
in interfaceio.sf.carte.util.Visitor<AttributeCondition>
- Parameters:
condition
- the attribute condition.
-