Build single attribute definition line.

@param attributeName the attribute name
@param value         the value
@return the string
482945
protected String buildSingleAttributeDefinitionLine(final String attributeName, final Object value) {
        return new StringBuilder()
            .append("<cas:".concat(attributeName).concat(">"))
            .append(encodeAttributeValue(value))
            .append("</cas:".concat(attributeName).concat(">"))
            .toString();
    }
588304
public B attr(String name, String value) {
        get().setAttribute(name, value);
        return that();
    }
667723
public void attribute(final String attrName, final String attrVal) throws IOException {
    out(" ");
    out(attrName);
    out("=");
    quote(attrVal);
  }
615649
public HtmlElementWriter attribute(String name, String value) {
    attributes.put(name, value);
    return this;
  }
693560
public static String decodeAttributeValue(String value)
	{
		String _result = value.replaceAll(PATTERN__ENTITY_QUOTE, VALUE__CHAR_QUOTE);
		_result = _result.replaceAll(PATTERN__ENTITY_AMPERSAND, VALUE__CHAR_AMPERSAND);
		return _result;
	}
80924
protected Attribute setAttributeFromRawValue(String name, AttributeValue value) throws AttributeException {
		return setAttributeFromRawValue(name, value.getType(), value.getValue());
	}
1305860
public static String sanitizeAttribute (String value)
    {
        for (int ii = 0; ii < ATTR_ESCAPES.length; ++ii) {
            value = value.replace(ATTR_ESCAPES[ii][0], "");
        }
        return value;
    }
533697
protected void attributeImpl(String name, String value) {
        if (! (this.xmlNode instanceof Element)) {
            throw new RuntimeException(
                "Cannot add an attribute to non-Element underlying node: "
                + this.xmlNode);
        }
        ((Element) xmlNode).setAttribute(name, value);
    }
1168090
public Object getAttributeValue(FeatureDescriptor feature,
                                    String attributeName) {

        if (feature == null || attributeName == null) {
            return null;
        }

        return feature.getValue(attributeName);
    }
593060
public static String createPropertyFilter(String name, String value) {
        assert name.matches("[^=><~()]+");

        StringBuilder builder = new StringBuilder(name.length() + 3 + (value == null ? 0 : value.length() * 2));
        builder.append('(').append(name).append('=');

        int begin = 0;
        if (value != null) {
            for (int i = 0; i < value.length(); i++) {
                if ("\\*()".indexOf(value.charAt(i)) != -1) {
                    builder.append(value, begin, i).append('\\');
                    begin = i;
                }
            }

            return builder.append(value, begin, value.length()).append(')').toString();
        } else {
            return builder.append(')').toString();
        }
    }
1127303
public static ByAttribute attribute(final String name, final String value) {
        if (name == null)
            throw new IllegalArgumentException(
                    "Cannot find elements when the attribute name is null");

        return new ByAttribute(name, value);
    }
747873
public Object getValue(String attributeName) {
        if (attributeName != null) {
            return values.get(attributeName);
        }
        return null;
    }
359925
public void setStringAttribute(String name, String value) {
		ensureValue();
		Attribute attribute = new StringAttribute(value);
		attribute.setEditable(isEditable(name));
		getValue().getAllAttributes().put(name, attribute);
	}
91723
@SuppressWarnings("nullness")
  private static String attributeValueToString(AttributeValue attributeValue) {
    return attributeValue.match(
        returnToString,
        returnToString,
        returnToString,
        returnToString,
        Functions.<String>returnConstant(""));
  }
776593
public String getAttributeValue(final String name) {
        final List<Attribute> attributes = Collections.synchronizedList(getAttributes());
        for (int i = 0; i < attributes.size(); i++) {
            final Attribute a = attributes.get(i);

            if (a.getName() != null && a.getName().equals(name)) {
                return a.getValue();
            }
        }
        return null;
    }
1359520
private static String stringValue(Object attributeValue) {

        if (attributeValue == null) {
            return (null);
        } else if (attributeValue instanceof String) {
            return ((String) attributeValue);
        } else {
            return (attributeValue.toString());
        }

    }
1130881
public static String escapeAttribute (String value)
    {
        for (int ii = 0; ii < ATTR_ESCAPES.length; ++ii) {
            value = value.replace(ATTR_ESCAPES[ii][0], ATTR_ESCAPES[ii][1]);
        }
        return value;
    }