Based on which conditions are met, corresponding metadata is set on the object.
976827
public function setConditionalMeta()
    {
        foreach ($this->__conditions as $objCondition) {
            $blnResult = $objCondition->isMet();

            switch ($objCondition->getProperty()) {
                case "visible":
                    // This can be applied on all sorts of subjects.
                    if ($blnResult) {
                        if ($objCondition->getValue()) {
                            $this->setMeta("style", "display: block;");
                        } else {
                            $this->setMeta("style", "display: none;");
                        }
                    } else {
                        if ($objCondition->getValue()) {
                            $this->setMeta("style", "display: none;");
                        } else {
                            $this->setMeta("style", "display: block;");
                        }
                    }
                    // Continueing to the required property.
                case "required":
                    // This can only be applied on all subjects except for Paragraphs
                    if (get_class($objCondition->getSubject()) !== "ValidFormBuilder\\Paragraph") {
                        if ($blnResult) {
                            if ($objCondition->getValue()) {
                                if (get_class($this) !== "ValidFormBuilder\\Fieldset") {
                                    // TODO Disabled because it messes up multifields.
                                    // $this->setMeta("class", "vf__required", true);
                                }
                            } else {
                                if (get_class($this) !== "ValidFormBuilder\\Fieldset") {
                                    // TODO Disabled because it messes up multifields.
                                    // $this->setMeta("class", "vf__optional", true);
                                }
                            }
                        } else {
                            if ($objCondition->getValue()) {
                                if (get_class($this) !== "ValidFormBuilder\\Fieldset") {
                                    // TODO Disabled because it messes up multifields.
                                    // $this->setMeta("class", "vf__optional", true);
                                }
                            } else {
                                if (get_class($this) !== "ValidFormBuilder\\Fieldset") {
                                    // TODO Disabled because it messes up multifields.
                                    // $this->setMeta("class", "vf__required", true);
                                }
                            }
                        }
                    }

                    break;
                case "enabled":
                    // This can only be applied on all subjects except for Paragraphs and Groups
                    if (get_class($objCondition->getSubject()) !== "ValidFormBuilder\\Paragraph"
                            && get_class($objCondition->getSubject()) !== "ValidFormBuilder\\Group") {
                        if ($blnResult) {
                            if ($objCondition->getValue()) {
                                $this->setFieldMeta("disabled", "", true);
                            } else {
                                $this->setFieldMeta("disabled", "disabled", true);
                            }
                        } else {
                            if ($objCondition->getValue()) {
                                $this->setFieldMeta("disabled", "disabled", true);
                            } else {
                                $this->setFieldMeta("disabled", "", true);
                            }
                        }
                    }

                    break;
            }
        }
    }
978365
public function setMetadata($key, $value)
    {
        if (is_null($this->metadataCache))
        {
            $this->metadataCache = [];
        }

        $this->metadataCache[$key] = $value;
    }
976129
def build_property_metadata(props, keys=[])
    metadata = {}
    props.each do |property_element|
      prop_meta = PropertyMetadata.new(property_element)
      prop_meta.is_key = keys.include?(prop_meta.name)

      # If this is a navigation property, we need to add the association to the property metadata
      prop_meta.association = Association.new(property_element, @edmx) if prop_meta.nav_prop
      metadata[prop_meta.name] = prop_meta
    end
    metadata
  end
934902
def make_meta_dict_consistent(self):
        
        if self.meta_dict is None:
            self.meta_dict = {}

        if "galaxy_info" not in self.meta_dict:
            self.meta_dict["galaxy_info"] = {}

        if "dependencies" not in self.meta_dict:
            self.meta_dict["dependencies"] = []

        if "ansigenome_info" not in self.meta_dict:
            self.meta_dict["ansigenome_info"] = {}
119917
public static void setProperties(Object object, Map map) {
        MetaClass mc = getMetaClass(object);
        for (Object o : map.entrySet()) {
            Map.Entry entry = (Map.Entry) o;
            String key = entry.getKey().toString();
            Object value = entry.getValue();
            setPropertySafe(object, mc, key, value);
        }
    }
607470
def _init_metadata(self, **kwargs):
        """"""
        osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
        self._level_default = self._mdata['level']['default_id_values'][0]
        self._start_time_default = self._mdata['start_time']['default_date_time_values'][0]
        self._grade_system_default = self._mdata['grade_system']['default_id_values'][0]
        self._items_shuffled_default = self._mdata['items_shuffled']['default_boolean_values'][0]
        self._score_system_default = self._mdata['score_system']['default_id_values'][0]
        self._deadline_default = self._mdata['deadline']['default_date_time_values'][0]
        self._duration_default = self._mdata['duration']['default_duration_values'][0]
        self._items_sequential_default = self._mdata['items_sequential']['default_boolean_values'][0]
