Smallest building block of an inference Rule.
More...
#include <Soprano/Inference/NodePattern>
Smallest building block of an inference Rule.
There are two types of NodePattern:
- Simple nodes that wrap around an instance or Node and only match against that particular node.
- Variable nodes that match against every Node and have a name.
- Author
- Sebastian Trueg trueg.nosp@m.@kde.nosp@m..org
Definition at line 49 of file nodepattern.h.
◆ NodePattern() [1/4]
Soprano::Inference::NodePattern::NodePattern |
( |
| ) |
|
◆ NodePattern() [2/4]
Soprano::Inference::NodePattern::NodePattern |
( |
const Node & |
| ) |
|
◆ NodePattern() [3/4]
Soprano::Inference::NodePattern::NodePattern |
( |
const QString & |
varname | ) |
|
◆ NodePattern() [4/4]
Soprano::Inference::NodePattern::NodePattern |
( |
const NodePattern & |
| ) |
|
◆ ~NodePattern()
Soprano::Inference::NodePattern::~NodePattern |
( |
| ) |
|
◆ operator=()
◆ isVariable()
bool Soprano::Inference::NodePattern::isVariable |
( |
| ) |
const |
◆ resource()
Node Soprano::Inference::NodePattern::resource |
( |
| ) |
const |
- Returns
- the associated resource of an invalid Node if this is a variable.
◆ variableName()
QString Soprano::Inference::NodePattern::variableName |
( |
| ) |
const |
- Returns
- The name of the variable or an empty string if this is not a variable.
◆ match()
bool Soprano::Inference::NodePattern::match |
( |
const Node & |
node | ) |
const |
Match a Node against this pattern. Variables will match any Node while specific node patterns will only match that one particular Node.
- Returns
- true if node mathes this pattern.
◆ createSparqlNodePattern()
QString Soprano::Inference::NodePattern::createSparqlNodePattern |
( |
const BindingSet & |
bindings | ) |
const |
◆ isValid()
bool Soprano::Inference::NodePattern::isValid |
( |
| ) |
const |
- Returns
true
if the pattern is valid.
- Since
- 2.3
The documentation for this class was generated from the following file:
- /build/soprano-jdwzM3/soprano-2.9.4+dfsg1/soprano/inference/nodepattern.h