knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
|
#include <GraphRenaming.h>
Public Member Functions | |
GraphRenaming ()=default | |
GraphRenaming (GraphRenamingMap renaming) | |
std::string_view | rename (const std::string_view &entity) |
void | rename (Triple &triple) |
void | addRenaming (std::string_view from, std::string_view to) |
bool | configure (const boost::property_tree::ptree &opts) override |
GraphRenaming ()=default | |
GraphRenaming (GraphRenamingMap renaming) | |
std::string_view | rename (const std::string_view &entity) |
void | rename (Triple &triple) |
void | addRenaming (std::string_view from, std::string_view to) |
bool | configure (const boost::property_tree::ptree &opts) override |
Public Member Functions inherited from knowrob::GraphTransformation | |
GraphTransformation ()=default | |
virtual | ~GraphTransformation ()=default |
void | setOrigin (std::string_view origin) |
auto | origin () const |
void | apply (OntologySource &ontologySource, const TripleHandler &callback) |
GraphTransformation ()=default | |
virtual | ~GraphTransformation ()=default |
void | setOrigin (std::string_view origin) |
auto | origin () const |
void | apply (OntologySource &ontologySource, const TripleHandler &callback) |
Protected Member Functions | |
bool | readFromFile (const std::string &filename) |
void | initializeTransformation () override |
void | finalizeTransformation () override |
void | pushInputTriples (const TripleContainerPtr &triples) override |
bool | readFromFile (const std::string &filename) |
void | initializeTransformation () override |
void | finalizeTransformation () override |
void | pushInputTriples (const TripleContainerPtr &triples) override |
Protected Member Functions inherited from knowrob::GraphTransformation | |
void | initializeNext () |
void | finalizeNext () |
void | setNext (const std::shared_ptr< GraphTransformation > &next) |
void | setNext (const TripleHandler &next) |
void | pushOutputTriples (const TripleContainerPtr &triples) |
void | initializeNext () |
void | finalizeNext () |
void | setNext (const std::shared_ptr< GraphTransformation > &next) |
void | setNext (const TripleHandler &next) |
void | pushOutputTriples (const TripleContainerPtr &triples) |
Protected Attributes | |
GraphRenamingMap | renaming_ |
Protected Attributes inherited from knowrob::GraphTransformation | |
TripleHandler | next_ |
std::shared_ptr< GraphTransformation > | nextTransformation_ |
std::string | origin_ |
Additional Inherited Members | |
Static Public Member Functions inherited from knowrob::GraphTransformation | |
static std::shared_ptr< GraphTransformation > | create (const boost::property_tree::ptree &config) |
static std::shared_ptr< GraphTransformation > | create (const boost::property_tree::ptree &config) |
A transformation that only renames entities in the input graph.
Definition at line 23 of file GraphRenaming.h.
|
default |
|
explicit |
Create a new renaming transformation with the given renaming map.
renaming | the renaming map |
Definition at line 15 of file GraphRenaming.cpp.
|
default |
|
explicit |
Create a new renaming transformation with the given renaming map.
renaming | the renaming map |
void GraphRenaming::addRenaming | ( | std::string_view | from, |
std::string_view | to | ||
) |
Add a renaming rule to the renaming map.
from | the original entity name |
to | the new entity name |
Definition at line 19 of file GraphRenaming.cpp.
void knowrob::GraphRenaming::addRenaming | ( | std::string_view | from, |
std::string_view | to | ||
) |
Add a renaming rule to the renaming map.
from | the original entity name |
to | the new entity name |
|
overridevirtual |
Configure the transformation with the given options.
config | the options |
Implements knowrob::GraphTransformation.
Definition at line 23 of file GraphRenaming.cpp.
|
overridevirtual |
Configure the transformation with the given options.
config | the options |
Implements knowrob::GraphTransformation.
|
overrideprotectedvirtual |
Finalize the transformation.
Implements knowrob::GraphTransformation.
Definition at line 75 of file GraphRenaming.cpp.
|
overrideprotectedvirtual |
Finalize the transformation.
Implements knowrob::GraphTransformation.
|
overrideprotectedvirtual |
Initialize the transformation.
Implements knowrob::GraphTransformation.
Definition at line 71 of file GraphRenaming.cpp.
|
overrideprotectedvirtual |
Initialize the transformation.
Implements knowrob::GraphTransformation.
|
overrideprotectedvirtual |
Push input triples to the transformation.
triples | the input triples |
Implements knowrob::GraphTransformation.
Definition at line 79 of file GraphRenaming.cpp.
|
overrideprotectedvirtual |
Push input triples to the transformation.
triples | the input triples |
Implements knowrob::GraphTransformation.
|
protected |
Definition at line 37 of file GraphRenaming.cpp.
|
protected |
std::string_view GraphRenaming::rename | ( | const std::string_view & | entity | ) |
Apply renaming mapping to an entity.
entity | the entity to rename |
Definition at line 55 of file GraphRenaming.cpp.
std::string_view knowrob::GraphRenaming::rename | ( | const std::string_view & | entity | ) |
Apply renaming mapping to an entity.
entity | the entity to rename |
void GraphRenaming::rename | ( | Triple & | triple | ) |
Rename the entities in the given triple.
triple | the triple to rename |
Definition at line 63 of file GraphRenaming.cpp.
void knowrob::GraphRenaming::rename | ( | Triple & | triple | ) |
Rename the entities in the given triple.
triple | the triple to rename |
|
protected |
Definition at line 57 of file GraphRenaming.h.