Extract name of the resource from a resource ID.
@param id the resource ID
@return the name of the resource
185626
public static String nameFromResourceId(String id) {
        return (id != null) ? ResourceId.fromString(id).name() : null;
    }
9999
protected Person getPersonById(String id) {
		Person person = null;
		try {
			Long personId = Long.valueOf(id);
			if (logger.isDebugEnabled()) {
				logger.debug("Retrieving Person with id=[{}]", personId);
			}
			person = entityManager.find(Person.class, personId);
		} catch (NumberFormatException e) {
			if (logger.isWarnEnabled()) {
				logger.warn("Invalid number format: {}", id);
			}
		}
		if (person == null) {
			throw new IllegalArgumentException();
		}
		return person;
	}
180766
public String getString(int id)
	{
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "getString("+id+")");
		}
		
		return getter.getString(id);
	}
110730
public String getString(int id)
	{
		Activity activity = activityUtils.getCurrentActivity(false);
		if(activity == null){
			return "";
		}
		return activity.getString(id);
	}
883758
public C get(String id){
		C container = this.containerMap.get(id);

		if(container != null && (container.getState()).equals(State.REMOVED)){
			return null;
		}

		return container;
	}
1057445
public static String getResourceName(Resource resource) {
        String result = null;
        if (resource != null) {
            String name = resource.getName();
            if (ResourceUtil.CONTENT_NODE.equals(name)) {
                result = getResourceName(resource.getParent());
            } else {
                result = name;
            }
        }
        return result;
    }
36472
def get_resource_by_id(resource_id, api_version, extract_value=None):
    '''
    
    '''
    ret = {}

    try:
        resconn = get_conn(client_type='resource')
        resource_query = resconn.resources.get_by_id(
            resource_id=resource_id,
            api_version=api_version
        )
        resource_dict = resource_query.as_dict()
        if extract_value is not None:
            ret = resource_dict[extract_value]
        else:
            ret = resource_dict
    except CloudError as exc:
        __utils__['azurearm.log_cloud_error']('resource', exc.message)
        ret = {'Error': exc.message}

    return ret
340837
public String getId() {
        if (id == null) {
            if (isValid()) {
                id = getProperty(ResourceUtil.PROP_UUID);
            }
            if (StringUtils.isBlank(id)) {
                id = Base64.encodeBase64String(getPath().getBytes(MappingRules.CHARSET));
            }
        }
        return id;
    }
193803
public String getIdValue(final URI id) {
        if (id == null) {
            return null;
        }
        final URI localId = id.normalize();
        return idMap.get(localId);
    }
168084
protected String determineResourceName(final Resource resource) {
        String resourceName = null;

        if (resource instanceof ContextResource) {
            resourceName = ((ContextResource) resource).getPathWithinContext();

        } else if (resource instanceof ByteArrayResource) {
            resourceName = resource.getDescription();

        } else {
            try {
                resourceName = resource.getFile().getAbsolutePath();
            } catch (IOException e) {
                resourceName = resource.getFilename();
            }
        }
        return resourceName;
    }
717214
public Optional<LinkedResource> getById(String id)
  {
    return Optional.fromNullable(resourcesById.get(id));
  }
1014709
private static String getServerIdString(String id) {

        if (id.contains(CmsADEManager.CLIENT_ID_SEPERATOR)) {
            id = id.substring(0, id.indexOf(CmsADEManager.CLIENT_ID_SEPERATOR));
        }
        return id;
    }
1309647
public CmsNewResourceInfo getNewResourceInfoById(CmsUUID id) {

        if (m_newElementInfos != null) {
            for (CmsNewResourceInfo info : m_newElementInfos) {
                if (info.getCopyResourceId().equals(id)) {
                    return info;
                }
            }
        }
        return null;
    }
901677
public String addId(final URI id) {
        if (id == null) {
            return null;
        }
        final URI localId = id.normalize();
        index ++;
        final String newId = PREFIX + Integer.toString(index);
        idMap.put(localId, newId);
        return newId;
    }
914021
public static DataSourceBackendId getInstance(String id) {
        DataSourceBackendId result = cache.get(id);
        if (result == null) {
            id = id.intern();
            result = new DataSourceBackendId(id);
            cache.put(id, result);
        }
        return result;
    }
845076
public String getNamefromId(int id) {
        return (String) sqlService.getFromTable(
            Constants.PROFILE_PROFILE_NAME, Constants.GENERIC_ID,
            id, Constants.DB_TABLE_PROFILE);
    }
766453
private static String getFullInstanceId(String hostname, String id) {
    String str = hostname == null ? "" : hostname;
    str = str.replace('.', '_');
    str += (id == null ? "" : "-" + id);
    return str;
  }