Create the map between the custom item id and its node.

@return the map between an item id ands its custom node
344991
private Map<String, TreeItemIdNode> createCustomIdNodeMapping() {
		TreeItemIdNode custom = getCustomTree();
		if (custom == null) {
			return Collections.EMPTY_MAP;
		}

		Map<String, TreeItemIdNode> map = new HashMap<>();
		processCustomIdNodeMapping(map, custom);
		return Collections.unmodifiableMap(map);
	}
448579
public CmsSitemapTreeItem createSitemapItem(CmsClientSitemapEntry entry) {

        CmsSitemapTreeItem result = create(entry);
        result.clearChildren();
        for (CmsClientSitemapEntry child : entry.getSubEntries()) {
            CmsSitemapTreeItem childItem = createSitemapItem(child);
            if (!entry.isSubSitemapType()) {
                result.addChild(childItem);
            }
        }
        if (entry.getChildrenLoadedInitially()) {
            result.onFinishLoading();
        }
        return result;
    }
317857
public Map<String, Object> asMap() {
        Map<String, Object> map = new HashMap<>();
        map.putAll(defaultProperties);
        map.putAll(customProperties);
        return map;
    }
401006
public Map<String, String> toMap() {
		Map<String, String> map = new HashMap<String, String>();
		
		map.put("id", Integer.toString(id));
		map.put("status", Integer.toString(status));
		map.put("content", content);
		
		return map;
	}
288872
private Object newMap(Object obj, Element node) throws Exception {
		String id = getAttribute(node, "id");

		Map<Object, Object> map = new HashMap<>();
		if (id != null) {
			_idMap.put(id, map);
		}

		Element[] children = getChildren(node);
		for (int i = 0; i < children.length; i++) {

			Element element = children[i];

			if (!element.getTagName().equals("Entry")) {
				throw new IllegalStateException("Not an Entry");
			}

			Element key = null;
			Element value = null;

			Element[] entries = getChildren(element);
			for (int j = 0; j < entries.length; j++) {
				Element item = entries[j];
				if (!item.getTagName().equals("Item")) {
					throw new IllegalStateException("Not an Item");
				}
				if (key == null) {
					key = item;
				} else {
					value = item;
				}
			}

			if (key == null || value == null) {
				throw new IllegalStateException("Missing Item in Entry");
			}
			String kid = getAttribute(key, "id");
			String vid = getAttribute(value, "id");

			Object k = value(obj, key);
			Object v = value(obj, value);
			map.put(k, v);

			if (kid != null) {
				_idMap.put(kid, k);
			}
			if (vid != null) {
				_idMap.put(vid, v);
			}
		}

		return map;
	}
549066
public static LinkedHashMap<String, String> getSearchWidgetMapping() {
		LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
		for (SearchWidgetCreator swc : REGISTRY.values()) {
			map.put(swc.getSearchWidgetId(), swc.getSearchWidgetName());
		}
		return map;
	}
1281368
public Map<String, List<Item>> getTableItems() {
        Map<String, List<Map<String, AttributeValue>>> res = 
            result.getResponses();
        Map<String, List<Item>> map = new LinkedHashMap<String, List<Item>>(res.size());
        for (Map.Entry<String, List<Map<String, AttributeValue>>> e 
                : res.entrySet()) {
            String tableName = e.getKey();
            List<Map<String, AttributeValue>> items = e.getValue();
            map.put(tableName, InternalUtils.toItemList(items));
        }
        return map;
    }
1349687
public TreeMap<Character, ? extends TrieNode> getChildrenMap() {
    TreeMap<Character, TrieNode> map = new TreeMap<>();
    getChildren().forEach(x -> map.put(x.getChar(), x));
    return map;
  }
1040433
public PartitionMapper<Partition<T>> getOrCreateMapper()
   {
      Node node = childNode.getOrCreate("mapper");
      PartitionMapper<Partition<T>> mapper = new PartitionMapperImpl<Partition<T>>(this, "mapper", childNode, node);
      return mapper;
   }
