Convenience method to get the ids for Materials present
194530
def ids(self):
        """"""
        assert self.name == "Materials"
        ids = list()
        for attr in self.attrs:
            attr_obj = getattr(self, attr)
            if hasattr(attr_obj, 'Id'):
                ids.append(getattr(attr_obj, 'Id'))
        return ids
791480
def _get_ids_from_hostname(self, hostname):
        """"""
        results = self.list_instances(hostname=hostname, mask="id")
        return [result['id'] for result in results]
480200
def _find_id(self, id_):
        """"""
        for i, row in enumerate(self._data):
            if row["id"] == id_:
                t = self.tableWidget
                # idx = t.itemFromIndex()
                t.setCurrentCell(i, 0)
                break
277983
def get_item_ids(self):
        """"""
        if self.has_item_ids():
            return IdList(self.my_osid_object._my_map['itemIds'],
                          runtime=self.my_osid_object._runtime,
                          proxy=self.my_osid_object._proxy)
        raise IllegalState()
180465
protected List<CmsUUID> itemIdsToUUIDs(Collection<String> itemIds) {

        List<CmsUUID> ids = new ArrayList<CmsUUID>();
        for (String itemId : itemIds) {
            ids.add(getUUIDFromItemID(itemId));
        }
        return ids;
    }
1323022
def _identifiers(self):
        """"""
        for handle in self._storage_broker.iter_item_handles():
            yield dtoolcore.utils.generate_identifier(handle)
553103
def _get_selected_ids(self):
        """"""
        selection = self.get_selection()
        if selection.get_mode() != gtk.SELECTION_MULTIPLE:
            raise AttributeError('selected_ids only valid for select_multiple')
        model, selected_paths = selection.get_selected_rows()
        if selected_paths:
            return zip(*selected_paths)[0]
        else:
            return ()
585121
public static String[] getResourcesId()
    {
        Set<String> ids = new HashSet<String>();
        for(Datatype datatype : miriam.getDatatype()) {
			for (Resource resource : getResources(datatype)) {
				ids.add(resource.getId());
			}
        }
        return ids.toArray(new String[] {});
    }
390598
def item_id(response):
    
    dict_keys = ['item_0', 'item_1', 'item_2',
                 'item_3', 'item_4', 'item_5']
    new_keys = ['item_0_name', 'item_1_name', 'item_2_name',
                'item_3_name', 'item_4_name', 'item_5_name']

    for player in response['players']:
        for key, new_key in zip(dict_keys, new_keys):
            for item in items['items']:
                if item['id'] == player[key]:
                    player[new_key] = item['localized_name']

    return response
1029519
def _id_or_key(list_item):
    '''
    
    '''
    if isinstance(list_item, dict):
        if 'id' in list_item:
            return list_item['id']
        if 'key' in list_item:
            return list_item['key']
    return list_item
1050900
def get_file_ids(object):
    """"""
    import MOPdbaccess
    mysql = MOPdbaccess.connect('cfeps','cfhls',dbSystem='MYSQL')
    cfeps=mysql.cursor()
    sql="SELECT file_id FROM measure WHERE provisional LIKE %s"
    cfeps.execute(sql,(object, ))
    file_ids=cfeps.fetchall()

    return (file_ids)
940367
def _drop_id_prefixes(self, item):
        
        if isinstance(item, list):
            return [self._drop_id_prefixes(i) for i in item]
        if isinstance(item, dict):
            return {
                'id' if k.endswith('id') else k: self._drop_id_prefixes(v)
                for k, v in item.items()
            }
        return item
1126978
def get_id2children(objs):
    """"""
    id2children = {}
    for obj in objs:
        _get_id2children(id2children, obj.item_id, obj)
    return id2children
793943
public static SortedSet<String> getIdsFromParameters(SolrParams params,
      String prefix) {
    SortedSet<String> ids = new TreeSet<>();
    Iterator<String> it = params.getParameterNamesIterator();
    Pattern pattern = Pattern
        .compile("^" + Pattern.quote(prefix) + "\\.([^\\.]+)(\\..*|$)");
    while (it.hasNext()) {
      String item = it.next();
      Matcher m = pattern.matcher(item);
      if (m.matches()) {
        ids.add(m.group(1));
      }
    }
    return ids;
  }
42506
def get_job_ids(self):
        """"""
        if not self.parsed_response:
            return None
        try:
            job_ids = self.parsed_response["files"]["results.xml"]["job-ids"]
        except KeyError:
            return None
        if not job_ids or job_ids == [0]:
            return None
        return job_ids
41573
def ids(self):
        """"""
        as_list = [seq.description.split()[0] for seq in self]
        as_set = frozenset(as_list)
        assert len(as_set) == len(as_list)
        return as_set
486296
def _get_id2children(id2children, item_id, item_obj):
    """"""
    if item_id in id2children:
        return id2children[item_id]
    child_ids = set()
    for child_obj in item_obj.children:
        child_id = child_obj.item_id
        child_ids.add(child_id)
        child_ids |= _get_id2children(id2children, child_id, child_obj)
    id2children[item_id] = child_ids
    return child_ids