data: database storage

* replaced storage by a new version that utilizes sqlite for persistence.
* added SqliteStorage to manage direct access to the database.
* added testsuit for sqlite.
* slimmed down the protected interface of the storage.
* changed tests in StorageTestSuit to avoid using protected methods of the storage.
* added functions to begin and commit a transaction to the storage.
* removed GraphFilterTestSuite.
* removed GraphFilterConductorTestSuite.
* added Node and Edge constructor that takes id as parameter
* added constructor for TokenComponentNameCached that accepts NameHierarchy as parameter
* added TokenLocation constructor that takes locationId as parameter.
* created respective construction functions in TokenLocatonLine, -File and -Collection.

fortune cookie message = Recognition will come from unexpected sources.
This commit is contained in:
malte_langkabel
2015-08-25 18:07:02 +02:00
parent d996cf384d
commit e628241b02
63 changed files with 167982 additions and 3582 deletions
+10 -5
View File
@@ -6,21 +6,19 @@
#include <deque>
#include "data/graph/Edge.h"
#include "data/graph/FilterableGraph.h"
#include "data/graph/Node.h"
class Graph
: public FilterableGraph
{
public:
Graph();
virtual ~Graph();
// FilterableGraph implementation
virtual void copy(const FilterableGraph* other);
// FilterableGraph implementation // deprecated
virtual void copy(const Graph* other);
virtual void clear();
virtual void add(const FilterableGraph* other);
virtual void add(const Graph* other);
virtual void forEachNode(std::function<void(Node*)> func) const;
virtual void forEachEdge(std::function<void(Edge*)> func) const;
@@ -52,6 +50,13 @@ public:
Node* addNodeAndAllChildrenAsPlainCopy(Node* node);
Edge* addEdgeAndAllChildrenAsPlainCopy(Edge* edge);
size_t size() const;
Token* getTokenById(Id id) const;
void print(std::ostream& ostream) const;
void printBasic(std::ostream& ostream) const;
protected:
std::map<Id, std::shared_ptr<Node>> m_nodes;
std::map<Id, std::shared_ptr<Edge>> m_edges;