get list of models.Accession from XML node entry

        :param entry: XML node entry
        :return: list of :class:`pyuniprot.manager.models.Accession` objects
553995
def get_accessions(cls, entry):
        
        return [models.Accession(accession=x.text) for x in entry.iterfind("./accession")]
867694
def get_alternative_short_names(cls, entry):
        
        names = []
        query = "./protein/alternativeName/shortName"
        for name in entry.iterfind(query):
            names.append(models.AlternativeShortName(name=name.text))

        return names
231696
def sel_entries(self):
        """"""
        ENTIRE_RECORD = 0xff
        rsp = self.send_message_with_name('GetSelInfo')
        if rsp.entries == 0:
            return
        reservation_id = self.get_sel_reservation_id()
        next_record_id = 0
        while True:
            req = create_request_by_name('GetSelEntry')
            req.reservation_id = reservation_id
            req.record_id = next_record_id
            req.offset = 0
            self.max_req_len = ENTIRE_RECORD

            record_data = ByteBuffer()
            while True:
                req.length = self.max_req_len
                if (self.max_req_len != 0xff
                        and (req.offset + req.length) > 16):
                    req.length = 16 - req.offset

                rsp = self.send_message(req)
                if rsp.completion_code == constants.CC_CANT_RET_NUM_REQ_BYTES:
                    if self.max_req_len == 0xff:
                        self.max_req_len = 16
                    else:
                        self.max_req_len -= 1
                    continue
                else:
                    check_completion_code(rsp.completion_code)

                record_data.extend(rsp.record_data)
                req.offset = len(record_data)

                if len(record_data) >= 16:
                    break

            next_record_id = rsp.next_record_id

            yield SelEntry(record_data)
            if next_record_id == 0xffff:
                break
728682
def filter(self, entries):
        
        return [
            entry for entry in entries
            if self.split(entry)[0] in self.declarations
        ]
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
928715
def get_tissue_in_references(self, entry):
        
        tissue_in_references = []
        query = "./reference/source/tissue"
        tissues = {x.text for x in entry.iterfind(query)}

        for tissue in tissues:

            if tissue not in self.tissues:
                self.tissues[tissue] = models.TissueInReference(tissue=tissue)
            tissue_in_references.append(self.tissues[tissue])

        return tissue_in_references
1174482
def get_context_data(self, **kwargs):
        
        kwargs.update({
            'entries': Entry.objects.get_for_tag(
                self.kwargs.get('slug', 0)
            )
        })

        return super(EntriesView, self).get_context_data(**kwargs)
364043
def entries(self):
        
        list_of_rows = []
        try:
            list_of_rows = self.bc_dao.get_all()
        except LookupError as e:
            self.logger.error('MX Exception {0}'.format(e), exc_info=True)
        return list_of_rows
1011488
def parse(cls, requester, entry):
        
        if not type(entry) is dict:
            return entry
        for key_to_parse, cls_to_parse in six.iteritems(cls.parser):
            if key_to_parse in entry:
                entry[key_to_parse] = cls_to_parse.parse(
                    requester, entry[key_to_parse]
                )
        return cls(requester, **entry)
1111587
def get_categories(self, entry):
        
        try:
            return format_html_join(
                ', ', '<a href="{}" target="blank">{}</a>',
                [(category.get_absolute_url(), category.title)
                 for category in entry.categories.all()])
        except NoReverseMatch:
            return ', '.join([conditional_escape(category.title)
                              for category in entry.categories.all()])
89969
def _retrieve(self):
        
        url = "%s://%s:%d/manager/status" % (self._proto, self._host, self._port)
        params = {}
        params['XML'] = 'true'
        response = util.get_url(url, self._user, self._password, params)
        tree = ElementTree.XML(response)
        return tree
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
644315
@XmlElementWrapper(name = "entries")
    @XmlElement(name = "entry", nillable = true, type = Object.class)
    @JsonProperty(value = "entries")
    @ApiModelProperty(value = "The elements of the page.")
    @Override
    public List<Object> getEntries() {
        return entries;
    }
452750
def _get_entry_link(self, entry):
        
        entry_link = None
        for link in entry.link:
            if '/data/' not in link.href and '/lh/' not in link.href:
                entry_link = link.href
                break
        return entry_link or entry.link[0].href
974881
def get_queryset(self):
        
        queryset = super(LiveEntryCategoryManager, self).get_queryset()
        return queryset.filter(tag__in=[
            entry_tag.tag
            for entry_tag
            in EntryTag.objects.filter(entry__live=True)
        ])
1211105
def get_annotation_entries_by_names(self, url: str, names: Iterable[str]) -> List[NamespaceEntry]:
        
        annotation_filter = and_(Namespace.url == url, NamespaceEntry.name.in_(names))
        return self.session.query(NamespaceEntry).join(Namespace).filter(annotation_filter).all()
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