Add global meta data like document title or receiver name (when writing an email).
Some rules may use this information.
@since 3.9
507702
public AnnotatedTextBuilder addGlobalMetaData(AnnotatedText.MetaDataKey key, String value) {
    metaData.put(key, value);
    return this;
  }
160407
public void append(SimpleTypeInformation<?> meta, Object data) {
    this.meta.add(meta);
    this.contents.add(data);
  }
162781
public function add_meta( $meta_key, $meta_value ) {
		return add_metadata( $this->meta_type, $this->get_id(), $meta_key, $meta_value, true );
	}
1009485
public function add_attachment($message, $name =  "", $ctype =  "application/octet-stream", $encode =  "base64", $charset='', $contentid='') {
    $this->parts[] = array ( "ctype" => $ctype,
                             "message" => $message,
                             "encode" => $encode,
                             "name" => $name,
                             "charset" => $charset,
                             "contentid" => $contentid
                            );
  }
81204
function(name, title, attrs){
			if (!name) return (title || "");
			name = name.replace('::', '.prototype.');
			if (docMap[name]) {
				var attrsArr = [];
				for(var prop in attrs){
					attrsArr.push(prop+"=\""+attrs[prop]+"\"")
				}
				return '<a href="' + docsFilename(name, config) + '" '+attrsArr.join(" ")+'>' + (title || name ) + '</a>';
			} else {
				return title || name || "";
			}
		}
963391
private void addNewContact() {
		String name = newNameField.getText();
		if (name != null && !"".equals(name)) {
			List list = new ArrayList(repeater.getBeanList());
			list.add(new ContactDetails(name, null, new String[0]));
			repeater.setBeanList(list);
		}
		newNameField.setText("");
	}
1224074
def set_meta(self, meta_data):
        '''
        
        '''
        if not (isinstance(meta_data, ps.PMap) or isinstance(meta_data, IMap)):
            meta_data = ps.pmap(meta_data)
        new_cnode = copy.copy(self)
        object.__setattr__(new_cnode, 'meta_data', meta_data)
        return new_cnode
768335
def set_meta(self, instance):
        
        self.use_title_tag = True
        self.title = instance.title
1362921
private void addAllNamesIntoTrie() {
        for (Map.Entry<String, ZNames> entry : _tzNamesMap.entrySet()) {
            entry.getValue().addAsTimeZoneIntoTrie(entry.getKey(), _namesTrie);
        }
        for (Map.Entry<String, ZNames> entry : _mzNamesMap.entrySet()) {
            entry.getValue().addAsMetaZoneIntoTrie(entry.getKey(), _namesTrie);
        }
    }
123679
def add_doc_names_as_metadata(self, doc_names):
        '''
        
        '''
        if len(doc_names) != self.get_num_docs():
            raise Exception("The parameter doc_names contains %s elements. "
                            "It should have %s elements, one per document." % (len(doc_names), self.get_num_docs()))

        doc_names_counter = collections.Counter(np.array(doc_names))
        metafact = CSRMatrixFactory()
        metaidxstore = IndexStore()
        doc_id_uses = collections.Counter()
        for i in range(self.get_num_docs()):
            doc_id = doc_names[i]
            if doc_names_counter[doc_id] > 1:
                doc_id_uses[doc_id] += 1
                doc_name_idx = metaidxstore.getidx('%s (%s)' % (doc_id, doc_id_uses[doc_id]))
            else:
                doc_name_idx = metaidxstore.getidx(doc_id)
            metafact[i, i] = doc_name_idx
        return self.add_metadata(metafact.get_csr_matrix(), metaidxstore)
170881
private void appendSpellFields(I_CmsSearchDocument document) {

        /*
         * Add the content fields (multiple for contents with more than one locale)
         */
        // add the content_<locale> fields to this configuration
        String title = document.getFieldValueAsString(
            CmsPropertyDefinition.PROPERTY_TITLE + CmsSearchField.FIELD_DYNAMIC_PROPERTIES_DIRECT);
        document.addSearchField(
            new CmsSolrField(CmsSearchField.FIELD_SPELL, null, null, null),
            document.getFieldValueAsString(CmsSearchField.FIELD_CONTENT) + "\n" + title);
        for (Locale locale : OpenCms.getLocaleManager().getAvailableLocales()) {
            document.addSearchField(
                new CmsSolrField(locale + "_" + CmsSearchField.FIELD_SPELL, null, locale, null),
                document.getFieldValueAsString(
                    CmsSearchFieldConfiguration.getLocaleExtendedName(CmsSearchField.FIELD_CONTENT, locale))
                    + "\n"
                    + title);
        }
    }
233675
def add_metadata_to_archive(self, metadata, meta_path):
        '''
        
        '''
        archive_path = self.get_full_archive_path(meta_path.lstrip('/'))
        write_data_to_file(metadata, archive_path)
714282
private function AddNameField()
    {
        $name = 'Name';
        $field = Fields\Input::Text($name, $this->submit->GetName());
        $this->AddField($field);
        $this->SetRequired($name);
    }
1092128
def add(self, key, content, **metadata):
        
        self.members.add(key)
        document_hash = self._get_hash(key)
        document_hash.update(content=content, **metadata)

        for word, score in self.tokenizer.tokenize(content).items():
            word_key = self.get_key(word)
            word_key[key] = -score
335151
private function AddMailFromEMailField()
    {
        $name = 'MailFromEMail';
        $field = Input::Text($name, $this->settings->GetMailFromEMail());
        $this->AddField($field);
        $this->AddValidator($name, PhpFilter::EMail());
    }
693202
private function AddMailText1Field()
    {
        $name = 'MailText1';
        $this->AddRichTextField($name, $this->changeMail->GetMailText1());
        $this->SetRequired($name);
    }
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