SAX handler for UniProtKB XML <entry> documents.
Definition UniProtXMLHandler.h:35
int depth_
Depth of the most recent element start, used to scope subtree handling.
Definition UniProtXMLHandler.h:74
void onStartElement(const char16_t *qname, const XMLAttributes &attrs) override
Parsing method for opening tags.
Definition UniProtXMLHandler.cpp:149
std::string char_buf_
Buffer for character data; appended-to in characters(), consumed in endElement().
Definition UniProtXMLHandler.h:93
~UniProtXMLHandler() override
Destructor.
void resetFeature_()
Clear all per-feature state so the next <feature> starts fresh.
Definition UniProtXMLHandler.cpp:132
int isoform_depth_
<isoform> inside the alternative-products comment
Definition UniProtXMLHandler.h:84
int organism_depth_
<organism>
Definition UniProtXMLHandler.h:82
std::function< void(UniProtEntry &&)> EntryCallback
Definition UniProtXMLHandler.h:40
int gene_depth_
<gene>
Definition UniProtXMLHandler.h:81
int sequence_depth_
<sequence length="..."> (only the canonical sequence; isoform <sequence> elements have no content)
Definition UniProtXMLHandler.h:86
bool full_name_captured_
Definition UniProtXMLHandler.h:90
CaptureTarget
Definition UniProtXMLHandler.h:45
int feature_depth_
<feature>
Definition UniProtXMLHandler.h:85
EntryCallback callback_
Definition UniProtXMLHandler.h:70
CaptureTarget capture_
Destination for the next buffered run of character data (None == not capturing).
Definition UniProtXMLHandler.h:96
int entry_depth_
<entry>
Definition UniProtXMLHandler.h:79
int recommended_name_depth_
<protein>/<recommendedName>
Definition UniProtXMLHandler.h:80
void resetEntry_()
Clear all per-entry state so the next <entry> starts fresh.
Definition UniProtXMLHandler.cpp:119
UniProtEntry current_entry_
Definition UniProtXMLHandler.h:71
static int parsePosition_(const std::string &attr)
Definition UniProtXMLHandler.cpp:137
UniProtFeature current_feature_
Per-feature working state (used between startElement("feature") and endElement("feature")).
Definition UniProtXMLHandler.h:99
void onEndElement(const char16_t *qname) override
Parsing method for closing tags.
Definition UniProtXMLHandler.cpp:345
UniProtIsoform current_isoform_
Per-isoform working state (used between startElement("isoform") and endElement("isoform")).
Definition UniProtXMLHandler.h:102
int alt_products_depth_
<comment type="alternative products"> (isoform definitions harvested, rest ignored)
Definition UniProtXMLHandler.h:83
void onCharacters(const char16_t *chars, Size length) override
Parsing method for character data.
Definition UniProtXMLHandler.cpp:337
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:69
A single <feature> element from a UniProtKB XML entry.
Definition UniProtXMLFile.h:28