878921
def set_metadata_if_none(self, metadata: MetaData) -> None:
        
        self._parent.set_metadata_if_none(metadata)
        self._child.set_metadata_if_none(metadata)
1295583
public void set(Object target, Object value) throws MetadataException
    {
        // if target null, we have nothing to do
        if(target == null) return;
        Object current = target;
        if (isNestedField())
        {
            List fields = getFieldsList();
            int size = fields.size() - 1;
            Field field;
            for (int i = 0; i < size; i++)
            {
                field = (Field) fields.get(i);
                Object attribute;
                try
                {
                    attribute = getValueFrom(field, current);
                }
                catch (Exception e)
                {
                    throw new MetadataException("Can't read field '" + field.getName() + "' of type " + field.getType().getName(), e);
                }
                if (attribute != null || value != null)
                {
                    // if the intermediary nested object is null, we have to create
                    // a new instance to set the value
                    if (attribute == null)
                    {
                        try
                        {
                            attribute = ClassHelper.newInstance(field.getType());
                        }
                        catch (Exception e)
                        {
                            throw new MetadataException("Can't create nested object of type '"
                                    + field.getType() + "' for field '"
                                    + field.getName() + "'", e);
                        }
                    }
                    try
                    {
                        //field.set(current, attribute);
                        setValueFor(field, current, attribute);
                    }
                    //catch (IllegalAccessException e)
                    catch (Exception e)
                    {
                        throw new MetadataException("Can't set nested object of type '"
                                    + field.getType() + "' for field '"
                                    + field.getName() + "'", e);
                    }
                }
                else
                {
                    return;
                }
                current = attribute;
            }
        }
        setValueFor(getField(), current, value);
    }
977901
public function metaData()
    {
        Meta::setTitle($this->title)
            ->set("description", $this->about)
            ->set("og:type", "website", "property")
            ->set("og:title", $this->title, "property")
            ->set("og:description", $this->description, "property")
            ->set("og:url", $this->href, "property")
            ->setImageOG(($this->hasFeaturedImage() ? $this->featuredImage : null))
            ->setCanonical($this->href)
            ->setWildcards(
                [
                '{{title}}' => $this->title,
                '{{sitename}}' => settings('siteTitle')
                ]
            );
    }
621825
public function metaData()
    {
        Meta::setTitle($this->title)
          ->set("description", $this->description)
          ->set("og:type", "profile", "property")
          ->set("og:title", $this->title, "property")
          ->set("og:description", $this->description, "property")
          ->set("og:url", $this->href, "property")
          ->setCanonical($this->href)
          ->setHrefLangData($this)
        ->setWildcards(
            [
            '{{title}}' => $this->title,
            '{{sitename}}' => settings('siteTitle')
              ]
        );
    }
1305944
def setSizeMetadata(self, size):
    
    assert((self.needMetadataUpdate(CoverImageMetadata.SIZE)) or
           (self.size == size))
    self.size = size
    self.check_metadata &= ~CoverImageMetadata.SIZE
859659
def objects_to_record(self):
        """"""

        o = self.get_object()

        o.about = self._bundle.metadata.about
        o.identity = self._dataset.identity.ident_dict
        o.names = self._dataset.identity.names_dict
        o.contacts = self._bundle.metadata.contacts

        self.set_object(o)
701331
protected function setup_metadata() {
		if ( ! $this->meta_type ) {
			return;
		}

		$metadata = $this->get_metadata();
		foreach ( $this->get_mapping() as $attribute => $meta ) {
			if ( isset( $metadata[ $meta ] ) ) {
				$this->set_attribute( $attribute, $metadata[ $meta ] );
			}
		}
	}
358499
function Meta() {
  var self = this;

  var _meta = [];
  Object.defineProperty(self, "_meta", {
    get: function() {
      return _meta;
    },
    set: function(value) {
      if (_.isArray(value)) {
        _meta = value;
      }
    }
  });
}
1372002
def _is_metadata_of(group, parent_group):
    """"""
    if group._v_depth <= parent_group._v_depth:
        return False

    current = group
    while current._v_depth > 1:
        parent = current._v_parent
        if parent == parent_group and current._v_name == 'meta':
            return True
        current = current._v_parent
    return False
1236086
def metadata=(metadata)
      @metadata = metadata.map { |k, str| [k, str.to_s] }.to_h
    end
1366347
def _init_metadata(self, **kwargs):
        """"""
        osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
        self._cognitive_process_default = self._mdata['cognitive_process']['default_id_values'][0]
        self._assessment_default = self._mdata['assessment']['default_id_values'][0]
        self._knowledge_category_default = self._mdata['knowledge_category']['default_id_values'][0]