Addes the current member as a nested object.

@param template              The template
@param attributes            The attributes of the tag
@exception XDocletException  If an error occurs
@doc.tag                     type="content"
7374
public String processNested(Properties attributes) throws XDocletException
    {
        String    name      = OjbMemberTagsHandler.getMemberName();
        XClass    type      = OjbMemberTagsHandler.getMemberType();
        int       dim       = OjbMemberTagsHandler.getMemberDimension();
        NestedDef nestedDef = _curClassDef.getNested(name);

        if (type == null)
        {
            throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class,
                                          XDocletModulesOjbMessages.COULD_NOT_DETERMINE_TYPE_OF_MEMBER,
                                          new String[]{name}));
        }
        if (dim > 0)
        {
            throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class,
                                          XDocletModulesOjbMessages.MEMBER_CANNOT_BE_NESTED,
                                          new String[]{name, _curClassDef.getName()}));
        }

        ClassDescriptorDef nestedTypeDef = _model.getClass(type.getQualifiedName());

        if (nestedTypeDef == null)
        {
            throw new XDocletException(Translator.getString(XDocletModulesOjbMessages.class,
                                          XDocletModulesOjbMessages.COULD_NOT_DETERMINE_TYPE_OF_MEMBER,
                                          new String[]{name}));
        }
        if (nestedDef == null)
        {
            nestedDef = new NestedDef(name, nestedTypeDef);
            _curClassDef.addNested(nestedDef);
        }
        LogHelper.debug(false, OjbTagsHandler.class, "processNested", "  Processing nested object "+nestedDef.getName()+" of type "+nestedTypeDef.getName());

        String attrName;
        
        for (Enumeration attrNames = attributes.propertyNames(); attrNames.hasMoreElements(); )
        {
            attrName = (String)attrNames.nextElement();
            nestedDef.setProperty(attrName, attributes.getProperty(attrName));
        }
        return "";
    }
1175952
public function setTemplate(Template $template = null)
	{
		if ($this->writeOnce($this->template, $template)) {
			$this->template->addTemplateLayout($this);
		}
	}
1128368
private void appendAttribute(Tag tag, String text) {

        if (tag.getTagName().equals("IMG")) {
            appendText(text);
        } else {
            String current = m_attributeMap.get(tag);
            if (current != null) {
                text = current + text;
            }
            m_attributeMap.put(tag, text);
        }
    }
1122908
def add_template(template, **kwargs):
    
    tmpl = Template()
    tmpl.name = template.name
    if template.description:
        tmpl.description = template.description
    if template.layout:
        tmpl.layout = get_layout_as_string(template.layout)

    db.DBSession.add(tmpl)

    if template.templatetypes is not None:
        types = template.templatetypes
        for templatetype in types:
            ttype = _update_templatetype(templatetype)
            tmpl.templatetypes.append(ttype)

    db.DBSession.flush()
    return tmpl
122652
private static void createAttribute(Map<String, List<XsdAttribute>> createdAttributes, XsdAttribute elementAttribute) {
        if (!createdAttributes.containsKey(elementAttribute.getName())){
            List<XsdAttribute> attributes = new ArrayList<>();

            attributes.add(elementAttribute);

            createdAttributes.put(elementAttribute.getName(), attributes);
        } else {
            List<XsdAttribute> attributes = createdAttributes.get(elementAttribute.getName());

            if (!attributes.contains(elementAttribute)){
                attributes.add(elementAttribute);
            }
        }
    }
150638
public void addAttribute(String attribute)
    {
        if(this.attributes == null)
            this.attributes = new ArrayList<String>();
        this.attributes.add(attribute);
    }
914984
private void addXMLAttributes(Map<String, String> attrMap) {
        if (m_children != null) {
            for (UNode childNode : m_children) {
                // A child node must not contain a tag name to be considered an attribute.
                if (childNode.m_type == NodeType.VALUE && childNode.m_bAttribute && Utils.isEmpty(childNode.m_tagName)) {
                    assert m_name != null && m_name.length() > 0;
                    attrMap.put(childNode.m_name, childNode.m_value);
                }
            }
        }
    }
1163539
public void addDataElement(String elemName, String content, Attributes attrs) {
        writeDataElement(elemName, attrs, content);
    }
415584
private void addAttribute(int list, TreeHtmlAttributeInfo attr, RemoveInfo removes)
    {
        ArrayList al = _lists[list];
        // if the array list is the empty list then we need to allocate a new array list
        if (al == empty) {
            al = new ArrayList();
            _lists[list] = al;
        }

        // check to see if this attribute is already inside the tree.
        int cnt = al.size();
        for (int i = 0; i < cnt; i++) {
            TreeHtmlAttributeInfo a = (TreeHtmlAttributeInfo) al.get(i);
            assert(a != null);
            if (a.getAttribute().equals(attr.getAttribute())) {
                removes.removes.add(a);
                if (!attr.isApplyToDescendents()) {
                    removes.scopeOverrides = true;
                }
                al.remove(a);
                break;
            }
        }

        // add this to the list
        al.add(attr);
    }
