Examples of AttributeSelector


Examples of jodd.csselly.selector.AttributeSelector

  // ---------------------------------------------------------------- attributes

  public void addIdSelector(String id) {
    id = unescape(id);
    selectors.add(new AttributeSelector(ID, EQUALS, id));
  }
View Full Code Here

Examples of jodd.csselly.selector.AttributeSelector

    selectors.add(new AttributeSelector(ID, EQUALS, id));
  }

  public void addClassSelector(String clazz) {
    clazz = unescape(clazz);
    selectors.add(new AttributeSelector(CLASS, INCLUDES, clazz));
  }
View Full Code Here

Examples of jodd.csselly.selector.AttributeSelector

    selectors.add(new AttributeSelector(CLASS, INCLUDES, clazz));
  }

  public void addAttributeSelector(String attribute) {
    attribute = unescape(attribute);
    selectors.add(new AttributeSelector(attribute));
  }
View Full Code Here

Examples of jodd.csselly.selector.AttributeSelector

    out.append(element);

    for (Selector selector : selectors) {
      switch (selector.getType()) {
        case ATTRIBUTE:
          AttributeSelector attrSelector = (AttributeSelector) selector;
          String attrName = attrSelector.getName();
          if (attrName.equals(ID)) {
            out.append('#').append(attrSelector.getValue());
          } else if (attrName.equals(CLASS)) {
            out.append('.').append(attrSelector.getValue());
          } else {
            out.append('[').append(attrSelector.getName());
            String value = attrSelector.getValue();
            if (value != null) {
              out.append(attrSelector.getMatch().getSign());
              char quote = attrSelector.getQuoteChar();
              if (quote != 0) {
                out.append(quote);
              }
              out.append(value);
              if (quote != 0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.