00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef CUBI_PATTERNBASE_H
00032 #define CUBI_PATTERNBASE_H
00033
00034 #include "global.h"
00035
00036 #include <QtCore>
00037
00038 CUBI_BEGIN_NAMESPACE
00039
00040 class PatternBaseData;
00041
00042 class PatternBase
00043 {
00044
00045 public:
00046 PatternBase();
00047 PatternBase(const PatternBase &other);
00048 PatternBase& operator=(const PatternBase &other);
00049 bool operator==(const PatternBase &other) const;
00050 bool operator!=(const PatternBase &other) const;
00051 ~PatternBase();
00052
00053 enum Type {
00054 TypeInvalid,
00055 TypePattern,
00056 TypePatternGroup,
00057 TypeUnion,
00058 TypeGraph,
00059 TypeExists,
00060 TypeCompositionalSelect
00061 };
00062
00063 Q_DECL_DEPRECATED bool isExists() const;
00064 Q_DECL_DEPRECATED bool isPattern() const;
00065 Q_DECL_DEPRECATED bool isPatternGroup() const;
00066 Q_DECL_DEPRECATED bool isGraph() const;
00067 Q_DECL_DEPRECATED bool isUnion() const;
00068 Q_DECL_DEPRECATED bool isCompositionalSelect() const;
00069 Type type() const;
00070 bool isValid() const;
00071
00072 QString sparql(Options::SparqlOptions options = Options::DefaultSparqlOptions) const;
00073
00074 protected:
00075 PatternBase(PatternBaseData *data);
00076
00077 QSharedDataPointer<PatternBaseData> d;
00078 };
00079
00080 CUBI_END_NAMESPACE
00081
00082 #endif