Push information from topicmeta in the map into the corresponding topics and maps.
503916
private void pushMetadata(final Map<URI, Map<String, Element>> mapSet) {
        if (!mapSet.isEmpty()) {
            //process map first
            final DitaMapMetaWriter mapInserter = new DitaMapMetaWriter();
            mapInserter.setLogger(logger);
            mapInserter.setJob(job);
            for (final Entry<URI, Map<String, Element>> entry : mapSet.entrySet()) {
                final URI key = stripFragment(entry.getKey());
                final FileInfo fi = job.getFileInfo(key);
                if (fi == null) {
                    logger.error("File " + new File(job.tempDir, key.getPath()) + " was not found.");
                    continue;
                }
                final URI targetFileName = job.tempDirURI.resolve(fi.uri);
                assert targetFileName.isAbsolute();
                if (fi.format != null && ATTR_FORMAT_VALUE_DITAMAP.equals(fi.format)) {
                    mapInserter.setMetaTable(entry.getValue());
                    if (toFile(targetFileName).exists()) {
                        logger.info("Processing " + targetFileName);
                        mapInserter.read(toFile(targetFileName));
                    } else {
                        logger.error("File " + targetFileName + " does not exist");
                    }

                }
            }
            //process topic
            final DitaMetaWriter topicInserter = new DitaMetaWriter();
            topicInserter.setLogger(logger);
            topicInserter.setJob(job);
            for (final Entry<URI, Map<String, Element>> entry : mapSet.entrySet()) {
                final URI key = stripFragment(entry.getKey());
                final FileInfo fi = job.getFileInfo(key);
                if (fi == null) {
                    logger.error("File " + new File(job.tempDir, key.getPath()) + " was not found.");
                    continue;
                }
                final URI targetFileName = job.tempDirURI.resolve(fi.uri);
                assert targetFileName.isAbsolute();
                if (fi.format == null || fi.format.equals(ATTR_FORMAT_VALUE_DITA)) {
                    final String topicid = entry.getKey().getFragment();
                    topicInserter.setTopicId(topicid);
                    topicInserter.setMetaTable(entry.getValue());
                    if (toFile(targetFileName).exists()) {
                        topicInserter.read(toFile(targetFileName));
                    } else {
                        logger.error("File " + targetFileName + " does not exist");
                    }

                }
            }
        }
    }
914559
private static Map<String, LinkAndRels> urlRelMap(Links links) {

		Map<String, LinkAndRels> urlRelMap = new LinkedHashMap<>();

		links.forEach(link -> {
			LinkAndRels linkAndRels = urlRelMap.computeIfAbsent(link.getHref(), s -> new LinkAndRels());
			linkAndRels.setLink(link);
			linkAndRels.getRels().add(link.getRel());
		});

		return urlRelMap;
	}
378044
def _create_request_map(cls, input_map):
        """"""
        field_map = cls._get_attributes_map()
        return {field_map[k]: v for k, v in input_map.items() if k in field_map}
1316948
function addBannerToSourcemap (chunk, enc, next) {
      let pushed = false;

      if (banner) {
        // Get the sourcemap, once it exists
        let conv = convertSourcemap.fromSource(chunk.toString("utf8"));
        if (conv) {
          // Offset the sourcemap by the number of lines in the banner
          let offsetMap = offsetSourcemap(conv.toObject(), countLines(banner));
          this.push(new Buffer("\n" + convertSourcemap.fromObject(offsetMap).toComment() + "\n"));
          pushed = true;
        }
      }

      if (!pushed) {
        // This chunk doesn't contain anything for us to modify,
        // so just pass it along as-is
        this.push(chunk);
      }
      next();
    }
571552
public final void pushPair(int v1, int v2)
  {

    if (null == m_map)
    {
      m_map = new int[m_blocksize];
      m_mapSize = m_blocksize;
    }
    else
    {
      if ((m_firstFree + 2) >= m_mapSize)
      {
        m_mapSize += m_blocksize;

        int newMap[] = new int[m_mapSize];

        System.arraycopy(m_map, 0, newMap, 0, m_firstFree);

        m_map = newMap;
      }
    }

    m_map[m_firstFree] = v1;
    m_map[m_firstFree + 1] = v2;
    m_firstFree += 2;
  }
1125818
def push(self):
        """"""

        tx = Tx(self.tx_project_slug)

        # asssemble the template catalog
        template = babel.messages.catalog.Catalog()
        for topic in self.desk.topics():
            if topic.show_in_portal:
                template.add(topic.name)

        # serialize the catalog as a PO file
        template_po = StringIO()
        babel.messages.pofile.write_po(template_po, template)

        # upload/update the catalog resource
        tx.create_or_update_resource(
            self.TOPIC_STRINGS_SLUG,
            DEFAULT_SOURCE_LANGUAGE,
            "Help Center Topics",
            template_po.getvalue(),
            i18n_type='PO',
            project_slug=self.tx_project_slug,
        )
783066
def convert_items(data, mapping):
    
    new_recs = []
    for rec in data:
        new_rec = map_magic.mapping(rec, mapping)
        new_recs.append(new_rec)
    return new_recs
