Class AttributeConditionVisitor

java.lang.Object
io.sf.carte.doc.style.css.parser.AttributeConditionVisitor
All Implemented Interfaces:
Visitor<AttributeCondition>

public abstract class AttributeConditionVisitor extends Object implements Visitor<AttributeCondition>
Subclasses can be used to visit a selector (or a selector list) and replace the namespaceURI, localName or value of the contained AttributeConditions.
  • Constructor Details

    • AttributeConditionVisitor

      protected AttributeConditionVisitor()
  • Method Details

    • visit

      public void visit(SelectorList list)
      Visit a list of selectors.
      Parameters:
      list - the list of selectors.
    • visit

      public void visit(Selector selector)
      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 is null 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 is null or empty.
    • setConditionValue

      protected void setConditionValue(AttributeCondition cond, String newValue) throws DOMException
      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 the ConditionType is CLASS and the value is null or empty.
    • visit

      public abstract void visit(AttributeCondition condition)
      Visit an attribute condition, which can be used to modify its namespaceURI, localName or value.
      Specified by:
      visit in interface Visitor<AttributeCondition>
      Parameters:
      condition - the attribute condition.