knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
|
#include <ImportHierarchy.h>
Public Member Functions | |
ImportHierarchy () | |
bool | isCurrentGraph (std::string_view graphName) const |
void | clear () |
void | setDefaultGraph (std::string_view defaultGraph) |
const auto & | defaultGraph () const |
void | addCurrentGraph (std::string_view graphName) |
void | removeCurrentGraph (std::string_view graphName) |
void | addDirectImport (std::string_view importerGraphName, std::string_view importedGraphName) |
const std::set< CurrentGraph * > & | getImports (std::string_view graphName) |
ImportHierarchy () | |
bool | isCurrentGraph (std::string_view graphName) const |
void | clear () |
void | setDefaultGraph (std::string_view defaultGraph) |
const auto & | defaultGraph () const |
void | addCurrentGraph (std::string_view graphName) |
void | removeCurrentGraph (std::string_view graphName) |
void | addDirectImport (std::string_view importerGraphName, std::string_view importedGraphName) |
const std::set< CurrentGraph * > & | getImports (std::string_view graphName) |
Static Public Member Functions | |
static bool | isReservedOrigin (std::string_view origin) |
static bool | isReservedOrigin (std::string_view origin) |
Static Public Attributes | |
static constexpr std::string_view | ORIGIN_ANY = "any" |
static constexpr std::string_view | ORIGIN_SYSTEM = "system" |
static constexpr std::string_view | ORIGIN_SESSION = "session" |
static constexpr std::string_view | ORIGIN_USER = "user" |
static constexpr std::string_view | ORIGIN_REASONER = "reasoner" |
static constexpr std::string_view | ORIGIN_TEST = "test" |
Protected Member Functions | |
CurrentGraph & | getCurrentGraph (std::string_view name) |
bool | isSystemOrigin (CurrentGraph &graph) |
bool | isSessionOrigin (CurrentGraph &graph) |
CurrentGraph & | getCurrentGraph (std::string_view name) |
bool | isSystemOrigin (CurrentGraph &graph) |
bool | isSessionOrigin (CurrentGraph &graph) |
Protected Attributes | |
std::map< std::string_view, std::unique_ptr< CurrentGraph > > | graphs_ |
std::string | defaultGraph_ |
Manages a hierarchy between named triple origins. One of the purposes of this hierarchy is to distinguish between triples that are dynamically inserted during runtime from those that are more static like files loaded initially.
Definition at line 20 of file ImportHierarchy.h.
ImportHierarchy::ImportHierarchy | ( | ) |
Definition at line 13 of file ImportHierarchy.cpp.
knowrob::ImportHierarchy::ImportHierarchy | ( | ) |
void ImportHierarchy::addCurrentGraph | ( | std::string_view | graphName | ) |
Defines a named graph if it is not defined yet.
graphName | a graph name. |
Definition at line 41 of file ImportHierarchy.cpp.
void knowrob::ImportHierarchy::addCurrentGraph | ( | std::string_view | graphName | ) |
Defines a named graph if it is not defined yet.
graphName | a graph name. |
void ImportHierarchy::addDirectImport | ( | std::string_view | importerGraphName, |
std::string_view | importedGraphName | ||
) |
Adds the imports relation between two named graphs.
importerGraphName | a graph name. |
importedGraphName | a graph name. |
Definition at line 69 of file ImportHierarchy.cpp.
void knowrob::ImportHierarchy::addDirectImport | ( | std::string_view | importerGraphName, |
std::string_view | importedGraphName | ||
) |
Adds the imports relation between two named graphs.
importerGraphName | a graph name. |
importedGraphName | a graph name. |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
Definition at line 59 of file ImportHierarchy.cpp.
|
protected |
const std::set< CurrentGraph * > & ImportHierarchy::getImports | ( | std::string_view | graphName | ) |
graphName | a graph name. |
Definition at line 49 of file ImportHierarchy.cpp.
const std::set<CurrentGraph *>& knowrob::ImportHierarchy::getImports | ( | std::string_view | graphName | ) |
graphName | a graph name. |
bool ImportHierarchy::isCurrentGraph | ( | std::string_view | graphName | ) | const |
graphName | a graph name |
Definition at line 27 of file ImportHierarchy.cpp.
bool knowrob::ImportHierarchy::isCurrentGraph | ( | std::string_view | graphName | ) | const |
graphName | a graph name |
|
static |
origin | a graph name |
Definition at line 22 of file ImportHierarchy.cpp.
|
static |
origin | a graph name |
|
protected |
Definition at line 36 of file ImportHierarchy.cpp.
|
protected |
|
protected |
Definition at line 31 of file ImportHierarchy.cpp.
|
protected |
void ImportHierarchy::removeCurrentGraph | ( | std::string_view | graphName | ) |
Removes any definition of a named graph.
graphName | a graph name. |
Definition at line 100 of file ImportHierarchy.cpp.
void knowrob::ImportHierarchy::removeCurrentGraph | ( | std::string_view | graphName | ) |
Removes any definition of a named graph.
graphName | a graph name. |
|
inline |
Set the default graph used for triples in case no graph name is specified.
defaultGraph | a graph name. |
Definition at line 71 of file ImportHierarchy.h.
|
inline |
Set the default graph used for triples in case no graph name is specified.
defaultGraph | a graph name. |
Definition at line 71 of file ImportHierarchy.h.
|
protected |
Definition at line 105 of file ImportHierarchy.h.
|
protected |
Definition at line 104 of file ImportHierarchy.h.
|
staticconstexpr |
Used to match triples of any origin in a query.
Definition at line 25 of file ImportHierarchy.h.
|
staticconstexpr |
Used to only match triples from reasoners.
Definition at line 42 of file ImportHierarchy.h.
|
staticconstexpr |
Used to only match triples from the current session, i.e. those that are inserted by the user, by reasoners or unittests during the current session.
Definition at line 34 of file ImportHierarchy.h.
|
staticconstexpr |
Used to only match system triples.
Definition at line 29 of file ImportHierarchy.h.
|
staticconstexpr |
Used to only match triples from unittests.
Definition at line 46 of file ImportHierarchy.h.
|
staticconstexpr |
Used to only match triples from the current user.
Definition at line 38 of file ImportHierarchy.h.