Sets the node identifier.

@param id the node identifier
@return the node configuration
489585
public NodeConfig setId(NodeId id) {
    this.id = id != null ? id : NodeId.anonymous();
    return this;
  }
385359
public function setNodeTypeByKey($id)
    {
        $nodeType = NodeType::findOrFail($id);

        $this->nodeType()->associate($nodeType);

        $this->mailing = $nodeType->isTypeMailing();
    }
732744
@SuppressWarnings("unchecked")
  public <T extends CMAResource> T setId(String id) {
    getSystem().setId(id);
    return (T) this;
  }
406073
public <O extends Schema> O setId(String schemaId) {
        getJson().put("id", schemaId);
        return (O)this;
    }
784604
public void assign(Identifier id)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.entry(
        cclass,
        "assign",
        "identifier: " + id);
    
    // Assign ordinal position
    String key = null;
    switch (id.getType()) 
    {
      case Identifier.STRING :
        // Changed from using the Identifier name to using the full name under defect 504438. The full name is only
        // relevant in the XPath Selector Domain and incorporates the full path for the attribute or element referenced.
        // This is necessary so that we are able to distinguish between common names at the same depth in an XML
        // document. For example you might encounter 2 XPath expressions:
        //
        // /company/department[@name='test'] and /company/location[@name='London']
        //
        // We must ensure that the system can distinguish these attributes.
        //
        key = "S:" + id.getFullName();
        break;
      case Identifier.BOOLEAN :
        key = "B:" + id.getFullName();
        break;
      case Identifier.CHILD :
        key = "C:" + id.getFullName();
        break;
      case Identifier.TOPIC:
        key = "T:" + id.getFullName();
        break;
      case Identifier.UNKNOWN :
      case Identifier.OBJECT :
        key = "U:" + id.getFullName();
        break;
      default :
        key = "N:" + id.getFullName();
    }
 
    // Get the map for the specified level. The level is only relevant in the XPath Selector Domain. It represents the
    // level of a location step in an XPath expression
    Integer level = new Integer(id.getStep());
    LevelEntry positions = (LevelEntry) levels.get(level);
    if (positions == null)
    {
      positions = new LevelEntry();
      levels.put(level, positions);
    }
    
    int levelPos = 0;
    if (key != null)
    {
      levelPos = positions.getPosition(key);
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
      tc.debug(this,cclass, "assign", "level: " + level + ", levelPos: " + Integer.valueOf(levelPos) + ", for key: " + key);   
    
    // Now we're ready to set the OrdinalPosition
    OrdinalPosition ordPos = new OrdinalPosition(level.intValue(), levelPos);
    id.setOrdinalPosition(ordPos);
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.exit(this,cclass, "assign");
  }
578004
public PactDslJsonArray id(Long id) {
        body.put(id);
        matchers.addRule(rootPath + appendArrayIndex(0), TypeMatcher.INSTANCE);
        return this;
    }
499706
public Node addControlFlowCorrelationId(String id) {
        this.correlationIds.add(new CorrelationIdentifier(Scope.ControlFlow, id));
        return this;
    }
515079
public Set<String> getAllNodeIDs() {
		HashSet<String> ids = new HashSet<>(nodes.keySet());
		ids.add(nodeID);
		return ids;
	}
1160449
public static HtmlTree A_ID(String id, Content body) {
        HtmlTree htmltree = new HtmlTree(HtmlTag.A);
        htmltree.addAttr(HtmlAttr.ID, nullCheck(id));
        htmltree.addContent(nullCheck(body));
        return htmltree;
    }
871515
public void setIdentifier(String identifier) {
        assertNotNull(identifier);
        this.identifier = identifier;
        setLength(identifier.length());
    }
90576
public void setId(final String id) {
        // Set the DBId as well if it isn't a new id
        if (id.matches(CSConstants.EXISTING_TOPIC_ID_REGEX)) {
            DBId = Integer.parseInt(id);
        }
        this.id = id;
    }
670671
public User withId(final long id) {
      return new User(id, username, displayName, slug, email, createTimestamp, url, metadata);
   }
110738
public static ShapeType forID(int id) {
    ShapeType t;
    switch (id) {
      case 0:
        t = NULL;
        break;
      case 1:
        t = POINT;
        break;
      case 11:
        t = POINTZ;
        break;
      case 21:
        t = POINTM;
        break;
      case 3:
        t = ARC;
        break;
      case 13:
        t = ARCZ;
        break;
      case 23:
        t = ARCM;
        break;
      case 5:
        t = POLYGON;
        break;
      case 15:
        t = POLYGONZ;
        break;
      case 25:
        t = POLYGONM;
        break;
      case 8:
        t = MULTIPOINT;
        break;
      case 18:
        t = MULTIPOINTZ;
        break;
      case 28:
        t = MULTIPOINTM;
        break;
      default:
        t = UNDEFINED;
        break;
    }
    return t;
  }
538031
public Node addInteractionCorrelationId(String id) {
        this.correlationIds.add(new CorrelationIdentifier(Scope.Interaction, id));
        return this;
    }
171579
public function setId($id)
    {
        if (!empty($id) && is_string($id) && ctype_print($id)) {
            $this->id = trim($id);
        }

        return $this;
    }
329231
public static void setId(Object document, String id) {
		DocumentAccessor d = getAccessor(document);
		if (d.hasIdMutator()) {
			d.setId(document, id);
		}
	}
163231
public Id<Attributes<T>> getOrCreateId()
   {
      List<Node> nodeList = childNode.get("id");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new IdImpl<Attributes<T>>(this, "id", childNode, nodeList.get(0));
      }
      return createId();
   }