Adds any missed schema attributes to the _attributes list

        The attributes can be class attributes and they won't be
        included in the _attributes list automatically
493268
def _add_missing_schema_attributes(self):
        '''
        
        '''
        for attr in [attr for attr in dir(self) if not attr.startswith('__')]:
            attr_val = getattr(self, attr)
            if isinstance(getattr(self, attr), SchemaItem) and \
               attr not in self._attributes:

                self._attributes.append(attr)
374977
def set_attributes(self, attributes):
        
        for k, v in attributes.items():
            self.set_attribute(k, v)
675702
public void restoreAttributes()
    {
        String attrName = getScopedName( STORED_ATTRS_ATTR );
        Map savedAttrs = ( Map ) getSession().getAttribute( attrName );

        if ( savedAttrs != null )
        {
            setAttributeMap( savedAttrs );
        }
    }
679414
protected void addAttributes(final boolean _inherited,
                                 final Attribute... _attributes)
        throws CacheReloadException
    {
        for (final Attribute attribute : _attributes) {
            if (!this.attributes.containsKey(attribute.getName())) {
                Type.LOG.trace("adding Attribute:'{}' to type: '{}'", attribute.getName(), getName());
                // evaluate for type attribute
                if (attribute.getAttributeType().getClassRepr().equals(TypeType.class)) {
                    this.typeAttributeName = attribute.getName();
                } else if (attribute.getAttributeType().getClassRepr().equals(StatusType.class) && !_inherited) {
                    // evaluate for status, an inherited attribute will not
                    // overwrite the original attribute
                    this.statusAttributeName = attribute.getName();
                } else if (attribute.getAttributeType().getClassRepr().equals(CompanyLinkType.class)
                                || attribute.getAttributeType().getClassRepr().equals(ConsortiumLinkType.class)) {
                    // evaluate for company
                    this.companyAttributeName = attribute.getName();
                } else if (attribute.getAttributeType().getClassRepr().equals(GroupLinkType.class)) {
                    // evaluate for group
                    this.groupAttributeName = attribute.getName();
                }
                this.attributes.put(attribute.getName(), attribute);
                if (attribute.getTable() != null) {
                    this.tables.add(attribute.getTable());
                    attribute.getTable().addType(getId());
                    if (getMainTable() == null) {
                        setMainTable(attribute.getTable());
                    }
                }
                setDirty();
            }
        }
    }
1275593
def __checkAttributes(self):
        
        for a in self.__class__.required:
            if not self.attributes.has_key(a):
                raise SchemaError,\
                    'class instance %s, missing required attribute %s'\
                    %(self.__class__, a)
        for a,v in self.attributes.items():
            # attribute #other, ie. not in empty namespace
            if type(v) is dict:
                continue
            
            # predefined prefixes xmlns, xml
            if a in (XMLSchemaComponent.xmlns, XMLNS.XML):
                continue
            
            if (a not in self.__class__.attributes.keys()) and not\
                (self.isAttribute() and self.isReference()):
                raise SchemaError, '%s, unknown attribute(%s,%s)' \
                    %(self.getItemTrace(), a, self.attributes[a])
1332413
def add_class2fields(self, html_class, fields=[], exclude=[], include_all_if_empty=True):
        
        self.add_attr2fields('class', html_class, fields, exclude)
1183633
function _fillMissingFields(attrs) {
  var attr;
  for(var i = 0; i < attrs.length; ++i) {
    attr = attrs[i];

    // populate missing name
    if(typeof(attr.name) === 'undefined') {
      if(attr.type && attr.type in pki.oids) {
        attr.name = pki.oids[attr.type];
      } else if(attr.shortName && attr.shortName in _shortNames) {
        attr.name = pki.oids[_shortNames[attr.shortName]];
      }
    }

    // populate missing type (OID)
    if(typeof(attr.type) === 'undefined') {
      if(attr.name && attr.name in pki.oids) {
        attr.type = pki.oids[attr.name];
      } else {
        var error = new Error('Attribute type not specified.');
        error.attribute = attr;
        throw error;
      }
    }

    // populate missing shortname
    if(typeof(attr.shortName) === 'undefined') {
      if(attr.name && attr.name in _shortNames) {
        attr.shortName = _shortNames[attr.name];
      }
    }

    if(typeof(attr.value) === 'undefined') {
      var error = new Error('Attribute value not specified.');
      error.attribute = attr;
      throw error;
    }
  }
}
834435
def add_on_blank(attributes, options = {})
      [attributes].flatten.each do |attribute|
        value = @base.send(:read_attribute_for_validation, attribute)
        add(attribute, :blank, options) if value.blank?
      end
    end
1091887
def set_attributes(self, doc, fields, parent_type=None):
        

        if parent_type:
            assert isinstance(parent_type, Struct)

        self.subtypes = []

        # These are only set if this struct enumerates subtypes.
        self._enumerated_subtypes = None  # Optional[List[Tuple[str, DataType]]]
        self._is_catch_all = None  # Optional[Bool]

        super(Struct, self).set_attributes(doc, fields, parent_type)

        if self.parent_type:
            self.parent_type.subtypes.append(self)
102878
def add_attribute(attribute, type, *flags)
      prop = create_nonjava_property(attribute, type, *flags)
      add_property(prop)
      prop
    end
573542
def add_attr2fields(self, attr_name, attr_val, fields=[], exclude=[], include_all_if_empty=True):
        
        for f in self.filter_fields(fields, exclude, include_all_if_empty):
            f = self.fields[f.name]
            org_val = f.widget.attrs.get(attr_name, '')
            f.widget.attrs[attr_name] = '%s %s' % (org_val, attr_val) if org_val else attr_val
156020
def addIncludeSchema(self, schemaLocation, schema):
        
        if not isinstance(schema, XMLSchema):
            raise TypeError, 'expecting a Schema instance'
        if not schema.targetNamespace or\
             schema.targetNamespace == self.targetNamespace:
            self._included_schemas[schemaLocation] = schema
        else:
            raise SchemaError, 'include schema bad targetNamespace'
756700
def _add_attr_property(self):
        
        property_ = property(self._getter, self._setter, None)
        # assign unconditionally to overwrite element name definition
        setattr(self._element_cls, self._prop_name, property_)
772874
def add_foreign_keys_as_attributes
      @@reflections[self.class.name.to_sym][:belongs_to].each do |klass|
        add_attribute klass.to_s.foreign_key.to_sym
      end
    end
298697
def add_attrs(self, symbol, **kwargs):
        
        for key, val in kwargs.items():
            symbol.add_extension_attribute(self.extension_name, key, val)
991404
def _add_element_attrs(elem, attrs):
	
	for attr, value in attrs.items():
		elem.attrib[attr] = value
	return elem
297451
def add_attributes(source,attribute,data_type)
      file = File.open(source, "r+")
      file.each do |line|
        while line == "    create_table :#{@scaffold_name}s do |t|\n" do
          pos = file.pos
          rest = file.read
          file.seek pos
          file.write("      t.#{data_type} :#{attribute}\n") 
          file.write(rest)
          break
        end
      end
    end