Recursively returns a list of all descendent catalog ids, inclusive
193097
def _get_descendent_cat_idstrs(self, cat_id, hierarchy_session=None):
        """"""
        def get_descendent_ids(h_session):
            idstr_list = [str(cat_id)]
            if h_session is None:
                pkg_name = cat_id.get_identifier_namespace().split('.')[0]
                cat_name = cat_id.get_identifier_namespace().split('.')[1]
                try:
                    mgr = self._get_provider_manager('HIERARCHY')
                    h_session = mgr.get_hierarchy_traversal_session_for_hierarchy(
                        Id(authority=pkg_name.upper(),
                           namespace='CATALOG',
                           identifier=cat_name.upper()),
                        proxy=self._proxy)
                except (errors.OperationFailed, errors.Unsupported):
                    return idstr_list  # there is no hierarchy
            if h_session.has_children(cat_id):
                for child_id in h_session.get_children(cat_id):
                    idstr_list += self._get_descendent_cat_idstrs(child_id, h_session)
            return list(set(idstr_list))

        use_caching = False
        try:
            config = self._runtime.get_configuration()
            parameter_id = Id('parameter:useCachingForQualifierIds@json')
            if config.get_value_by_parameter(parameter_id).get_boolean_value():
                use_caching = True
            else:
                pass
        except (AttributeError, KeyError, errors.NotFound):
            pass
        if use_caching:
            key = 'descendent-catalog-ids-{0}'.format(str(cat_id))

            # If configured to use memcache as the caching engine, use it.
            # Otherwise default to diskcache
            caching_engine = 'diskcache'

            try:
                config = self._runtime.get_configuration()
                parameter_id = Id('parameter:cachingEngine@json')
                caching_engine = config.get_value_by_parameter(parameter_id).get_string_value()
            except (AttributeError, KeyError, errors.NotFound):
                pass

            if caching_engine == 'memcache':
                import memcache
                caching_host = '127.0.0.1:11211'
                try:
                    config = self._runtime.get_configuration()
                    parameter_id = Id('parameter:cachingHostURI@json')
                    caching_host = config.get_value_by_parameter(parameter_id).get_string_value()
                except (AttributeError, KeyError, errors.NotFound):
                    pass

                mc = memcache.Client([caching_host], debug=0)

                catalog_ids = mc.get(key)
                if catalog_ids is None:
                    catalog_ids = get_descendent_ids(hierarchy_session)
                    mc.set(key, catalog_ids)
            elif caching_engine == 'diskcache':
                import diskcache
                with diskcache.Cache('/tmp/dlkit_cache') as cache:
                    # A little bit non-DRY, since it's almost the same as for memcache above.
                    # However, for diskcache.Cache, we have to call ".close()" or use a
                    #   ``with`` statement to safeguard calling ".close()", so we keep this
                    #   separate from the memcache implementation.
                    catalog_ids = cache.get(key)
                    if catalog_ids is None:
                        catalog_ids = get_descendent_ids(hierarchy_session)
                        cache.set(key, catalog_ids)
            else:
                raise errors.NotFound('The {0} caching engine was not found.'.format(caching_engine))
        else:
            catalog_ids = get_descendent_ids(hierarchy_session)
        return catalog_ids
1293595
def get_ancestors(self):
        
        ancestors = list(self.get_parents())
        ancestor_unique_attributes = set([(a.__class__, a.id) for a in ancestors])
        ancestors_with_parents = [a for a in ancestors if isinstance(a, DescendantMixin)]
        for ancestor in ancestors_with_parents:
            for parent in ancestor.get_ancestors():
                if (parent.__class__, parent.id) not in ancestor_unique_attributes:
                    ancestors.append(parent)
        return ancestors
916179
def get_hierarchies(self):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinLookupSession.get_bins_template
        catalogs = self._get_provider_session('hierarchy_lookup_session').get_hierarchies()
        cat_list = []
        for cat in catalogs:
            cat_list.append(Hierarchy(self._provider_manager, cat, self._runtime, self._proxy))
        return HierarchyList(cat_list)
1166114
def getDescendantsUIDs(self, all_descendants=False):
        
        descendants = self.getDescendants(all_descendants=all_descendants)
        return map(api.get_uid, descendants)
817601
function getAllRootNodesInTree(tree) {
	let ids = [];

	const rootNodes = axe.utils
		.querySelectorAllFilter(tree, '*', node => {
			if (ids.includes(node.shadowId)) {
				return false;
			}
			ids.push(node.shadowId);
			return true;
		})
		.map(node => {
			return {
				shadowId: node.shadowId,
				rootNode: axe.utils.getRootNode(node.actualNode)
			};
		});

	return axe.utils.uniqueArray(rootNodes, []);
}
159992
def getallobjlists(idf, refname):
    
    dtls = idf.model.dtls
    objlists = []
    for i, fieldidds in enumerate(idf.idd_info):
        indexlist = []
        for j, fieldidd in enumerate(fieldidds):
            if 'object-list' in fieldidd:
                if fieldidd['object-list'][0].upper() == refname.upper():
                    indexlist.append(j)
        if indexlist != []:
            objkey = dtls[i]
            objlists.append((objkey, refname, indexlist))
    return objlists
764882
def getAllNodeUids(self):
        '''
            
        '''
        ret = set()

        for child in self:
            ret.update(child.getAllNodeUids())

        return ret
1126978
def get_id2children(objs):
    """"""
    id2children = {}
    for obj in objs:
        _get_id2children(id2children, obj.item_id, obj)
    return id2children
144390
def ancestry(self):
        
        if not self.inherits():
            return []

        schema = orb.system.schema(self.inherits())
        if not schema:
            return []

        return schema.ancestry() + [schema]
883194
def get_klass_parents(gi_name):
    '''
    
    '''
    res = []
    parents = __HIERARCHY_GRAPH.predecessors(gi_name)
    if not parents:
        return []
    __get_parent_link_recurse(parents[0], res)
    return res
609039
def get_ancestors(self):
        
        node = self
        ancestor_list = []
        while node.parent is not None:
            ancestor_list.append(node.parent)
            node = node.parent

        return ancestor_list
945577
def get_descendants(self):
        
        if self.is_leaf():
            return get_result_class(self.__class__).objects.none()
        return self.__class__.get_tree(self).exclude(pk=self.pk)
840009
def get_collections(self):
        
        result = self.api_request('/catalog')

        # get the collection name from the url
        return [(os.path.split(x)[1], x) for x in result['collections']]
532946
def childIds(self):
        
        if self.depth >= len(self.citation.root):
            return []
        elif self._children is not None:
            return self._children
        else:
            self._children = self.getReffs()
            return self._children
807770
def direct_descendants(include_singletons = false)
      return _inherited_by if BBLib.in_opal?
      ObjectSpace.each_object(Class).select do |c|
        (include_singletons || !c.singleton_class?) && c.ancestors[1..-1].find { |k| k.is_a?(Class) } == self
      end
    end
923708
private void getAllDescendants(Resource<L> parent, List<Resource<L>> descendants) {
        for (Resource<L> child : getChildren(parent)) {
            if (!descendants.contains(child)) {
                getAllDescendants(child, descendants);
                descendants.add(child);
            }
        }
        return;
    }
516428
def get_vaults(self):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinLookupSession.get_bins_template
        catalogs = self._get_provider_session('vault_lookup_session').get_vaults()
        cat_list = []
        for cat in catalogs:
            cat_list.append(Vault(self._provider_manager, cat, self._runtime, self._proxy))
        return VaultList(cat_list)