Add DiscoverInfo to the database.

@param nodeVer
The node and verification String (e.g.
"http://psi-im.org#q07IKJEyjvHSyhy//CH0CxmKi8w=").
@param info
DiscoverInfo for the specified node.
977485
static void addDiscoverInfoByNode(String nodeVer, DiscoverInfo info) {
        CAPS_CACHE.put(nodeVer, info);

        if (persistentCache != null)
            persistentCache.addDiscoverInfoByNodePersistent(nodeVer, info);
    }
71353
protected void addNode(ClusterNode node,
                         Map<ResourceType, String> resourceInfos) {
    synchronized (node) {
      // 1: primary
      nameToNode.put(node.getName(), node);
      faultManager.addNode(node.getName(), resourceInfos.keySet());
      nameToApps.put(node.getName(), resourceInfos);
      hostsToSessions.put(node, new HashSet<String>());
      clusterManager.getMetrics().restartTaskTracker(1);
      setAliveDeadMetrics();

      // 2: update runnable indices
      for (Map.Entry<ResourceType, RunnableIndices> entry :
          typeToIndices.entrySet()) {
        ResourceType type = entry.getKey();
        if (resourceInfos.containsKey(type)) {
          if (node.checkForGrant(Utilities.getUnitResourceRequest(type),
                                 resourceLimit)) {
            RunnableIndices r = entry.getValue();
            r.addRunnable(node);
          }
        }
      }
    }
  }
591126
public void put_server_info(Database database, DbServInfo info) throws DevFailed {
        if (!database.isAccess_checked()) checkAccess(database);

        String[] array;
        array = new String[4];
        array[0] = info.name;
        array[1] = info.host;
        array[2] = (info.controlled) ? "1" : "0";
        array[3] = Integer.toString(info.startup_level);

		/*System.out.println("DbPutServerInfo:");
		for (int i=0 ; i<array.length ; i++)
			System.out.println("	"+array[i]);
		*/

        //	Query info from database
        DeviceData argIn = new DeviceData();
        argIn.insert(array);
        command_inout(database, "DbPutServerInfo", argIn);
    }
155975
private static void writeInfoToFile(File file, DiscoverInfo info) throws IOException {
        try (DataOutputStream dos = new DataOutputStream(new FileOutputStream(file))) {
            dos.writeUTF(info.toXML().toString());
        }
    }
24671
private static void processNetwork(ShowInfo showInfo, Element eShowInfo) {
        NodeList nlNetwork = eShowInfo.getElementsByTagName("network");
        for (int nodeLoop = 0; nodeLoop < nlNetwork.getLength(); nodeLoop++) {
            Node nShowInfo = nlNetwork.item(nodeLoop);
            if (nShowInfo.getNodeType() == Node.ELEMENT_NODE) {
                Element eNetwork = (Element) nShowInfo;
                CountryDetail newNetwork = new CountryDetail();
                newNetwork.setCountry(eNetwork.getAttribute(COUNTRY));
                newNetwork.setDetail(eNetwork.getTextContent());
                showInfo.addNetwork(newNetwork);
            }
        }
    }
950896
def add_node(self, node_id, name, labels):
        
        node = self.graph_db.get_or_create_indexed_node('Node', 'node_id', node_id, {'node_id': node_id, 'name': name})
        try:
            node.add_labels(*labels)
        except NotImplementedError:
            pass
131665
public function addInfo($info) : void
    {
        Assert::isInstanceOfAny($info, [Chunk::class, KeyInfo::class]);
        $this->info[] = $info;
    }
1068020
public static void addEvidence(Network bn, String nodeName, String status)
            throws ShanksException {

        if (bn == null || nodeName == null || status == null) {
            throw new ShanksException("Null parameter in addEvidence method.");
        }
        try {
            if (!bn.isPropagatedEvidence(nodeName)) {
                if (bn.isRealEvidence(nodeName)) {
                    bn.clearEvidence(nodeName);
                }
                bn.setEvidence(nodeName, status);
                bn.updateBeliefs();
            }
        } catch (Exception e) {
            bn.updateBeliefs();
            HashMap<String, Float> belief = ShanksAgentBayesianReasoningCapability
                    .getNodeStatesHypotheses(bn, nodeName);

            String msg = e.getMessage() + " -> values for node: " + nodeName
                    + " -> ";
            boolean zeroBel = false;
            for (Entry<String, Float> entry : belief.entrySet()) {
                if (status.equals(entry.getKey()) && entry.getValue() == 0.0f) {
                    zeroBel = true;
                    // Impossible value calculated by inference (this is because the BN is a big shit...
                    // But it is not a real error...
                    break;
                }
                msg = msg + entry.getKey() + "-" + entry.getValue() + " ";
            }
            if (!zeroBel) {
                throw new ShanksException(msg);
            }
        }
    }
