knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
|
#include <GraphTransformation.h>
Public Member Functions | |
GraphTransformation ()=default | |
virtual | ~GraphTransformation ()=default |
void | setOrigin (std::string_view origin) |
auto | origin () const |
void | apply (OntologySource &ontologySource, const TripleHandler &callback) |
virtual bool | configure (const boost::property_tree::ptree &config)=0 |
GraphTransformation ()=default | |
virtual | ~GraphTransformation ()=default |
void | setOrigin (std::string_view origin) |
auto | origin () const |
void | apply (OntologySource &ontologySource, const TripleHandler &callback) |
virtual bool | configure (const boost::property_tree::ptree &config)=0 |
Static Public Member Functions | |
static std::shared_ptr< GraphTransformation > | create (const boost::property_tree::ptree &config) |
static std::shared_ptr< GraphTransformation > | create (const boost::property_tree::ptree &config) |
Protected Member Functions | |
void | initializeNext () |
void | finalizeNext () |
void | setNext (const std::shared_ptr< GraphTransformation > &next) |
void | setNext (const TripleHandler &next) |
void | pushOutputTriples (const TripleContainerPtr &triples) |
virtual void | pushInputTriples (const TripleContainerPtr &triples)=0 |
virtual void | initializeTransformation ()=0 |
virtual void | finalizeTransformation ()=0 |
void | initializeNext () |
void | finalizeNext () |
void | setNext (const std::shared_ptr< GraphTransformation > &next) |
void | setNext (const TripleHandler &next) |
void | pushOutputTriples (const TripleContainerPtr &triples) |
virtual void | pushInputTriples (const TripleContainerPtr &triples)=0 |
virtual void | initializeTransformation ()=0 |
virtual void | finalizeTransformation ()=0 |
Protected Attributes | |
TripleHandler | next_ |
std::shared_ptr< GraphTransformation > | nextTransformation_ |
std::string | origin_ |
Base class for graph transformations. Each transformation consumes input triples and produces output triples. The output triples are either passed to the next transformation or to a handler. Note that GraphTransformation currently maybe not preserve the context of input triples, and that the context of output triples is limited to reflect the triple origin.
Definition at line 22 of file GraphTransformation.h.
|
default |
|
virtualdefault |
|
default |
|
virtualdefault |
void GraphTransformation::apply | ( | OntologySource & | ontologySource, |
const TripleHandler & | callback | ||
) |
Apply the transformation to the given ontology source.
ontologySource | the ontology source to apply the transformation to |
callback | the callback to handle the output triples |
Definition at line 40 of file GraphTransformation.cpp.
void knowrob::GraphTransformation::apply | ( | OntologySource & | ontologySource, |
const TripleHandler & | callback | ||
) |
Apply the transformation to the given ontology source.
ontologySource | the ontology source to apply the transformation to |
callback | the callback to handle the output triples |
|
pure virtual |
Configure the transformation with the given options.
config | the options |
Implemented in knowrob::GraphRestructuring, knowrob::GraphRenaming, knowrob::GraphRestructuring, and knowrob::GraphRenaming.
|
pure virtual |
Configure the transformation with the given options.
config | the options |
Implemented in knowrob::GraphRestructuring, knowrob::GraphRenaming, knowrob::GraphRestructuring, and knowrob::GraphRenaming.
|
static |
Create a new transformation from the given configuration.
config | the configuration |
Definition at line 61 of file GraphTransformation.cpp.
|
static |
Create a new transformation from the given configuration.
config | the configuration |
|
protected |
Definition at line 34 of file GraphTransformation.cpp.
|
protected |
|
protectedpure virtual |
Finalize the transformation.
Implemented in knowrob::GraphRestructuring, knowrob::GraphRenaming, knowrob::GraphRestructuring, and knowrob::GraphRenaming.
|
protectedpure virtual |
Finalize the transformation.
Implemented in knowrob::GraphRestructuring, knowrob::GraphRenaming, knowrob::GraphRestructuring, and knowrob::GraphRenaming.
|
protected |
Definition at line 28 of file GraphTransformation.cpp.
|
protected |
|
protectedpure virtual |
Initialize the transformation.
Implemented in knowrob::GraphRestructuring, knowrob::GraphRenaming, knowrob::GraphRestructuring, and knowrob::GraphRenaming.
|
protectedpure virtual |
Initialize the transformation.
Implemented in knowrob::GraphRestructuring, knowrob::GraphRenaming, knowrob::GraphRestructuring, and knowrob::GraphRenaming.
|
inline |
Get the origin of the triples.
Definition at line 40 of file GraphTransformation.h.
|
inline |
Get the origin of the triples.
Definition at line 40 of file GraphTransformation.h.
|
protectedpure virtual |
Push input triples to the transformation.
triples | the input triples |
Implemented in knowrob::GraphRestructuring, knowrob::GraphRenaming, knowrob::GraphRestructuring, and knowrob::GraphRenaming.
|
protectedpure virtual |
Push input triples to the transformation.
triples | the input triples |
Implemented in knowrob::GraphRestructuring, knowrob::GraphRenaming, knowrob::GraphRestructuring, and knowrob::GraphRenaming.
|
protected |
Push output triples to the next transformation or handler.
triples | the output triples |
Definition at line 18 of file GraphTransformation.cpp.
|
protected |
Push output triples to the next transformation or handler.
triples | the output triples |
|
inlineprotected |
Set the next transformation to be called after this one.
next | the next transformation |
Definition at line 76 of file GraphTransformation.h.
|
inlineprotected |
Set the next transformation to be called after this one.
next | the next transformation |
Definition at line 76 of file GraphTransformation.h.
|
inlineprotected |
Set the next handler to be called after this transformation.
next | the next handler |
Definition at line 82 of file GraphTransformation.h.
|
inlineprotected |
Set the next handler to be called after this transformation.
next | the next handler |
Definition at line 82 of file GraphTransformation.h.
|
inline |
Set the origin of the triples. Transformations maybe do not preserve context of input triples, so the origin of the input triples must be specified.
origin | the origin of the input triples |
Definition at line 34 of file GraphTransformation.h.
|
inline |
Set the origin of the triples. Transformations maybe do not preserve context of input triples, so the origin of the input triples must be specified.
origin | the origin of the input triples |
Definition at line 34 of file GraphTransformation.h.
|
protected |
Definition at line 64 of file GraphTransformation.h.
|
protected |
Definition at line 65 of file GraphTransformation.h.
|
protected |
Definition at line 66 of file GraphTransformation.h.