Soprano  2.9.0
Public Member Functions | List of all members
Soprano::Inference::NodePattern Class Reference

Smallest building block of an inference Rule. More...

#include <Soprano/Inference/NodePattern>

Public Member Functions

 NodePattern ()
 
 NodePattern (const Node &)
 
 NodePattern (const QString &varname)
 
 NodePattern (const NodePattern &)
 
 ~NodePattern ()
 
NodePatternoperator= (const NodePattern &)
 
bool isVariable () const
 
Node resource () const
 
QString variableName () const
 
bool match (const Node &node) const
 
QString createSparqlNodePattern (const BindingSet &bindings) const
 
bool isValid () const
 

Detailed Description

Smallest building block of an inference Rule.

There are two types of NodePattern:

Author
Sebastian Trueg trueg.nosp@m.@kde.nosp@m..org

Definition at line 49 of file nodepattern.h.

Constructor & Destructor Documentation

Soprano::Inference::NodePattern::NodePattern ( )
Soprano::Inference::NodePattern::NodePattern ( const Node )
Soprano::Inference::NodePattern::NodePattern ( const QString varname)
Soprano::Inference::NodePattern::NodePattern ( const NodePattern )
Soprano::Inference::NodePattern::~NodePattern ( )

Member Function Documentation

NodePattern& Soprano::Inference::NodePattern::operator= ( const NodePattern )
bool Soprano::Inference::NodePattern::isVariable ( ) const
Node Soprano::Inference::NodePattern::resource ( ) const
Returns
the associated resource of an invalid Node if this is a variable.
QString Soprano::Inference::NodePattern::variableName ( ) const
Returns
The name of the variable or an empty string if this is not a variable.
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.
QString Soprano::Inference::NodePattern::createSparqlNodePattern ( const BindingSet bindings) const
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: