• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE Support
  • Sitemap
  • Contact Us
 

soprano

Soprano::Inference::NodePattern

Soprano::Inference::NodePattern Class Reference

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

#include <Soprano/Inference/NodePattern>

List of all members.

Public Member Functions

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

Detailed Description

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@kde.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

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
bool Soprano::Inference::NodePattern::isVariable (  )  const
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.
NodePattern& Soprano::Inference::NodePattern::operator= ( const NodePattern &   ) 
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.

The documentation for this class was generated from the following file:
  • nodepattern.h

soprano

Skip menu "soprano"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE Support

Skip menu "KDE Support"
  • akonadi
  • Decibel
  • grantlee
  • kdewin
  • phonon
  •     Backend
  • polkit-qt
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for KDE Support by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal