Nepomuk
query.h
Go to the documentation of this file.
A Nepomuk desktop query specialized for file searches.
Definition filequery.h:45
A request property can be added to a Query to retrieve additional information about the results.
Definition query.h:288
bool operator==(const RequestProperty &other) const
Comparison operator.
bool optional() const
Nepomuk::Types::Property property() const
RequestProperty(const Nepomuk::Types::Property &property, bool optional=true)
Create a new request property.
RequestProperty & operator=(const RequestProperty &)
Copy operator.
RequestProperty(const RequestProperty &)
Copy constructor.
void setOffset(int offset)
The first result that should be retrieved.
Query optimized() const
Optimizes the query without chaning its meaning.
static Query fromQueryUrl(const KUrl &url)
Extract a query from a nepomuksearch:/ query URL.
QList< RequestProperty > requestProperties() const
void setQueryFlags(QueryFlags flags)
Set the query flags to configure this query.
bool isValid() const
bool fullTextScoringEnabled() const
static QString sparqlFromQueryUrl(const KUrl &url)
Extract the SPARQL query from a nepomuksearch:/ query URL.
bool isFileQuery() const
static Query fromString(const QString &queryString)
Parse a Query that has been encoded as a string via toString().
void setRequestProperties(const QList< RequestProperty > &properties)
Set the properties that should be reported with each search result.
QString toSparqlQuery(SparqlFlags flags=NoFlags) const
Convert the query into a SPARQL query which can be used with the Nepomuk query service or directly in...
int limit() const
The maximum number of results that this query should yield.
@ WithoutFullTextExcerpt
Disables the return of full text search excerpts for ComparisonTerm::Contains terms which are normall...
Definition query.h:253
@ NoResultRestrictions
By default queries that will only return results which are intended for the user's eyes.
Definition query.h:245
Qt::SortOrder fullTextScoringSortOrder() const
QueryFlags queryFlags() const
Get the query flags to configure this query.
FileQuery toFileQuery() const
KUrl toSearchUrl(SparqlFlags flags=NoFlags) const
Convert the query into a URL which can be listed using KIO::DirLister.
static QString titleFromQueryUrl(const KUrl &url)
Extact the title from a nepomuksearch:/ query URL.
void setFullTextScoringSortOrder(Qt::SortOrder order)
Set the full text scoring sort order.
RequestPropertyMap requestPropertyMap() const
Build a request property map as used in QueryServiceClient::sparqlQuery() from the request properties...
void setLimit(int)
Set the maximum number of results this query should yield.
SparqlFlag
Aditional flags modifying the behaviour of toSparqlQuery() and toSearchUrl().
Definition query.h:369
@ HandleInverseProperties
Automatically handle inverse properties, consider for example nie:isPartOf and nie:hasPart at the sam...
Definition query.h:387
@ CreateCountQuery
Create a SPARQL count query which will return the number of results rather than the results themselve...
Definition query.h:380
@ CreateAskQuery
Create a SPARQL ask query which will simply check if a matching result exists.
Definition query.h:395
void setFullTextScoringEnabled(bool enabled)
Nepomuk supports scoring the results based on any full text matching used in the query (full text mat...
void addRequestProperty(const RequestProperty &property)
Add a property that should be reported with each search result.
A property is a resource of type rdf:Property which relates a domain with a range.
Definition property.h:53
The Query namespace contains all classes that make up the Nepomuk Query API.
uint qHash(const Nepomuk::Query::Query &)
QHash< QString, Nepomuk::Types::Property > RequestPropertyMap
Convinience definition for request property mappings as used in QueryServiceClient::sparqlQuery() and...
Definition query.h:47
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.