libept
0.5.25
|
#include <vocabularymerger.h>
Classes | |
class | FacetData |
class | FacetIndexer |
class | TagData |
class | TagIndexer |
Public Member Functions | |
VocabularyMerger () | |
bool | empty () const |
Check if there is any data in the merged vocabulary. More... | |
void | read (tagcoll::input::Input &input) |
Parse and import the vocabulary from `input', merging the data with the previously imported ones. More... | |
void | write (const std::string &fname) |
Write the vocabulary data to the given file. More... | |
void | write (FILE *out) |
Write the vocabulary data to the given output stream. More... | |
const tagcoll::diskindex::MMapIndexer & | facetIndexer () const |
Get the facet indexer. More... | |
const tagcoll::diskindex::MMapIndexer & | tagIndexer () const |
Get the tag indexer. More... | |
bool | hasFacet (const std::string &name) const |
Check if the vocabulary contains the facet `name'. More... | |
bool | hasTag (const std::string &fullname) const |
Check if the vocabulary contains the tag `fullname'. More... | |
int | tagID (const std::string &fullname) const |
Return the ID for the given tag (or -1 if not found) More... | |
std::set< std::string > | tagNames () const |
Return a set with all tag names. More... | |
Protected Member Functions | |
FacetData & | obtainFacet (const std::string &name) |
TagData & | obtainTag (const std::string &fullname) |
Protected Attributes | |
std::map< std::string, FacetData > | facets |
int | tagCount |
FacetIndexer | findexer |
TagIndexer | tindexer |
|
inline |
|
inline |
Check if there is any data in the merged vocabulary.
References read(), and write().
Referenced by ept::debtags::VocabularyIndexer::rebuild().
|
inline |
Get the facet indexer.
Note: the indexers will only be functional after one of the write methods have been invoked
References findexer.
Referenced by TestVocabularyMerger::_1(), TestVocabularyMerger::_2(), TestVocabularyMerger::_3(), and ept::debtags::VocabularyIndexer::rebuild().
|
inline |
Check if the vocabulary contains the facet `name'.
References hasTag(), tagID(), and tagNames().
bool ept::debtags::VocabularyMerger::hasTag | ( | const std::string & | fullname | ) | const |
Check if the vocabulary contains the tag `fullname'.
Referenced by hasFacet().
|
protected |
References ept::debtags::VocabularyMerger::FacetData::name.
|
protected |
References ept::debtags::VocabularyMerger::FacetData::obtainTag().
Referenced by ept::debtags::VocabularyMerger::FacetData::FacetData().
void ept::debtags::VocabularyMerger::read | ( | tagcoll::input::Input & | input | ) |
Parse and import the vocabulary from `input', merging the data with the previously imported ones.
References ept::debtags::VocabularyMerger::FacetData::name, and ept::debtags::DebDBParser::nextRecord().
Referenced by TestVocabularyMerger::_1(), TestVocabulary::_18(), TestVocabularyMerger::_2(), TestVocabularyMerger::_3(), empty(), and ept::debtags::SourceDir::readVocabularies().
int ept::debtags::VocabularyMerger::tagID | ( | const std::string & | fullname | ) | const |
Return the ID for the given tag (or -1 if not found)
References ept::debtags::VocabularyMerger::TagData::id.
Referenced by hasFacet().
|
inline |
Get the tag indexer.
Note: the indexers will only be functional after one of the write methods have been invoked
References tindexer.
Referenced by TestVocabularyMerger::_1(), TestVocabularyMerger::_2(), TestVocabularyMerger::_3(), and ept::debtags::VocabularyIndexer::rebuild().
std::set< std::string > ept::debtags::VocabularyMerger::tagNames | ( | ) | const |
Return a set with all tag names.
Referenced by TestVocabulary::_18(), and hasFacet().
void ept::debtags::VocabularyMerger::write | ( | const std::string & | fname | ) |
Write the vocabulary data to the given file.
Referenced by TestVocabularyMerger::_1(), TestVocabularyMerger::_2(), TestVocabularyMerger::_3(), empty(), and ept::debtags::VocabularyIndexer::rebuild().
void ept::debtags::VocabularyMerger::write | ( | FILE * | out | ) |
Write the vocabulary data to the given output stream.
|
protected |
|
protected |
Referenced by facetIndexer().
|
protected |
|
protected |
Referenced by tagIndexer().