733397
protected void addMethodNodes(String desc) {
        Type[] args = Type.getArgumentTypes(desc);
        Type ret = Type.getReturnType(desc);
        Node currentNode = this.currentNode;
        Element tmp = doc.createElementNS(XML_URI,"arguments");
        currentNode.appendChild(tmp);
        this.currentNode = tmp;
        for (int i = 0; i < args.length; i++)
            addTypeNode(args[i]);
        tmp = doc.createElementNS(XML_URI,"return");
        currentNode.appendChild(tmp);
        this.currentNode = tmp;
        addTypeNode(ret);
        this.currentNode = currentNode;
    }
    
    /**
     * Add a type node for the specified descriptor.
     *
     * @param desc A type descriptor.
     */
    protected void addTypeNode(String desc) {
        addTypeNode(Type.getType(desc));
    }
    
    /**
     * Add a type node for the specified type.
     * This writes out a &lt;type&gt; node with attributes describing
     * the type.
     *
     * @param type The type to describe.
     */
    protected void addTypeNode(Type type) {
        Element tmp = doc.createElementNS(XML_URI, "type");
        currentNode.appendChild(tmp);
        int i = type.getSort();
        if (i == Type.ARRAY) {
            tmp.setAttribute( "array", "yes");
            tmp.setAttribute( "dimensions",
                              "" + type.getDimensions());
            type = type.getElementType();
            i = type.getSort();
        }
        switch (i) {
        case Type.BOOLEAN:
            tmp.setAttribute( "primitive", "yes");
            tmp.setAttribute( "name", "boolean");
            break;
        case Type.BYTE:
            tmp.setAttribute( "primitive", "yes");
            tmp.setAttribute( "name", "byte");
            break;
        case Type.CHAR:
            tmp.setAttribute( "primitive", "yes");
            tmp.setAttribute( "name", "char");
            break;
        case Type.DOUBLE:
            tmp.setAttribute( "primitive", "yes");
            tmp.setAttribute( "name", "double");
            break;
        case Type.FLOAT:
            tmp.setAttribute( "primitive", "yes");
            tmp.setAttribute( "name", "float");
            break;
        case Type.INT:
            tmp.setAttribute( "primitive", "yes");
            tmp.setAttribute( "name", "int");
            break;
        case Type.LONG:
            tmp.setAttribute( "primitive", "yes");
            tmp.setAttribute( "name", "long");
            break;
        case Type.OBJECT:
            tmp.setAttribute( "name", type.getInternalName());
            break;
        case Type.SHORT:
            tmp.setAttribute( "primitive", "yes");
            tmp.setAttribute( "name", "short");
            break;
        case Type.VOID:
            tmp.setAttribute( "primitive", "yes");
            tmp.setAttribute( "name", "void");
            break;
        }
    }
}
1263232
protected void addMemberDesc(Element member, Content contentTree) {
        TypeElement containing = utils.getEnclosingTypeElement(member);
        String classdesc = utils.getTypeElementName(containing, true) + " ";
        if (utils.isField(member)) {
            Content resource = contents.getContent(utils.isStatic(member)
                    ? "doclet.Static_variable_in"
                    : "doclet.Variable_in", classdesc);
            contentTree.addContent(resource);
        } else if (utils.isConstructor(member)) {
            contentTree.addContent(
                    contents.getContent("doclet.Constructor_for", classdesc));
        } else if (utils.isMethod(member)) {
            Content resource = contents.getContent(utils.isStatic(member)
                    ? "doclet.Static_method_in"
                    : "doclet.Method_in", classdesc);
            contentTree.addContent(resource);
        }
        addPreQualifiedClassLink(LinkInfoImpl.Kind.INDEX, containing,
                false, contentTree);
    }
325092
function add(id, template, instances){
  templates[id] = {
    template: template,
    instances: instances
  };
}
623956
public void addMemberTags(FieldDoc field, Content contentTree) {
        Content tagContent = new ContentBuilder();
        TagletWriter.genTagOuput(configuration.tagletManager, field,
                configuration.tagletManager.getCustomTaglets(field),
                writer.getTagletWriterInstance(false), tagContent);
        Content dlTags = new HtmlTree(HtmlTag.DL);
        dlTags.addContent(tagContent);
        contentTree.addContent(dlTags);  // TODO: what if empty?
    }
1264958
@SuppressWarnings("unchecked")
    public <T extends AbstractJaxb> TableBuilder addTr(List<Object> tdList,
            Map<String, Object> attrMap) throws TagTypeUnmatchException {
        tr tr = new tr();
        tr.setAttr(attrMap);
        for (Object obj : tdList) {
            if (obj instanceof String) {
                tr.addTd((String) obj);
            } else if (obj instanceof AbstractJaxb) {
                tr.addTd((T) obj);
            } else {
                throw new TagTypeUnmatchException(
                        "String or other tag object expected but tdList contains "
                                + obj.getClass().getName());
            }
        }
        trList.add(tr);
        return this;
    }
725543
public void addAttribute(String attributeName, String attributeValue) throws XmlModelException {
        String name = attributeName.trim();
        String value = attributeValue.trim();
        if(attributesMap.containsKey(name)) {
            throw new XmlModelException("Duplicate attribute: " + name);
        }
        attributeNames.add(name);
        attributesMap.put(name, new Attribute(name, value));
    }
1358594
public function addTemplate(Template $template)
    {
        $key = $this->normalizeKey($template->getTemplateName());
        $this->templates[$key] = $template;
    }
448964
public void setTemplate( String template )
    {
        if ( template == null || template.length() == 0 )
        {
            throw new IllegalStateException( "Template cannot be null or empty." );
        }

        if ( template.equals( _template ) )
        {
            return;
        }

        _template = template;
        _isParsed = false;
        _parsedTemplate = null;
    }