Given a node identity, get the index of the node's first attribute.

@param identity int identity of the node.
@return Identity of first attribute, or DTM.NULL to indicate none exists.
964634
protected int getFirstAttributeIdentity(int identity) {
    int type = _type(identity);

    if (DTM.ELEMENT_NODE == type)
    {
      // Assume that attributes and namespaces immediately follow the element.
      while (DTM.NULL != (identity = getNextNodeIdentity(identity)))
      {

        // Assume this can not be null.
        type = _type(identity);

        if (type == DTM.ATTRIBUTE_NODE)
        {
          return identity;
        }
        else if (DTM.NAMESPACE_NODE != type)
        {
          break;
        }
      }
    }

    return DTM.NULL;
  }
263675
protected int _exptype(int identity)
  {
  	if (identity == DTM.NULL)
  	return NULL;
    // Reorganized test and loop into single flow
    // Tiny performance improvement, saves a few bytes of code, clearer.
    // %OPT% Other internal getters could be treated simliarly
    while (identity>=m_size)
    {
      if (!nextNode() && identity >= m_size)
        return NULL;
    }
    return m_exptype.elementAt(identity);

  }
742595
public static Identity valueOf(String identityStr) {
    String[] info = identityStr.split(":");
    Type type = Type.valueOf(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, info[0]));
    if (info.length == 1) {
      return new Identity(type, null);
    } else if (info.length == 2) {
      return new Identity(type, info[1]);
    } else {
      throw new IllegalArgumentException("Illegal identity string: \"" + identityStr + "\"");
    }
  }
490836
public function findAll(Identity $identity = null)
    {
        if ($identity === null) {
            $identity = $this->getIdentity();
        }

        return $this
            ->_fetchAll($identity)
            ->_fetchCount($identity)
            ->_returnCollection();
    }
300537
public Identity getIdentity()
    {
        if(identity == null)
        {
            identity = tx.getBroker().serviceIdentity().buildIdentity(obj);
        }
        return identity;
    }
688916
public @Nullable TwinTextItem getItemById(int id) {
        for(int index = getCount()-1; index >= 0; index--) {
            TwinTextItem item = getItem(index);
            if(item.getId() == id)
                return item;
        }
        return null;
    }
292017
public Node getNode(final int i) {
        if (i < 0 || i >= nodeList.size()) {
            return null;
        }
        return nodeList.get(i);
    }
1202706
protected int _level(int identity)
  {
    while (identity>=m_size)
    {
      boolean isMore = nextNode();
      if (!isMore && identity >= m_size)
        return NULL;
    }

    int i=0;
    while(NULL != (identity=_parent(identity)))
      ++i;
    return i;
  }
668653
public SessionManagementMethodType getSessionManagementMethodTypeForIdentifier(int id) {
		for (SessionManagementMethodType t : getSessionManagementMethodTypes())
			if (t.getUniqueIdentifier() == id)
				return t;
		return null;
	}
233521
public static String getShortID(String id) {
        String canonicalID = getCanonicalCLDRID(id);
        if (canonicalID == null) {
            return null;
        }
        return getShortIDFromCanonical(canonicalID);
    }
1106445
private int getMetricInfo(final MetricIdentity identity, final AppIdentity appIdentity) throws IOException, HttpException {
		Preconditions.checkNotNull(identity);
		Preconditions.checkNotNull(appIdentity);
		
		// build the json objects
		
		JsonGetMetricInfoRequest.Builder requestBuilder = JsonGetMetricInfoRequest.newBuilder();
		requestBuilder.category(identity.getCategory());
		requestBuilder.metricName(identity.getName());
		requestBuilder.deviceId(appIdentity.getDeviceId());
		requestBuilder.deviceAppId(appIdentity.getDeviceAppId());
		requestBuilder.appNameId(appIdentity.getAppNameId());
		requestBuilder.metricTypeId(identity.getType().getId());
		
		JsonGetMetricInfoRequest request = requestBuilder.build();
		
		// convert to json bytes
				
		byte[] jsonBytes = objectMapper.writer().writeValueAsBytes(request);
		
		if (LOGGER.isDebugEnabled())
		{
			LOGGER.debug("GetMetricInfo Request: {}", new String(jsonBytes, "UTF-8"));
		}

		// post to stackify
		
		HttpClient httpClient = new HttpClient(apiConfig);
		String responseString = httpClient.post("/Metrics/GetMetricInfo", jsonBytes);
		
		LOGGER.debug("GetMetricInfo Response: {}", responseString);

		// deserialize the response and return the monitor id
		
		ObjectReader jsonReader = objectMapper.reader(new TypeReference<JsonGetMetricInfoResponse>(){});
		JsonGetMetricInfoResponse response = jsonReader.readValue(responseString);
		
		if (response != null) {
			return response.getMonitorId();
		}
		
		return 0;
	}
244788
function (nodes, id) {
            for (var i = 0; i < nodes.length; i++) {
                var attrId = nodes.item(i).getAttribute("id");
                if (!attrId) {
                    continue;
                }
                if (attrId.toString() === id) {
                    return nodes.item(i);
                }
            }
            return null;
        }
199280
@Beta
    public MSICredentials withIdentityId(String identityId) {
        this.identityId = identityId;
        this.clientId = null;
        this.objectId = null;
        return this;
    }
483306
public KeyIdentifier get(String name) throws IOException {
        if (name.equalsIgnoreCase(KEY_ID)) {
            return (id);
        } else {
          throw new IOException("Attribute name not recognized by " +
                "CertAttrSet:SubjectKeyIdentifierExtension.");
        }
    }
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();
   }
875521
public Entity getEntity(String id) {
        Entity e = getEntities().get(id);
        if (e == null) {
            return null;
        }
        return e;
    }
676410
public int idxForName(final String name) {
    final Integer id = this.name2idx.get(name);
    return id == null ? -1 : id;
  }