341596
public void updateInfo(Info info) {
        BoxAPIConnection api = this.getAPI();
        URL url = COLLABORATION_URL_TEMPLATE.build(api.getBaseURL(), this.getID());

        BoxJSONRequest request = new BoxJSONRequest(api, url, "PUT");
        request.setBody(info.getPendingChanges());
        BoxAPIResponse boxAPIResponse = request.send();

        if (boxAPIResponse instanceof BoxJSONResponse) {
            BoxJSONResponse response = (BoxJSONResponse) boxAPIResponse;
            JsonObject jsonObject = JsonObject.readFrom(response.getJSON());
            info.update(jsonObject);
        }
    }
1264197
public synchronized void addDiscoverInfoTo(DiscoverInfo response) {
        // First add the identities of the connection
        response.addIdentities(getIdentities());

        // Add the registered features to the response
        for (String feature : getFeatures()) {
            response.addFeature(feature);
        }
        response.addExtension(extendedInfo);
    }
368607
public void setUpSiteInfo(Query query) {
    General general = query.getGeneral();
    siteinfo = new SiteInfoImpl(general, query.getNamespaces());
  }
480286
public void add(final T node) {
        if ( this.firstNode == null ) {
            this.firstNode = node;
            this.lastNode = node;
        } else {
            this.lastNode.setNext( node );
            node.setPrevious( this.lastNode );
            this.lastNode = node;
        }
        this.size++;
    }
234217
boolean addNode(Block b, DatanodeDescriptor node, int replication) {
    // insert into the map if not there yet
    BlockInfo info = checkBlockInfo(b, replication);
    // add block to the data-node list and the node to the block info
    return node.addBlock(info);
  }
125373
private void addInfoElements(Element infoElement)
    {
        Element el = new DOMElement("name");
        el.addText(this.project.getName());
        infoElement.add(el);

        el = new DOMElement("description");
        String description = this.project.getDescription();
        if (description == null) {
            el.addText("");
        } else {
            el.addText(description);
        }
        infoElement.add(el);

        el = new DOMElement("licence");
        el.addText("");
        infoElement.add(el);

        el = new DOMElement("author");
        el.addText("XWiki.Admin");
        infoElement.add(el);

        el = new DOMElement("extensionId");
        el.addText(this.project.getGroupId() + ':' + this.project.getArtifactId());
        infoElement.add(el);

        el = new DOMElement("version");
        el.addText(this.project.getVersion());
        infoElement.add(el);

        el = new DOMElement("backupPack");
        el.addText("false");
        infoElement.add(el);
    }
145648
private void addAnnotationInfo(Element element, List<? extends AnnotationMirror> descList,
            Content htmltree) {
        addAnnotationInfo(0, element, descList, true, htmltree);
    }
903019
private void addInformationFromESN(EntitySrcNat esn, int eId, EntityInfo c) {

		c.setAtcc(esn.getPdbx_atcc());
		c.setCell(esn.getPdbx_cell());
		c.setOrganismCommon(esn.getCommon_name());
		c.setOrganismScientific(esn.getPdbx_organism_scientific());
		c.setOrganismTaxId(esn.getPdbx_ncbi_taxonomy_id());

	}
1076472
public void add(Node node) {
    if (node==null) return;
    if( node instanceof InnerNode ) {
      throw new IllegalArgumentException(
        "Not allow to add an inner node: "+NodeBase.getPath(node));
    }
    netlock.writeLock().lock();
    try {
      Node rack = getNode(node.getNetworkLocation());
      if (rack != null && !(rack instanceof InnerNode)) {
        throw new IllegalArgumentException("Unexpected data node " 
                                           + node.toString() 
                                           + " at an illegal network location");
      }
      if (clusterMap.add(node)) {
        LOG.info("Adding a new node: "+NodeBase.getPath(node));
        if (rack == null) {
          String rackName = node.getNetworkLocation();
          if (!racks.contains(rackName)) {
            racks.add(rackName);
          } else {
            LOG.error("Discrepancy between network topology and list of racks. "
                + "New rack was already in the list of racks: " + rackName);
          }
        }
      }
      LOG.debug("NetworkTopology became:\n" + this.toString());
    } finally {
      netlock.writeLock().unlock();
    }
  }