Extract the style value from a Inkscape encoded string

@param style The style string to be decoded
@param attribute The style attribute to retrieve
@return The value for the given attribute
170836
static String extractStyle(String style, String attribute) {
		if (style == null) {
			return "";
		}
		
		StringTokenizer tokens = new StringTokenizer(style,";");
		
		while (tokens.hasMoreTokens()) {
			String token = tokens.nextToken();
			String key = token.substring(0,token.indexOf(':'));
			if (key.equals(attribute)) {
				return token.substring(token.indexOf(':')+1);
			}
		}
		
		return "";
	}
1168090
public Object getAttributeValue(FeatureDescriptor feature,
                                    String attributeName) {

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

        return feature.getValue(attributeName);
    }
462702
function(property) {

	if( !this.getAttribute('style') ) {
		return '';
	}

	property = this._jsStyle(property);

	var matchedStyle = this._node.style[property];

	if( matchedStyle ) {
		return matchedStyle;
	} else {
		return null;
	}
}
1024368
public String getAttributeAsClassName(AnnotationAttributeType attribute) {
		String temp = attributes.get(attribute.getValue());

		if (StringUtils.hasText(temp)) {
			temp = temp.replace(".class", "");
		}

		return temp;
	}
176847
def link_attribute(styles={})
      return nil if styles.nil?
      return styles[:link] if styles[:link].is_a?(NSURL) || styles[:link].is_a?(String)
      nil
    end
130508
private void obtainStyledAttributes(@Nullable final AttributeSet attributeSet) {
        TypedArray typedArray =
                getContext().obtainStyledAttributes(attributeSet, R.styleable.PasswordEditText);
        try {
            obtainPasswordVerificationPrefix(typedArray);
        } finally {
            typedArray.recycle();
        }
    }
120317
public String getAttribute(String attributeName) {
		if (attributeName != null){
			return this.attributes.get(attributeName);
		}
		
		return null;
	}
581974
function (element, style) {
			var styleString = '';

			for (var key in style) {
				styleString += key + ': ' + style[key] + ';';
			}

			element.setAttribute('style', styleString);

			return element;
		}
1239621
public Color getAsColor(String attribute) {
		if (!isColor(attribute)) {
			throw new RuntimeException("Attribute "+attribute+" is not specified as a color:"+getAttribute(attribute));
		}
		
		int col = Integer.parseInt(getAttribute(attribute).substring(1), 16);
		
		return new Color(col);
	}
237946
private static FontStyle stringToFontStyle(String style) {
        if (style.compareToIgnoreCase("plain") == 0) {
            return FontStyle.PLAIN;
        } else if (style.compareToIgnoreCase("bold") == 0) {
            return FontStyle.BOLD;
        } else if (style.compareToIgnoreCase("italic") == 0) {
            return FontStyle.ITALIC;
        } else {
            throw new IllegalArgumentException();
        }
    }
996776
function _getAttribute(attribute) {
    if (is_string(_attributes[attribute])) {
      return _attributes[attribute];
    }

    if ((line = _translator.trans(attribute)) !== attribute) {
      return line;
    } else {
      return attribute.replace('_', ' ');
    }
  }
360614
public static String decode(Style style) {
		if (style != null) {
			if (style instanceof ShapeStyle) {
				return decode((ShapeStyle) style);
			} else if (style instanceof FontStyle) {
				return decode((FontStyle) style);
			} else if (style instanceof PictureStyle) {
				return decode((PictureStyle) style);
			}
		}
		return "";
	}
20149
private static String decode(ShapeStyle style) {
		String css = "";
		if (style.getFillColor() != null && !"".equals(style.getFillColor())) {
			css += "fill:" + style.getFillColor() + ";";
		}
		css += "fill-opacity:" + style.getFillOpacity() + ";";
		if (style.getStrokeColor() != null && !"".equals(style.getStrokeColor())) {
			css += "stroke:" + style.getStrokeColor() + ";";
		}
		css += "stroke-opacity:" + style.getStrokeOpacity() + ";";
		if (style.getStrokeWidth() >= 0) {
			css += "stroke-width:" + style.getStrokeWidth() + ";";
		}
		return css;
	}
330680
public List<String> getAttributeAsArray(AnnotationAttributeType attribute) {
		String temp = attributes.get(attribute.getValue());

		return AnnotationUtility.extractAsArrayOfString(temp);
	}
613864
public void addAttribute(String attribute, String value) {
		if (value == null) {
			value = "";
		}
		
		if (attribute.equals(FILL) ) {
			value = morphColor(value);
		}
		if (attribute.equals(STROKE_OPACITY)) {
			if (value.equals("0")) {
				props.setProperty(STROKE, "none");
			}
		}
		if (attribute.equals(STROKE_WIDTH)) {
			if (value.equals("")) {
				value = "1";
			}
			if (value.endsWith("px")) {
				value = value.substring(0,value.length()-2);
			}
		}
		if (attribute.equals(STROKE)) {
			if ("none".equals(props.getProperty(STROKE))) {
				return;
			}
			if ("".equals(props.getProperty(STROKE))) {
				return;
			}
			value = morphColor(value);
		}
		
		props.setProperty(attribute, value);
	}
387187
function(style, stylename)
	{
		if (mxUtils.indexOfStylename(style, stylename) < 0)
		{
			if (style == null)
			{
				style = '';
			}
			else if (style.length > 0 && style.charAt(style.length - 1) != ';')
			{
				style += ';';
			}
			
			style += stylename;
		}
		
		return style;
	}
871824
protected String getStyle(FacesContext facesContext, UIComponent link)
    {
        if (link instanceof HtmlCommandLink)
        {
            return ((HtmlCommandLink)link).getStyle();
        }

        return (String)link.getAttributes().get(HTML.STYLE_ATTR);

    }