483413
public boolean addProposedItem(final ItemsNodeInterval newNode) {
        Preconditions.checkState(newNode.getItems().size() == 1, "Invalid node=%s", newNode);
        final Item item = newNode.getItems().get(0);

        return addNode(newNode, new AddNodeCallback() {
            @Override
            public boolean onExistingNode(final NodeInterval existingNode) {
                // If we receive a new proposed that is the same kind as the reversed existing (current node),
                // we match existing and proposed. If not, we keep the proposed item as-is outside of the tree.
                if (isSameKind((ItemsNodeInterval) existingNode)) {
                    final ItemsInterval existingOrNewNodeItems = ((ItemsNodeInterval) existingNode).getItemsInterval();
                    existingOrNewNodeItems.cancelItems(item);
                    return true;
                } else {
                    return false;
                }
            }

            @Override
            public boolean shouldInsertNode(final NodeInterval insertionNode) {
                // At this stage, we're currently merging a proposed item that does not fit any of the existing intervals.
                // If this new node is about to be inserted at the root level, this means the proposed item overlaps any
                // existing item. We keep these as-is, outside of the tree: they will become part of the resulting list.
                if (insertionNode.isRoot()) {
                    return false;
                }

                // If we receive a new proposed that is the same kind as the reversed existing (parent node),
                // we want to insert it to generate a piece of repair (see SubscriptionItemTree#buildForMerge).
                // If not, we keep the proposed item as-is outside of the tree.
                return isSameKind((ItemsNodeInterval) insertionNode);
            }

            private boolean isSameKind(final ItemsNodeInterval insertionNode) {
                final List<Item> insertionNodeItems = insertionNode.getItems();
                Preconditions.checkState(insertionNodeItems.size() == 1, "Expected existing node to have only one item");
                final Item insertionNodeItem = insertionNodeItems.get(0);
                return insertionNodeItem.isSameKind(item);
            }
        });
    }
364190
public static <V> Map<SNode, V> createSNodeMapFromIDs(Map<String, V> map,
    SDocumentGraph graph)
  {
    HashMap<SNode, V> result = new LinkedHashMap<>();

    if (map != null && graph != null)
    {
      for (Map.Entry<String, V> e : map.entrySet())
      {
        SNode n = graph.getNode(e.getKey());
        if (n != null)
        {
          result.put(n, e.getValue());
        }
      }
    }

    return result;
  }
842709
public MapKey<OneToMany<T>> getOrCreateMapKey()
   {
      Node node = childNode.getOrCreate("map-key");
      MapKey<OneToMany<T>> mapKey = new MapKeyImpl<OneToMany<T>>(this, "map-key", childNode, node);
      return mapKey;
   }
1014701
public function getNodeMap()
    {
        foreach ($this->flow->getNodes() as $node) {
            $nodeId = $node->getId();
            if ($node instanceof BranchNodeInterface || $node instanceof AggregateNodeInterface) {
                $this->nodeMap[$nodeId]['nodes'] = $node->getPayload()->getNodeMap();
                continue;
            }
        }

        return $this->nodeMap;
    }
205652
public static <K,V> MapFactory<K,V> noCompTree() {
	return new MapFactory<K,V>() {
    	    
            private static final long serialVersionUID = 5687187370812696757L;

	    public Map<K,V> create() { return new NoCompTreeMap<K,V>(); }
	    
	    public Map<K,V> create(Map<K,V> m) {
		if(m instanceof NoCompTreeMap/*<K,V>*/) {
		    return ((NoCompTreeMap<K,V>) m).clone();
		}
		return super.create(m);
	    }
	};
    }
771141
private Map<String, List<Integer>> createExpandedCustomIdIndexMapping(final boolean expandedOnly) {
		TreeItemIdNode custom = getCustomTree();
		if (custom == null) {
			return Collections.EMPTY_MAP;
		}

		Set<String> expanded = null;
		if (expandedOnly) {
			expanded = getExpandedRows();
		}

		Map<String, List<Integer>> map = new HashMap<>();
		processExpandedCustomIdIndexMapping(custom, expanded, map);
		return Collections.unmodifiableMap(map);
	}
1024878
public DMap newDMap()
    {
        if ((getCurrentDatabase() == null))
        {
            throw new DatabaseClosedException("Database is NULL, cannot create a DMap with a null database.");
        }
        return (DMap) DMapFactory.singleton.createCollectionOrMap(getCurrentPBKey());
    }
1102652
private void processCustomIdNodeMapping(final Map<String, TreeItemIdNode> map, final TreeItemIdNode node) {
		String itemId = node.getItemId();
		if (!Util.empty(itemId)) {
			map.put(itemId, node);
		}

		for (TreeItemIdNode childItem : node.getChildren()) {
			processCustomIdNodeMapping(map, childItem);
		}
	}