00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _SOPRANO_NODE_PATTERN_H_
00023 #define _SOPRANO_NODE_PATTERN_H_
00024
00025 #include <QtCore/QSharedDataPointer>
00026 #include <QtCore/QString>
00027
00028 #include "soprano_export.h"
00029 #include "node.h"
00030
00031 namespace Soprano {
00032
00033 class BindingSet;
00034
00035 namespace Inference {
00049 class SOPRANO_EXPORT NodePattern
00050 {
00051 public:
00052 NodePattern();
00053 NodePattern( const Node& );
00054 NodePattern( const QString& varname );
00055 NodePattern( const NodePattern& );
00056 ~NodePattern();
00057
00058 NodePattern& operator=( const NodePattern& );
00059
00060 bool isVariable() const;
00061
00066 Node resource() const;
00067
00072 QString variableName() const;
00073
00081 bool match( const Node& node ) const;
00082
00083 QString createSparqlNodePattern( const BindingSet& bindings ) const;
00084
00090 bool isValid() const;
00091
00092 private:
00093 class Private;
00094 QSharedDataPointer<Private> d;
00095 };
00096 }
00097 }
00098
00099 SOPRANO_EXPORT QDebug operator<<( QDebug s, const Soprano::Inference::NodePattern& );
00100
00101 #endif