Returns a list of all aliases used in the namespace. The aliases are
        ordered to ensure that if they reference other aliases those aliases
        come earlier in the list.
507664
def linearize_aliases(self):
        # type: () -> typing.List[Alias]
        
        linearized_aliases = []
        seen_aliases = set()  # type: typing.Set[Alias]

        def add_alias(alias):
            # type: (Alias) -> None
            if alias in seen_aliases:
                return
            elif alias.namespace != self:
                return
            if is_alias(alias.data_type):
                add_alias(alias.data_type)
            linearized_aliases.append(alias)
            seen_aliases.add(alias)

        for alias in self.aliases:
            add_alias(alias)

        return linearized_aliases
1365561
def find_entry_name_of_alias(self, alias):
        
        if alias in self.aliases:
            name = self.aliases[alias]
            if name in self.entries:
                return name
            else:
                # Name wasn't found, possibly merged or deleted. Now look
                # really hard.
                for name, entry in self.entries.items():
                    aliases = entry.get_aliases(includename=False)
                    if alias in aliases:
                        if (ENTRY.DISTINCT_FROM not in entry or
                                alias not in entry[ENTRY.DISTINCT_FROM]):
                            return name

        return None
285809
private List<CmsSiteMatcher> getAliases() {

        List<CmsSiteMatcher> ret = new ArrayList<CmsSiteMatcher>();
        for (I_CmsEditableGroupRow row : m_aliasGroup.getRows()) {
            FormLayout layout = (FormLayout)(row.getComponent());
            CheckBox box = (CheckBox)(layout.getComponent(1));
            TextField field = (TextField)layout.getComponent(0);
            CmsSiteMatcher matcher = new CmsSiteMatcher(field.getValue());
            matcher.setRedirect(box.getValue().booleanValue());
            ret.add(matcher);
        }
        return ret;
    }
1158239
def listIds(self, exclude=list()):
        
        lst = list(self.aliasesToIds.keys())
        others = set(self.idsToSigners.keys()) - \
            set(self.aliasesToIds.values())
        lst.extend(list(others))
        for x in exclude:
            lst.remove(x)
        return lst
3103
def gatherNamespaces(self):
        '''
        '''
        if self.usedNamespaces is not None:
            return

        self.logger.debug('gatherNamespaces')
        self.usedNamespaces = {}
            
        # Add all schemas defined in wsdl
        # to used namespace and to the Alias dict
        for schema in self._wsdl.types.values():
            tns = schema.getTargetNamespace()
            self.logger.debug('Register schema(%s) -- TNS(%s)'\
                %(_get_idstr(schema), tns),)
            if self.usedNamespaces.has_key(tns) is False:
                self.usedNamespaces[tns] = []
            self.usedNamespaces[tns].append(schema)
            NAD.add(tns)
            
        # Add all xsd:import schema instances
        # to used namespace and to the Alias dict
        for k,v in SchemaReader.namespaceToSchema.items():
            self.logger.debug('Register schema(%s) -- TNS(%s)'\
                %(_get_idstr(v), k),)
            if self.usedNamespaces.has_key(k) is False:
                self.usedNamespaces[k] = []
            self.usedNamespaces[k].append(v)
            NAD.add(k)
59433
def retrieve_import_alias_mapping(names_list):
    """"""
    import_alias_names = dict()

    for alias in names_list:
        if alias.asname:
            import_alias_names[alias.asname] = alias.name
    return import_alias_names
673256
def getNamespaces(self):
        
        s = set()
        for n in self.branch + self.node.ancestors():
            if self.permit(n.expns):
                s.add(n.expns)
            s = s.union(self.pset(n))
        return s
327888
def as_alias_handler(alias_list):
    """"""
    list_ = list()
    for alias in alias_list:
        if alias.asname:
            list_.append(alias.asname)
        else:
            list_.append(alias.name)
    return list_
1323871
def list_alias():
    
    alias_table = get_alias_table()
    output = []
    for alias in alias_table.sections():
        if alias_table.has_option(alias, 'command'):
            output.append({
                'alias': alias,
                # Remove unnecessary whitespaces
                'command': ' '.join(alias_table.get(alias, 'command').split())
            })

    return output
997863
def aliases(self):
        
        return [x for x in self[self.current_scope].values() if x.is_aliased]
303795
public java.util.List<AliasConfiguration> getAliases() {
        if (aliases == null) {
            aliases = new com.amazonaws.internal.SdkInternalList<AliasConfiguration>();
        }
        return aliases;
    }
668808
def get_aliases(self, includename=True):
        
        # empty list if doesnt exist
        alias_quanta = self.get(self._KEYS.ALIAS, [])
        aliases = [aq[QUANTITY.VALUE] for aq in alias_quanta]
        if includename and self[self._KEYS.NAME] not in aliases:
            aliases = [self[self._KEYS.NAME]] + aliases
        return aliases
79644
def fetch_aliases(self, seq_id, current_only=True, translate_ncbi_namespace=None):
        """"""
        return [dict(r) for r in self.find_aliases(seq_id=seq_id,
                                                   current_only=current_only,
                                                   translate_ncbi_namespace=translate_ncbi_namespace)]
1019821
def clean_aliases(ctx, force_yes):
    
    inactive_aliases = []

    for (alias, mapping) in six.iteritems(aliases_database):
        # Ignore local aliases
        if mapping.mapping is None:
            continue

        project = ctx.obj['projects_db'].get(mapping.mapping[0],
                                             mapping.backend)

        if (project is None or not project.is_active() or
                (mapping.mapping[1] is not None
                 and project.get_activity(mapping.mapping[1]) is None)):
            inactive_aliases.append(((alias, mapping), project))

    if not inactive_aliases:
        ctx.obj['view'].msg("No inactive aliases found.")
        return

    if not force_yes:
        confirm = ctx.obj['view'].clean_inactive_aliases(inactive_aliases)

    if force_yes or confirm:
        ctx.obj['settings'].remove_aliases(
            [item[0] for item in inactive_aliases]
        )
        ctx.obj['settings'].write_config()
        ctx.obj['view'].msg("%d inactive aliases have been successfully"
                            " cleaned." % len(inactive_aliases))
253718
def get_branches(aliases):
    """"""

    ignore = ['pow', 'log10', 'sqrt', 'max']
    branches = []
    for k, v in aliases.items():

        tokens = re.sub('[\(\)\+\*\/\,\=\<\>\&\!\-\|]', ' ', v).split()

        for t in tokens:

            if bool(re.search(r'^\d', t)) or len(t) <= 3:
                continue

            if bool(re.search(r'[a-zA-Z]', t)) and t not in ignore:
                branches += [t]

    return list(set(branches))
24338
def get_alias(self):
        
        alias = None
        if self.alias:
            alias = self.alias
        elif self.auto_alias:
            alias = self.auto_alias

        return alias
1350871
public Set<Namespace> getAllNamespaces() {
        if (namespaceGroup == null) {
            return emptySet();
        }
        return new HashSet<Namespace>(namespaceGroup.getAllNamespaces());
    }