get list of `models.OrganismHost` objects from XML node entry

        :param entry: XML node entry
        :return: list of :class:`pyuniprot.manager.models.OrganismHost` objects
338816
def get_organism_hosts(cls, entry):
        

        query = "./organismHost/dbReference[@type='NCBI Taxonomy']"
        return [models.OrganismHost(taxid=x.get('id')) for x in entry.iterfind(query)]
1167857
def get_other_gene_names(cls, entry):
        
        alternative_gene_names = []

        for alternative_gene_name in entry.iterfind("./gene/name"):

            if alternative_gene_name.attrib['type'] != 'primary':

                alternative_gene_name_dict = {
                    'type_': alternative_gene_name.attrib['type'],
                    'name': alternative_gene_name.text
                }

                alternative_gene_names.append(models.OtherGeneName(**alternative_gene_name_dict))

        return alternative_gene_names
259741
def get_db_references(cls, entry):
        
        db_refs = []

        for db_ref in entry.iterfind("./dbReference"):

            db_ref_dict = {'identifier': db_ref.attrib['id'], 'type_': db_ref.attrib['type']}
            db_refs.append(models.DbReference(**db_ref_dict))

        return db_refs
453019
def _get_elements(self, site):
        
        try:
            if isinstance(site.specie, Element):
                return [site.specie]
            return [Element(site.specie)]
        except:
            return site.species.elements
719277
def get_entry_type(hosts_entry=None):
        
        if hosts_entry and isinstance(hosts_entry, str):
            entry = hosts_entry.strip()
            if not entry or not entry[0] or entry[0] == "\n":
                return 'blank'
            if entry[0] == "#":
                return 'comment'
            entry_chunks = entry.split()
            if is_ipv6(entry_chunks[0]):
                return 'ipv6'
            if is_ipv4(entry_chunks[0]):
                return 'ipv4'
1279959
def tree_entries(self):
        
        return TreeEntriesDataFrame(self._engine_dataframe.getTreeEntries(), self._session, self._implicits)
701386
def get_entry_categories(self, category_nodes):
        
        categories = []
        for category_node in category_nodes:
            domain = category_node.attrib.get('domain')
            if domain == 'category':
                categories.append(self.categories[category_node.text])
        return categories
870194
def GetEntries(self, parser_mediator, top_level=None, **unused_kwargs):
    
    for root, key, datetime_value in interface.RecurseKey(top_level):
      if not isinstance(datetime_value, datetime.datetime):
        continue

      event_data = plist_event.PlistTimeEventData()
      event_data.key = key
      event_data.root = root

      event = time_events.PythonDatetimeEvent(
          datetime_value, definitions.TIME_DESCRIPTION_WRITTEN)
      parser_mediator.ProduceEventWithEventData(event, event_data)
714228
def _get_elements(self, source):
        
        return list(chain(*[self.tree.xpath(xpath) for xpath in source]))
799394
def list_nodes():
    '''
    
    '''
    ret = {}
    nodes = list_nodes_full()
    for node in nodes:
        ret[node] = {
            'id': nodes[node]['UUID'],
            'image': nodes[node]['Guest OS'],
            'name': nodes[node]['Name'],
            'state': None,
            'private_ips': [],
            'public_ips': [],
        }
        ret[node]['size'] = '{0} RAM, {1} CPU'.format(
            nodes[node]['Memory size'],
            nodes[node]['Number of CPUs'],
        )
    return ret
406213
def get_nodes(self, request):
        
        nodes = []
        archives = []
        attributes = {'hidden': HIDE_ENTRY_MENU}
        for entry in Entry.published.all():
            year = entry.creation_date.strftime('%Y')
            month = entry.creation_date.strftime('%m')
            month_text = format(entry.creation_date, 'b').capitalize()
            day = entry.creation_date.strftime('%d')

            key_archive_year = 'year-%s' % year
            key_archive_month = 'month-%s-%s' % (year, month)
            key_archive_day = 'day-%s-%s-%s' % (year, month, day)

            if key_archive_year not in archives:
                nodes.append(NavigationNode(
                    year, reverse('zinnia:entry_archive_year', args=[year]),
                    key_archive_year, attr=attributes))
                archives.append(key_archive_year)

            if key_archive_month not in archives:
                nodes.append(NavigationNode(
                    month_text,
                    reverse('zinnia:entry_archive_month', args=[year, month]),
                    key_archive_month, key_archive_year,
                    attr=attributes))
                archives.append(key_archive_month)

            if key_archive_day not in archives:
                nodes.append(NavigationNode(
                    day, reverse('zinnia:entry_archive_day',
                                 args=[year, month, day]),
                    key_archive_day, key_archive_month,
                    attr=attributes))
                archives.append(key_archive_day)

            nodes.append(NavigationNode(entry.title, entry.get_absolute_url(),
                                        entry.pk, key_archive_day))
        return nodes
