76 int recommended_name_depth_{0};
78 int organism_depth_{0};
79 int alt_products_depth_{0};
80 int feature_depth_{0};
81 int sequence_depth_{0};
85 bool full_name_captured_{
false};
97 bool gene_name_is_primary_{
false};
99 bool organism_name_is_scientific_{
false};
SAX handler for UniProtKB XML <entry> documents.
Definition UniProtXMLHandler.h:33
void onStartElement(const char16_t *qname, const XMLAttributes &attrs) override
Parsing method for opening tags.
std::string char_buf_
Buffer for character data; appended-to in characters(), consumed in endElement().
Definition UniProtXMLHandler.h:88
~UniProtXMLHandler() override
Destructor.
UniProtXMLHandler(const std::string &filename, EntryCallback callback)
Build a handler that delivers each parsed UniProtEntry to callback.
void resetFeature_()
Clear all per-feature state so the next <feature> starts fresh.
std::function< void(UniProtEntry &&)> EntryCallback
Definition UniProtXMLHandler.h:38
static int parsePosition_(const std::string &attr)
CaptureTarget
Definition UniProtXMLHandler.h:43
EntryCallback callback_
Definition UniProtXMLHandler.h:66
void resetEntry_()
Clear all per-entry state so the next <entry> starts fresh.
UniProtEntry current_entry_
Definition UniProtXMLHandler.h:67
UniProtFeature current_feature_
Per-feature working state (used between startElement("feature") and endElement("feature")).
Definition UniProtXMLHandler.h:94
void onEndElement(const char16_t *qname) override
Parsing method for closing tags.
void onCharacters(const char16_t *chars, Size length) override
Parsing method for character data.
Xerces-free, lightweight view over the attribute list of an XML element.
Definition XMLAttributes.h:32
Base class for XML handlers.
Definition XMLHandler.h:42
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Namespace used to hide implementation details from users.
Definition BayesianProteinInferenceAlgorithm.h:26
A single <entry> from a UniProtKB XML file, in a parser-neutral form.
Definition UniProtXMLFile.h:48
A single <feature> element from a UniProtKB XML entry.
Definition UniProtXMLFile.h:28