|ExtractorPostprocessor (const ExtractorPostprocessor &)=delete|
|ExtractorPostprocessor (ExtractorPostprocessor &&) noexcept|
|void||process (const QVector< QVariant > &data)|
|QVector< QVariant >||result () const|
|void||setContextDate (const QDateTime &dt)|
Post-process extracted data to filter out garbage and augment data from other sources.
In detail, this performs the tasks listed below for all data elements fed into it.
Basic normalization for e.g. renamed properties of older schema.org versions is already covered by JsonLdImportFilter, post-processing covers the more elaborate normalization steps, such as:
- translate human readable and possibly localized country names into ISO 3166-1 codes.
- expand IATA BCBP ticket tokens (see IataParser).
That is, add additional information derived from a built-in knowledge base (see KnowledgeDb). This includes:
- Add timezone information to arrival and departure times.
- Add geo coordinates and country information to known airports or train stations.
Duplicate elements that might have been the result of two overlapping extractors (e.g. when extracting two different MIME parts of an email referring to the same reservation) are merged.
At this point, all invalid elements are discarded. The definition of invalid is fairly loose though, and typically only covers elements that are explicitly considered unusable. Examples:
- A Flight missing a departure day or destination.
- A LodigingReservation without an attached LodgingBusiness.
Finally the remaining elements are sorted based on their relevant date (see SortUtil). This makes the data usable for basic display right away, but it for example doesn't do multi-traveler aggregation, that's still left for the display layer.
Member Function Documentation
|void ExtractorPostprocessor::setContextDate||(||const QDateTime &||dt||)|
The documentation for this class was generated from the following files: