Top | ![]() |
![]() |
![]() |
![]() |
GDataFreebaseQuery represents a collection of query parameters specific to the Google Freebase service.
a GDataFreebaseQuery is built on top of a search term, further filters can be set on the search query
through gdata_freebase_search_query_add_filter()
or gdata_freebase_search_query_add_location()
. The filters
can be nested in sublevels, created through gdata_freebase_search_query_open_filter()
and gdata_freebase_search_query_close_filter()
.
For more details of Google Freebase API, see the online documentation.
GDataFreebaseSearchQuery *
gdata_freebase_search_query_new (const gchar *search_terms
);
Creates a new GDataFreebaseSearchQuery prepared to search for Freebase elements that
match the given search_terms
. Further filters on the query can be set through
gdata_freebase_search_query_add_filter()
or gdata_freebase_search_query_add_location()
.
Since: 0.15.1
void gdata_freebase_search_query_set_language (GDataFreebaseSearchQuery *self
,const gchar *lang
);
Sets the language used, both on the search terms and the results. If unset, the locale preferences will be respected.
self |
||
lang |
Language used on the search terms and results, in ISO-639-1 format, or |
[allow-none] |
Since: 0.15.1
const gchar *
gdata_freebase_search_query_get_language
(GDataFreebaseSearchQuery *self
);
Gets the language set on the search query, or NULL
if unset.
Since: 0.15.1
void gdata_freebase_search_query_set_stemmed (GDataFreebaseSearchQuery *self
,gboolean stemmed
);
Sets whether stemming is performed on the provided search terms. If stemmed
is TRUE
,
words like eg. "natural", "naturally" or "nature" would be all reduced to the root "natur"
for search purposes.
Since: 0.15.1
gboolean
gdata_freebase_search_query_get_stemmed
(GDataFreebaseSearchQuery *self
);
Returns whether the GDataFreebaseSearchQuery will perform stemming on the search terms.
Since: 0.15.1
void gdata_freebase_search_query_open_filter (GDataFreebaseSearchQuery *self
,GDataFreebaseSearchFilterType filter_type
);
Opens a container of filter rules, those are applied according to the behavior specified by filter_type
.
Every call to this function must be paired by a call to gdata_freebase_search_query_close_filter()
.
Since: 0.15.1
void
gdata_freebase_search_query_close_filter
(GDataFreebaseSearchQuery *self
);
Closes a filter level.
Since: 0.15.1
void gdata_freebase_search_query_add_filter (GDataFreebaseSearchQuery *self
,const gchar *property
,const gchar *value
);
Adds a property filter to the query. property filters are always nested in
containers, opened and closed through gdata_freebase_search_query_open_filter()
and gdata_freebase_search_query_close_filter()
.
Since: 0.15.1
void gdata_freebase_search_query_add_location (GDataFreebaseSearchQuery *self
,guint64 radius
,gdouble lat
,gdouble lon
);
Adds a geolocation filter to the query. location filters are always nested in
containers, opened and closed through gdata_freebase_search_query_open_filter()
and gdata_freebase_search_query_close_filter()
.
Since: 0.15.1
typedef struct _GDataFreebaseSearchQuery GDataFreebaseSearchQuery;
All the fields in the GDataFreebaseSearchQuery structure are private and should never be accessed directly.
Since: 0.15.1
typedef struct { } GDataFreebaseSearchQueryClass;
All the fields in the GDataFreebaseSearchQueryClass structure are private and should never be accessed directly.
Since: 0.15.1