Add a new schema object to the name set.

          @arg name_attr: name value read in schema
          @arg space_attr: namespace value read in schema.

          @return: the Name that was just added.
330513
def add_name(self, name_attr, space_attr, new_schema):
        # type: (Text, Optional[Text], NamedSchema) -> Name
        
        to_add = Name(name_attr, space_attr, self.default_namespace)

        if to_add.fullname in VALID_TYPES:
            fail_msg = '%s is a reserved type name.' % to_add.fullname
            raise SchemaParseException(fail_msg)
        elif to_add.fullname in self.names:
            fail_msg = 'The name "%s" is already in use.' % to_add.fullname
            raise SchemaParseException(fail_msg)

        self.names[to_add.fullname] = new_schema
        return to_add
1264021
public JobXMLDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
509952
def _get_attr_by_name_and_dimension(name, dimension_id):
    

    attr = db.DBSession.query(Attr).filter(Attr.name==name, Attr.dimension_id==dimension_id).first()

    if attr is None:
        # In this case the attr does not exists so we must create it
        attr         = Attr()
        attr.dimension_id = dimension_id
        attr.name  = name

        log.debug("Attribute not found, creating new attribute: name:%s, dimen:%s",
                    attr.name, attr.dimension_id)

        db.DBSession.add(attr)

    return attr
863221
def add_node_attribute(self, node, attr):
        
        self.node_attr[node] = self.node_attr[node] + [attr]
425117
def model_attr(attr_name):
    

    def model_attr(value, context, **_params):
        setattr(context["model"], attr_name, value)
        return _attr()

    return model_attr
75649
def soap_attribute(self, name, value):
        
        setattr(self, name, value)
        self._attributes.add(name)
846540
def add_attribute(self, attribute):
        
        self.attributes.append(attribute)
        return len(self.attributes)
171848
public PersistenceDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
298697
def add_attrs(self, symbol, **kwargs):
        
        for key, val in kwargs.items():
            symbol.add_extension_attribute(self.extension_name, key, val)
1370724
def _add(self, symbol_name, namespace, node, module):
        
        result = symbol_name in namespace
        namespace[symbol_name] = node, module
        return not result
1056520
def _set_name(self, name):
        
        if self._is_identifier_quoted(name):
            self._quoted = True
            name = self._trim_quotes(name)

        if "." in name:
            parts = name.split(".", 1)
            self._namespace = parts[0]
            name = parts[1]

        self._name = name
480458
public EjbJarDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
918468
public void addMBeanAttribute(String mbean, MBeanAttribute attr)
			throws Exception {
		MBeanHolder mbeanHolder = mbeanMap.get(mbean);
		if (mbeanHolder == null) {
			mbeanHolder = new MBeanHolder(this, process, mbean);
			mbeanMap.put(mbean, mbeanHolder);
		}
		mbeanHolder.addAttribute(attr);
		log.info("Added attribute " + attr + " to " + mbean);
	}
359702
def add_field(self, name, ftype, docfield=None):
        
        self.schema.add_field(name, ftype)
        self[name] = docfield or DocField.FromType(ftype)
1021041
def add_name(self, name, lang=None):
        
        try:
            assert (lang, name) not in self.get_names()
        except Exception as e:
            # TODO: raise a custom exception
            logger.warning("Duplicate name detected while adding \"%s (lang=%s)\""%(name, lang))
            return False
        newlabel = Literal(name, lang=lang) if lang is not None else \
            Literal(name)
        name = [
            id
            for id in self.ecrm_P1_is_identified_by
            if id.uri == surf.ns.EFRBROO['F12_Name']
        ][0]
        try:
            name.rdfs_label.append(newlabel)
            name.update()
            return True
        except Exception as e:
            raise e
1366447
def get_attribute_name_id(attr):
    
    return attr.value.id if isinstance(attr.value, ast.Name) else None
1044717
def name(self, name):
        
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")
        if name is not None and len(name) > 200:
            raise ValueError("Invalid value for `name`, length must be less than or equal to `200`")

        self._name = name