knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
MongoTriple.h
Go to the documentation of this file.
1 /*
2  * This file is part of KnowRob, please consult
3  * https://github.com/knowrob/knowrob for license details.
4  */
5 
6 #ifndef KNOWROB_MONGO_TRIPLE_H
7 #define KNOWROB_MONGO_TRIPLE_H
8 
9 #include "knowrob/semweb/Vocabulary.h"
10 #include "knowrob/semweb/Triple.h"
11 #include "Document.h"
12 
13 namespace knowrob::mongo {
17  class MongoTriple {
18  public:
19  MongoTriple(const VocabularyPtr &vocabulary,
20  const Triple &tripleData,
21  const std::string &fallbackOrigin,
22  bool isTaxonomic);
23 
27  auto &document() const { return document_; }
28 
29  protected:
31 
32  static bson_t *createDocument(
33  const VocabularyPtr &vocabulary,
34  const Triple &tripleData,
35  const std::string &fallbackOrigin,
36  bool isTaxonomic);
37  };
38 
39 } // knowrob
40 
41 #endif //KNOWROB_MONGO_TRIPLE_H
MongoTriple(const VocabularyPtr &vocabulary, const Triple &tripleData, const std::string &fallbackOrigin, bool isTaxonomic)
static bson_t * createDocument(const VocabularyPtr &vocabulary, const Triple &tripleData, const std::string &fallbackOrigin, bool isTaxonomic)
TermRule & string()
Definition: terms.cpp:63
std::shared_ptr< Vocabulary > VocabularyPtr
Definition: Vocabulary.h:233