File: query.sip

package info (click to toggle)
pykde4 4%3A4.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 29,376 kB
  • sloc: python: 2,056; cpp: 290; makefile: 41; sh: 5
file content (102 lines) | stat: -rw-r--r-- 4,726 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// Copyright 2010 Simon Edwards <simon@simonzone.com>

//                 Generated by twine2

// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library General Public License as
// published by the Free Software Foundation; either version 2, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details

// You should have received a copy of the GNU Library General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

namespace Nepomuk
{
namespace Query
{
typedef QHash<QString,Nepomuk::Types::Property> RequestPropertyMap;
class Query
{
%TypeHeaderCode
#include <nepomuk/query.h>
%End

public:
                            Query ();
    explicit                Query (const Nepomuk::Query::Term& term);
                            Query (const Nepomuk::Query::Query&);
    ~Query ();
    bool                    isValid () const;
    Nepomuk::Query::Term    term () const;
    int                     limit () const;
    void                    setTerm (const Nepomuk::Query::Term&);
    void                    setLimit (int);
    class RequestProperty
    {
%TypeHeaderCode
#include <nepomuk/query.h>
%End

    public:
                                RequestProperty (const Nepomuk::Types::Property& property, bool optional = 1);
                                RequestProperty (const Nepomuk::Query::Query::RequestProperty&);
        ~RequestProperty ();
        bool                    operator == (const Nepomuk::Query::Query::RequestProperty& other) const;
        Nepomuk::Types::Property  property () const;
        bool                    optional () const;
    };
    void                    addRequestProperty (const Nepomuk::Query::Query::RequestProperty& property);
    void                    setRequestProperties (const QList<Nepomuk::Query::Query::RequestProperty>& properties);
    QList<Nepomuk::Query::Query::RequestProperty>  requestProperties () const;
    enum SparqlFlag
    {
        NoFlags,
        CreateCountQuery,
        HandleInverseProperties,
        CreateAskQuery
    };
    typedef QFlags<Nepomuk::Query::Query::SparqlFlag> SparqlFlags;
    QString                 toSparqlQuery (Nepomuk::Query::Query::SparqlFlags flags = Nepomuk::Query::Query::NoFlags) const;
    KUrl                    toSearchUrl (Nepomuk::Query::Query::SparqlFlags flags = Nepomuk::Query::Query::NoFlags) const;
    Nepomuk::Query::RequestPropertyMap  requestPropertyMap () const;
    bool                    operator == (const Nepomuk::Query::Query& query) const;
    int                     offset () const;
    void                    setOffset (int offset);
    bool                    isFileQuery () const;
    KUrl                    toSearchUrl (const QString& customTitle, Nepomuk::Query::Query::SparqlFlags flags = Nepomuk::Query::Query::NoFlags) const;
    QString                 toString () const;
    static Nepomuk::Query::Query  fromString (const QString& queryString);
    static Nepomuk::Query::Query  fromQueryUrl (const KUrl& url);
    static QString          sparqlFromQueryUrl (const KUrl& url);
    static QString          titleFromQueryUrl (const KUrl& url);
    Nepomuk::Query::FileQuery  toFileQuery () const;
    void                    setFullTextScoringEnabled (bool enabled);
    void                    setFullTextScoringSortOrder (Qt::SortOrder order);
    bool                    fullTextScoringEnabled () const;
    Qt::SortOrder           fullTextScoringSortOrder () const;
    enum QueryFlag
    {
        NoQueryFlags,
        NoResultRestrictions,
        WithoutFullTextExcerpt
    };
    typedef QFlags<Nepomuk::Query::Query::QueryFlag> QueryFlags;
    void                    setQueryFlags (Nepomuk::Query::Query::QueryFlags flags);
    Nepomuk::Query::Query::QueryFlags  queryFlags () const;
    bool                    operator != (const Nepomuk::Query::Query& query) const;
    Nepomuk::Query::Query   optimized () const;
};
uint                    qHash (const Nepomuk::Query::Query&);
//ig Nepomuk::Query::Query   operator && (const Nepomuk::Query::Query& query, const Nepomuk::Query::Term& term);
//ig Nepomuk::Query::Query   operator || (const Nepomuk::Query::Query& query, const Nepomuk::Query::Term& term);
//ig Nepomuk::Query::Query   operator ! (const Nepomuk::Query::Query& query);
};
};
//ig QDebug                  operator << (QDebug, const Nepomuk::Query::Query&);