406368
def load(self, elem):
        
        self.testTag(elem, 'list')
        out = []
        for xitem in elem:
            out.append(XmlDataIO.fromXml(xitem))
        return out
735023
def get_contents_entry(node):
    """"""
    try:
        node = node.disambiguate(must_exist=1)
    except SCons.Errors.UserError:
        # There was nothing on disk with which to disambiguate
        # this entry.  Leave it as an Entry, but return a null
        # string so calls to get_contents() in emitters and the
        # like (e.g. in qt.py) don't have to disambiguate by hand
        # or catch the exception.
        return ''
    else:
        return _get_contents_map[node._func_get_contents](node)
979804
def _list_nodes(full=False):
    '''
    
    '''
    server, user, password = _get_xml_rpc()
    auth = ':'.join([user, password])

    vm_pool = server.one.vmpool.info(auth, -2, -1, -1, -1)[1]

    vms = {}
    for vm in _get_xml(vm_pool):
        name = vm.find('NAME').text
        vms[name] = {}

        cpu_size = vm.find('TEMPLATE').find('CPU').text
        memory_size = vm.find('TEMPLATE').find('MEMORY').text

        private_ips = []
        for nic in vm.find('TEMPLATE').findall('NIC'):
            try:
                private_ips.append(nic.find('IP').text)
            except Exception:
                pass

        vms[name]['id'] = vm.find('ID').text
        if 'TEMPLATE_ID' in vm.find('TEMPLATE'):
            vms[name]['image'] = vm.find('TEMPLATE').find('TEMPLATE_ID').text
        vms[name]['name'] = name
        vms[name]['size'] = {'cpu': cpu_size, 'memory': memory_size}
        vms[name]['state'] = vm.find('STATE').text
        vms[name]['private_ips'] = private_ips
        vms[name]['public_ips'] = []

        if full:
            vms[vm.find('NAME').text] = _xml_to_dict(vm)

    return vms
487359
def get_keywords(self, entry):
        
        keyword_objects = []

        for keyword in entry.iterfind("./keyword"):
            identifier = keyword.get('id')
            name = keyword.text
            keyword_hash = hash(identifier)

            if keyword_hash not in self.keywords:
                self.keywords[keyword_hash] = models.Keyword(**{'identifier': identifier, 'name': name})

            keyword_objects.append(self.keywords[keyword_hash])

        return keyword_objects
1141493
def get_node_list(self):
        
        node_objs = list()

        for obj_dict_list in self.obj_dict['nodes'].values():
            node_objs.extend([
                Node(obj_dict=obj_d)
                for obj_d
                in obj_dict_list])

        return node_objs
911668
def _get_dns_entry_trs(self):
        
        from bs4 import BeautifulSoup
        dns_list_response = self.session.get(
            self.URLS['dns'].format(self.domain_id))
        self._log('DNS list', dns_list_response)
        assert dns_list_response.status_code == 200, \
            'Could not load DNS entries.'

        html = BeautifulSoup(dns_list_response.content, 'html.parser')
        self._log('DNS list', html)
        dns_table = html.find('table', {'id': 'cp_domains_dnseintraege'})
        assert dns_table is not None, 'Could not find DNS entry table'

        def _is_zone_tr(elm):
            has_ondblclick = elm.has_attr('ondblclick')
            has_class = elm.has_attr('class')
            return elm.name.lower() == 'tr' and (has_class or has_ondblclick)

        rows = dns_table.findAll(_is_zone_tr)
        assert rows is not None and rows, 'Could not find any DNS entries'
        return rows