Nepomuk
Go to the documentation of this file.
20 #ifndef _NEPOMUK_QUERY_QUERY_H_
21 #define _NEPOMUK_QUERY_QUERY_H_
23 #include <QtCore/QSharedDataPointer>
24 #include <QtCore/QList>
25 #include <QtCore/QPair>
26 #include <QtCore/QDebug>
117 bool isValid()
const;
127 bool isFileQuery()
const;
165 void setTerm(
const Term& );
173 void setLimit(
int );
181 void setOffset(
int offset );
196 void setFullTextScoringEnabled(
bool enabled );
208 void setFullTextScoringSortOrder( Qt::SortOrder order );
217 bool fullTextScoringEnabled()
const;
224 Qt::SortOrder fullTextScoringSortOrder()
const;
245 NoResultRestrictions = 0x1,
253 WithoutFullTextExcerpt = 0x2
255 Q_DECLARE_FLAGS( QueryFlags, QueryFlag )
264 void setQueryFlags( QueryFlags flags );
273 QueryFlags queryFlags()
const;
297 bool optional =
true );
329 bool optional()
const;
333 QSharedDataPointer<Private> d;
358 void setRequestProperties(
const QList<RequestProperty>& properties );
364 QList<RequestProperty> requestProperties()
const;
380 CreateCountQuery = 0x1,
387 HandleInverseProperties = 0x2,
397 Q_DECLARE_FLAGS( SparqlFlags, SparqlFlag )
423 QString toSparqlQuery( SparqlFlags flags = NoFlags )
const;
438 KUrl toSearchUrl( SparqlFlags flags = NoFlags )
const;
461 KUrl toSearchUrl(
const QString& customTitle, SparqlFlags flags = NoFlags )
const;
476 bool operator==(
const Query& query )
const;
485 bool operator!=(
const Query& query )
const;
498 Query optimized()
const;
509 QString toString()
const;
520 static Query fromString(
const QString& queryString );
534 static Query fromQueryUrl(
const KUrl& url );
547 static QString sparqlFromQueryUrl(
const KUrl& url );
561 static QString titleFromQueryUrl(
const KUrl& url );
565 QSharedDataPointer<QueryPrivate> d;
577 NEPOMUKQUERY_EXPORT Query
operator&&(
const Query& query,
const Term& term );
587 NEPOMUKQUERY_EXPORT Query
operator||(
const Query& query,
const Term& term );
597 NEPOMUKQUERY_EXPORT Query
operator!(
const Query& query );
603 Q_DECLARE_OPERATORS_FOR_FLAGS( Nepomuk::Query::Query::SparqlFlags )
604 Q_DECLARE_OPERATORS_FOR_FLAGS( Nepomuk::Query::Query::QueryFlags )
The base class for all term types.
Query operator||(const Query &query, const Term &term)
Logical or operator which combines term into the term of query to match either one.
uint qHash(const Nepomuk::Query::Query &)
Query operator!(const Query &query)
Logical negation operator which negates the meaning of a query.
A request property can be added to a Query to retrieve additional information about the results.
QHash< QString, Nepomuk::Types::Property > RequestPropertyMap
Convinience definition for request property mappings as used in QueryServiceClient::sparqlQuery() and...
SparqlFlag
Aditional flags modifying the behaviour of toSparqlQuery() and toSearchUrl().
Query operator&&(const Query &query, const Term &term)
Logical and operator which combines term into the term of query to match both.
A Nepomuk desktop query specialized for file searches.
QDebug operator<<(QDebug dbg, const DateRange &range)
Debug streaming operator.
QueryFlag
A set of flags that influence the result of the query.
A property is a resource of type rdf:Property which relates a domain with a range....
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jan 30 2020 00:00:00 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.