code: public void assignType(XAttribute attribute, String type) {
  		if (type != null && type.trim().length() > 0) {
  			XAttributeLiteral attr = (XAttributeLiteral) ATTR_TYPE.clone();
  			attr.setValue(type);
  			attribute.getAttributes().put(KEY_TYPE, attr);
  		}
  	}
docs: Assigns any attribute its cost type, as defined by this extension's type
  attribute.
  
  @param attribute
  Attribute to assign cost type to.
  @param type
  The cost type to be assigned.