Add an attribute as a primary one and its converter.

@param name name of the attribute
@param tag json reference
@param converter converter
487210
public void profileAttribute(final String name, String tag, final AttributeConverter<? extends Object> converter) {
        profileAttributes.put(name, tag);
        if (converter != null) {
            getConverters().put(name, converter);
        } else {
            getConverters().put(name, new StringConverter());
        }
    }
327941
public void init(Converter converter, Converter converterAlt)
    {
        m_bEnableTranslation = true;
        m_bSetData = false;
        super.init(converter);
        if (converterAlt != null)
            this.addConverterToPass(converterAlt);
    }
1257959
public void addConverter(Converter<?, ?> converter) {
		GenericConverter.ConvertiblePair typeInfo = getRequiredTypeInfo(converter, Converter.class);
		Assert.notNull(typeInfo, "Unable to the determine sourceType <S> and targetType " +
				"<T> which your Converter<S, T> converts between; declare these generic types.");
		addConverter(new ConverterAdapter(converter, typeInfo));
	}
701185
def tag(name, tag_name):
    

    with LOCK:
        # just to check if <name> exists
        metric(name)

        TAGS.setdefault(tag_name, set()).add(name)
752881
public void removeTag(String name) {
        XtraTag tag = getTagByName(name);
        if (tag != null) {
            tags.remove(tag);
        }
    }
268758
public boolean addPreserveTag(final String tagName) {

        Vector<Attribute> attributeList = new Vector<Attribute>(1);
        Attribute tagNameAttribute = new Attribute();
        tagNameAttribute.setName(tagName.toLowerCase());
        attributeList.add(tagNameAttribute);
        Tag keepTag = m_nodeFactory.createTagNode(null, 0, 0, attributeList);
        boolean result = m_nodeFactory.addTagPreserve(keepTag);
        return result;
    }
58879
void addTag(StringBuilder resultString, String tagName, String tagValue) {
		resultString.append(" ");
		resultString.append(sanitizeString(tagName));
		resultString.append("=");
		resultString.append(sanitizeString(tagValue));
	}
750055
public void removeAttribute(String name) {
		if(logger.isDebugEnabled()) {
        	logger.debug("removeAttribute - name=" + name);
        }
		if(attributes  != null) {
			this.attributes.remove(name);
		}
	}
497354
public void addAttribute(final String name, final String value) {
        ArgUtils.notEmpty(name, "name");
        removeAttribute(name);
        this.attributes.add(AttributeInfo.create(name, value));
    }
88763
public void writeTag(Tag<?> tag) throws IOException {
        String name = tag.getName();
        byte[] nameBytes = name.getBytes(NBTConstants.CHARSET.name());

        os.writeByte(tag.getType().getId());
        os.writeShort(nameBytes.length);
        os.write(nameBytes);

        if (tag.getType() == TagType.TAG_END) {
            throw new IOException("Named TAG_End not permitted.");
        }

        writeTagPayload(tag);
    }
897642
static void addTagToBuilder(Tag tag, TagMapBuilderImpl builder) {
    builder.put(tag.getKey(), tag.getValue(), tag.getTagMetadata());
  }
277214
public void setTagValues(String name, String values[]) {
        removeTag(name);
        XtraTag tag = new XtraTag(name);
        for (int i = 0; i < values.length; i++) {
            tag.values.addElement(new XtraValue(values[i]));
        }
        tags.addElement(tag);
    }
1181553
public static function data(Tag $tag, $name, $data) {
    $js = sprintf("data(%s, %s)",
                  JSHelper::convertString($name), JSHelper::convertValue($data)
                  );
    
    $tag->chain(new Code($js));
    
    return $tag;
  }
478549
@Override
    public void addConverter(Class<?> from, Class<?> to, Converter converter) {
        Map toMap = fromMap.get(from);
        if (toMap == null) {
            toMap = new HashMap<Class<?>, Map<Class<?>, Converter>>();
            fromMap.put(from, toMap);
        }
        toMap.put(to, converter);
    }
149973
private static void convertElement(JsonGenerator generator, Element element, boolean isArrayItem, ElementNameConverter converter) throws IOException {
        TYPE type = toTYPE(element.getAttribute("type"));
        String name = element.getTagName();

        if (!isArrayItem) {
            generator.writeFieldName(converter.convertName(name));
        }

        switch (type) {
            case OBJECT:
                generator.writeStartObject();
                convertChildren(generator, element, false, converter);
                generator.writeEndObject();
                break;
            case ARRAY:
                generator.writeStartArray();
                convertChildren(generator, element, true, converter);
                generator.writeEndArray();
                break;
            case STRING:
                generator.writeString(element.getTextContent());
                break;
            case INT:
            case FLOAT:
                generator.writeNumber(new BigDecimal(element.getTextContent()));
                break;
            case BOOLEAN:
                generator.writeBoolean(Boolean.parseBoolean(element.getTextContent()));
                break;
            case NULL:
                generator.writeNull();
                break;
        }
    }
1273225
protected Converter createConverter(FaceletContext ctx)
    {
        if (_delegate.getConverterId(ctx) == null)
        {
            throw new TagException(_delegate.getTag(),
                                    "Default behavior invoked of requiring a converter-id passed in the "
                                    + "constructor, must override ConvertHandler(ConverterConfig)");
        }
        return ctx.getFacesContext().getApplication().createConverter(_delegate.getConverterId(ctx));
    }
1322998
public void addMergeField(String strFileName, Converter converter)
    {
        this.checkArray();
        m_vArray.addElement(new InfoList(strFileName, null, -1, converter));
    }