1257830
def topic_metadata(topic_names)
      ensure_connected
      req = MetadataRequest.new( request_common(:metadata),
                                 topic_names)
      send_request(req)
      read_response(MetadataResponse)
    end
964624
def map_data(self, map_name):
    """"""
    with gfile.Open(os.path.join(self.data_dir, "Maps", map_name), "rb") as f:
      return f.read()
624813
def add_to_map(map_obj, lat, lon, date_time, key, cluster_obj):
        """"""
        text = "Event {0} at {1}".format(key, date_time.split()[1])
        folium.Marker([lat, lon], popup=text).add_to(cluster_obj)
638589
public void putMap (Map<String,String> map) {                                                       //SIB0163.comms.1
     if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "putMap", "map="+map);

     if (map != null) {
       final Set<String> keys = map.keySet();
       putShort(keys.size()); // Number of entries
       for (String k: keys) {
         putString(k);
         putString(map.get(k));
       }
     } else {
       putShort(0);
     }

     if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "putMap");
   }
348889
function putMeta(key, value) {
  const { schema, table } = findSchemaAndTable(key),
    map = columnToValueMap('id', key);

  // add meta column to map
  columnToValueMap('meta', parseOrNot(value), map);

  return onConflictPut(map, schema, table).then(() => map.meta);
}
298474
function store(key, info) {
        var items = nodes[key];
        if (!items) {
            items = nodes[key] = [];
        }
        items.push(info);
    }
64440
private void setAddInfoMaps() {

        m_addInfoEditable = new TreeMap<String, Object>();
        m_addInfoReadOnly = new TreeMap<String, Object>();
        Iterator<Entry<String, Object>> itEntries = m_user.getAdditionalInfo().entrySet().iterator();
        while (itEntries.hasNext()) {
            Entry<String, Object> entry = itEntries.next();
            String key = entry.getKey().toString();
            if ((entry.getValue() == null) || CmsStringUtil.isEmptyOrWhitespaceOnly(entry.getValue().toString())) {
                // skip empty entries
                continue;
            }
            if (!entry.getValue().getClass().equals(String.class)) {
                // only show type different to string
                key += "@" + entry.getValue().getClass().getName();
            }
            if (CmsDataTypeUtil.isParseable(entry.getValue().getClass())) {
                m_addInfoEditable.put(key, entry.getValue());
            } else {
                String value = entry.getValue().toString();
                if (value.length() > (75 - key.length())) {
                    if ((75 - key.length()) > 5) {
                        value = value.substring(0, (75 - key.length())) + " ...";
                    } else {
                        value = "...";
                    }
                }
                m_addInfoReadOnly.put(key, value);
            }
        }
    }
917714
protected void populateDatabaseTopics(final BuildData buildData,
            final Map<String, BaseTopicWrapper<?>> topics) throws BuildProcessingException {
        final List<TopicWrapper> allTopics = new ArrayList<TopicWrapper>();
        final List<TopicWrapper> latestTopics = new ArrayList<TopicWrapper>();
        final List<TopicWrapper> revisionTopics = new ArrayList<TopicWrapper>();

        // Calculate the ids of all the topics to get
        final List<ITopicNode> topicNodes = buildData.getContentSpec().getAllTopicNodes();
        for (final ITopicNode topicNode : topicNodes) {
            // Determine which topics we need to fetch the latest topics for and which topics we need to fetch revisions for.
            final TopicWrapper topic;
            if (topicNode.getRevision() != null && !buildData.getBuildOptions().getUseLatestVersions()) {
                topic = topicProvider.getTopic(topicNode.getDBId(), topicNode.getRevision());
                revisionTopics.add(topic);
                allTopics.add(topic);
            } else if (buildData.getBuildOptions().getMaxRevision() != null && !buildData.getBuildOptions().getUseLatestVersions()) {
                topic = topicProvider.getTopic(topicNode.getDBId(), buildData.getBuildOptions().getMaxRevision());
                revisionTopics.add(topic);
                allTopics.add(topic);
            } else {
                topic = topicProvider.getTopic(topicNode.getDBId());
                latestTopics.add(topic);
                allTopics.add(topic);
            }

            // Add the topic to the topics collection
            final String key = DocBookBuildUtilities.getTopicBuildKey(topic);
            topics.put(key, topic);
            buildData.getBuildDatabase().add(topicNode, key);
        }
    }
845279
public void map(Story story, MetaFilter metaFilter) {
        if (metaFilter.allow(story.getMeta())) {
            boolean allowed = false;
            for (Scenario scenario : story.getScenarios()) {
                // scenario also inherits meta from story
                Meta inherited = scenario.getMeta().inheritFrom(story.getMeta());
                if (metaFilter.allow(inherited)) {
                    allowed = true;
                    break;
                }
            }
            if (allowed) {
                add(metaFilter.asString(), story);
            }
        }
    }
40390
public void moveMapInfo(Map<String,Object> mapReplyHeader, Map<String,Object> mapInHeader, String strReplyParam, String strInParam)
    {
        if (mapInHeader != null)
            if (mapInHeader.get(strInParam) != null)
                if (mapReplyHeader != null)
                    mapReplyHeader.put(strReplyParam, mapInHeader.get(strInParam));
    }