Describes metadata (field list and object properties) for the specified
    object.
166619
def describeSObject(self, sObjectsType):
    '''
    
    '''
    self._setHeaders('describeSObject')
    return self._sforce.service.describeSObject(sObjectsType)
230313
def manifest_metadata
      metadata = []
      Hyrax.config.iiif_metadata_fields.each do |field|
        metadata << {
          'label' => I18n.t("simple_form.labels.defaults.#{field}"),
          'value' => Array.wrap(send(field).map { |f| Loofah.fragment(f.to_s).scrub!(:whitewash).to_s })
        }
      end
      metadata
    end
729691
public Object setMetadata(String key, Object value) {
        return metadata.put(key, value);
    }
96978
def find_field_meta(obj, value):
    
    if "__" in value:
        value_list = value.split("__")
        child_obj = obj._meta.get_field(value_list[0]).rel.to
        return find_field_meta(child_obj, "__".join(value_list[1:]))
    return obj._meta.get_field(value)
1342413
def initialize_fields(self):
        
        for field in dir(self):
            obj = getattr(self, field)
            if isinstance(obj, Field):
                self._meta.fields[field] = obj
161222
def populate_metadata(model, MetadataClass):
    
    content_type = ContentType.objects.get_for_model(model)
    for instance in model.objects.all():
        create_metadata_instance(MetadataClass, instance)
1029329
def _parse_metadata(self, meta):
        
        output = {}
        for name, value in meta.items():
            name = name.lower()
            if name == "summary":
                value = textile(value)
            output[name] = self.process_metadata(name, value)
        return output
779805
public static String toMetaFieldInfoString(Object obj) {
        StringBuffer buf = new StringBuffer(100);
        MetaFieldInfo[] fields = toMetaFieldInfoArray(obj, null, true);
        for (int i = 0; i < fields.length; i++) {
            MetaFieldInfo field = fields[i];
            buf.append(field.name);
            buf.append("=");
            // if the field's actual value is non-null and of type String
            if (field.actualValue != null && field.actualValue.getClass().equals(String.class)) {
                buf.append('"');
                buf.append(field.value);
                buf.append('"');
            } else {
                buf.append(field.value);
            }
            // if not last element, delimit with a comma
            if (i+1 < fields.length)
                buf.append(",");
        }
        return buf.toString();
    }
951605
def _set_metadata(self, value):
        '''
        
        '''
        if value is None:
            setattr(self, '_PMMail__metadata', {})
        elif isinstance(value, dict):
            for k, v in value.items():
                if (not isinstance(k, str) and not isinstance(k, int)) \
                    or (not isinstance(v, str) and not isinstance(v, int)):
                    raise TypeError('Metadata keys and values can only be strings or integers')
            setattr(self, '_PMMail__metadata', value)
        else:
            raise TypeError('Metadata must be a dictionary of key-value pairs')
515049
def _init_metadata(self, **kwargs):
        """"""
        osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
        self._url_default = self._mdata['url']['default_string_values'][0]
        self._data_default = self._mdata['data']['default_object_values'][0]
        self._accessibility_type_default = self._mdata['accessibility_type']['default_type_values'][0]
1161246
def dict(self):
        
        metadata = {}
        properties = {}
        for name, prop in list(self.properties.items()):
            properties[name] = prop.dict
        metadata['properties'] = properties
        return metadata
22774
def get_mapping(self, meta_fields=True):
        '''
        
        '''
        return {'properties': dict((name, field.json()) for name, field in iteritems(self.fields) if meta_fields or name not in AbstractField.meta_fields)}
492856
def __FieldDescriptorFromProperties(self, name, index, attrs):
        """"""
        field = descriptor.FieldDescriptor()
        field.name = self.__names.CleanName(name)
        field.number = index
        field.label = self.__ComputeLabel(attrs)
        new_type_name_hint = self.__names.ClassName(
            '%sValue' % self.__names.ClassName(name))
        type_info = self.__GetTypeInfo(attrs, new_type_name_hint)
        field.type_name = type_info.type_name
        field.variant = type_info.variant
        if 'default' in attrs:
            # TODO(craigcitro): Correctly handle non-primitive default values.
            default = attrs['default']
            if not (field.type_name == 'string' or
                    field.variant == messages.Variant.ENUM):
                default = str(json.loads(default))
            if field.variant == messages.Variant.ENUM:
                default = self.__names.NormalizeEnumName(default)
            field.default_value = default
        extended_field = extended_descriptor.ExtendedFieldDescriptor()
        extended_field.name = field.name
        extended_field.description = util.CleanDescription(
            attrs.get('description', 'A %s attribute.' % field.type_name))
        extended_field.field_descriptor = field
        return extended_field
42691
private void marshalFields() {
    Collection<PropertyMetadata> propertyMetadataCollection = entityMetadata
        .getPropertyMetadataCollection();
    for (PropertyMetadata propertyMetadata : propertyMetadataCollection) {
      marshalField(propertyMetadata, entity);
    }
  }
841147
def get_properties(self, obj):
        """"""
        properties = {}

        for field_name, field in sorted(obj.fields.items()):
            schema = self._get_schema_for_field(obj, field)
            properties[field.name] = schema

        return properties
832983
def _m2m_field_data(field, obj):
    
    data = _basic_field_data(field, obj)
    data[Field.TYPE] = FieldType.M2M
    related = field.rel.to
    relation_info = {
        Field.REL_DB_TABLE: related._meta.db_table,
        Field.REL_APP: related._meta.app_label,
        Field.REL_MODEL: related.__name__
    }
    data[Field.REL] = relation_info
    value = data[Field.VALUE]
    value = [x[0] for x in value.values_list('pk')]
    data[Field.VALUE] = value
    return data
376967
@Override
    public final void setMetadataProperty(final String key, final String value) {
        _metadataProperties.put(key, value);
    }