Set Meta Data functions
-------------------------.
426439
public function setMeta($key, $value = null)
    {
        $setMeta = 'setMeta'.ucfirst(gettype($key));

        return $this->$setMeta($key, $value);
    }
1075860
def _set_metadata(self):
        
        meta = QueryDbMeta()
        with self._engine.connect() as conn:
            meta.bind = conn
            meta.reflect()
            self._meta = meta

        # Set an inspect attribute, whose subattributes
        # return individual tables / columns. Tables and columns
        # are special classes with .last() and other convenience methods
        self.inspect = QueryDbAttributes()
        for table in self._meta.tables:
            setattr(self.inspect, table,
                    QueryDbOrm(self._meta.tables[table], self))

            table_attr = getattr(self.inspect, table)
            table_cols = table_attr.table.columns

            for col in table_cols.keys():
                setattr(table_attr, col,
                        QueryDbOrm(table_cols[col], self))

            # Finally add some summary info:
            #   Table name
            #   Primary Key item or list
            #   N of Cols
            #   Distinct Col Values (class so NVARCHAR(20) and NVARCHAR(30) are not different)
            primary_keys = table_attr.table.primary_key.columns.keys()
            self._summary_info.append((
                table,
                primary_keys[0] if len(primary_keys) == 1 else primary_keys,
                len(table_cols),
                len(set([x.type.__class__ for x in table_cols.values()])),
                ))
637629
def meta_set(self, key, metafield, value):
        '''  '''
        self._meta.setdefault(key, {})[metafield] = value
        if key in self:
            self[key] = self[key]
1240105
public function setMetaKey($value)
    {
        $this->_validateNotNull('MetaKey', $value);
        $this->_validateString('MetaKey', $value);

        if ($this->data['meta_key'] === $value) {
            return;
        }

        $this->data['meta_key'] = $value;

        $this->_setModified('meta_key');
    }
429099
public function setMetaValue($value)
    {
        $this->_validateNotNull('MetaValue', $value);
        $this->_validateString('MetaValue', $value);

        if ($this->data['meta_value'] === $value) {
            return;
        }

        $this->data['meta_value'] = $value;

        $this->_setModified('meta_value');
    }
545024
def _set_meta(self):
        
        # we want to set meta-fields that are shared by ALL params in the PS
        for field in _meta_fields_twig:
            keys_for_this_field = set([getattr(p, field)
                                       for p in self.to_list()
                                       if getattr(p, field) is not None])
            if len(keys_for_this_field)==1:
                setattr(self, '_'+field, list(keys_for_this_field)[0])
            else:
                setattr(self, '_'+field, None)
552483
protected function setMediaMetadata()
    {
        $mediaMetadata = $this->getDataProperty('metadata');
        if (is_array($mediaMetadata)) {
            if ($mediaMetadata['.tag'] === 'photo') {
                //Media is Photo
                $this->mediaMetadata = new PhotoMetadata($mediaMetadata);
            } elseif ($mediaMetadata['.tag'] === 'video') {
                //Media is Video
                $this->mediaMetadata = new VideoMetadata($mediaMetadata);
            } else {
                //Unknown Media (Quite unlikely, though.)
                $this->mediaMetadata = new MediaMetadata($mediaMetadata);
            }
        }
    }
876663
def set_data(self, data):
        """"""
        for key, val in data.items():
            setattr(self, key, val)
        self.uptime['reloaded'] = datetime.now()
308055
public function set()
    {
        // Register term meta on Rest API.
        if (function_exists('current_filter') && 'init' === current_filter()) {
            call_user_func($this->register());
        } else {
            $this->action->add('init', $this->register());
        }

        // Display fields.
        $this->action->add($this->taxonomy->getName().'_add_form_fields', $this->outputAddFields());
        $this->action->add($this->taxonomy->getName().'_edit_form_fields', $this->outputEditFields());

        // Save fields values.
        $this->action->add([
            'create_'.$this->taxonomy->getName(),
            'edit_'.$this->taxonomy->getName()
        ], $this->save());
    }
594088
def set_metadata(self, metadata):
        
        if metadata is not None:
            metadata = np.array(metadata, copy=False).ravel()
        self.metadata = metadata
579424
def _setDatasets(self, metadata):
        """"""
        # Pull the lot into a list
        cols = list(self.getCSVReader(metadata))

        # sort the cols by view name and ordinal (they come sorted, but lets be sure)
        cols.sort(key=lambda x: [x['viewname'], int(x['ordinal'])])

        # Now group them by their viewname
        for key, grp in groupby(cols, key=lambda x: x["viewname"]):
            self.datasets[key] = list(grp)
358499
function Meta() {
  var self = this;

  var _meta = [];
  Object.defineProperty(self, "_meta", {
    get: function() {
      return _meta;
    },
    set: function(value) {
      if (_.isArray(value)) {
        _meta = value;
      }
    }
  });
}
706268
public function fill_meta($meta_data) {
	foreach ($meta_data as $key => $single_meta_data) {
		$this->add_meta($key, $single_meta_data);
	}
}
834986
protected function setImageMetadata()
    {
        $image = ImageFacade::make(
            $this->getFilePath()
        );

        $this->setMetadata('width', $image->width());
        $this->setMetadata('height', $image->height());
    }
81761
protected function setUpMetaTags()
    {
        $seo = $this->getSeo();

        if (null !== $seo) {
            $this->metaTitle = $seo->getMetaTitle();
            $this->metaDescription = $seo->getMetaDescription();
            $this->metaKeywords = $seo->getMetaKeywords();
        }
    }
1268836
protected function setMeta()
    {
        $this->getView()->Meta()->populateFromConfig(
            $this->getConfig()->get('meta')
        );

        $favicon = new Favicon();
        $favicon->setBaseDir(asset('images/favicon'));
        $favicon->addAll();
        $this->getView()->set('favicon', $favicon);
    }
826780
public static void initializeMetadata()
    {
        // TODO: merge inside meta API.
        DbConn cnx = null;
        try
        {
            cnx = Helpers.getNewDbSession();
            Helpers.updateConfiguration(cnx);
            cnx.commit();
        }
        catch (Exception e)
        {
            throw new JqmRuntimeException("Could not set metadata", e);
        }
        finally
        {
            Helpers.closeQuietly(cnx);
        }
    }