GDataFreebaseSearchQuery

GDataFreebaseSearchQuery — GData Freebase query object

Stability Level

Stable, unless otherwise indicated

Properties

gchar * language Read / Write
gboolean stemmed Read / Write

Object Hierarchy

    GObject
    ╰── GDataQuery
        ╰── GDataFreebaseSearchQuery

Includes

#include <gdata/services/freebase/gdata-freebase-query.h>

Description

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.

Functions

gdata_freebase_search_query_new ()

GDataFreebaseSearchQuery *
gdata_freebase_search_query_new (const gchar *search_terms);

gdata_freebase_search_query_new has been deprecated since version 0.17.7 and should not be used in newly-written code.

Google Freebase has been permanently shut down.

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().

Parameters

search_terms

string to search for

 

Returns

a new GDataFreebaseSearchQuery; unref with g_object_unref().

[transfer full]

Since: 0.15.1


gdata_freebase_search_query_set_language ()

void
gdata_freebase_search_query_set_language
                               (GDataFreebaseSearchQuery *self,
                                const gchar *lang);

gdata_freebase_search_query_set_language has been deprecated since version 0.17.7 and should not be used in newly-written code.

Google Freebase has been permanently shut down.

Sets the language used, both on the search terms and the results. If unset, the locale preferences will be respected.

Parameters

self

a GDataFreebaseSearchQuery

 

lang

Language used on the search terms and results, in ISO-639-1 format, or NULL to unset.

[allow-none]

Since: 0.15.1


gdata_freebase_search_query_get_language ()

const gchar *
gdata_freebase_search_query_get_language
                               (GDataFreebaseSearchQuery *self);

gdata_freebase_search_query_get_language has been deprecated since version 0.17.7 and should not be used in newly-written code.

Google Freebase has been permanently shut down.

Gets the language set on the search query, or NULL if unset.

Parameters

Returns

The language used on the query.

[allow-none]

Since: 0.15.1


gdata_freebase_search_query_set_stemmed ()

void
gdata_freebase_search_query_set_stemmed
                               (GDataFreebaseSearchQuery *self,
                                gboolean stemmed);

gdata_freebase_search_query_set_stemmed has been deprecated since version 0.17.7 and should not be used in newly-written code.

Google Freebase has been permanently shut down.

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.

Parameters

self

a GDataFreebaseSearchQuery

 

stemmed

TRUE to perform stemming on the search results

 

Since: 0.15.1


gdata_freebase_search_query_get_stemmed ()

gboolean
gdata_freebase_search_query_get_stemmed
                               (GDataFreebaseSearchQuery *self);

gdata_freebase_search_query_get_stemmed has been deprecated since version 0.17.7 and should not be used in newly-written code.

Google Freebase has been permanently shut down.

Returns whether the GDataFreebaseSearchQuery will perform stemming on the search terms.

Parameters

Returns

TRUE if the GDataFreebaseSearchQuery performs stemming

Since: 0.15.1


gdata_freebase_search_query_open_filter ()

void
gdata_freebase_search_query_open_filter
                               (GDataFreebaseSearchQuery *self,
                                GDataFreebaseSearchFilterType filter_type);

gdata_freebase_search_query_open_filter has been deprecated since version 0.17.7 and should not be used in newly-written code.

Google Freebase has been permanently shut down.

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().

Parameters

self

a GDataFreebaseSearchQuery

 

filter_type

filter type

 

Since: 0.15.1


gdata_freebase_search_query_close_filter ()

void
gdata_freebase_search_query_close_filter
                               (GDataFreebaseSearchQuery *self);

gdata_freebase_search_query_close_filter has been deprecated since version 0.17.7 and should not be used in newly-written code.

Google Freebase has been permanently shut down.

Closes a filter level.

Parameters

Since: 0.15.1


gdata_freebase_search_query_add_filter ()

void
gdata_freebase_search_query_add_filter
                               (GDataFreebaseSearchQuery *self,
                                const gchar *property,
                                const gchar *value);

gdata_freebase_search_query_add_filter has been deprecated since version 0.17.7 and should not be used in newly-written code.

Google Freebase has been permanently shut down.

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().

Parameters

self

a GDataFreebaseSearchQuery

 

property

Freebase property ID

 

value

match string

 

Since: 0.15.1


gdata_freebase_search_query_add_location ()

void
gdata_freebase_search_query_add_location
                               (GDataFreebaseSearchQuery *self,
                                guint64 radius,
                                gdouble lat,
                                gdouble lon);

gdata_freebase_search_query_add_location has been deprecated since version 0.17.7 and should not be used in newly-written code.

Google Freebase has been permanently shut down.

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().

Parameters

self

a GDataFreebaseSearchQuery

 

radius

radius in meters

 

lat

latitude

 

lon

longitude

 

Since: 0.15.1

Types and Values

GDataFreebaseSearchQuery

typedef struct _GDataFreebaseSearchQuery GDataFreebaseSearchQuery;

GDataFreebaseSearchQuery is deprecated and should not be used in newly-written code.

All the fields in the GDataFreebaseSearchQuery structure are private and should never be accessed directly.

Since: 0.15.1


GDataFreebaseSearchQueryClass

typedef struct {
} GDataFreebaseSearchQueryClass;

GDataFreebaseSearchQueryClass is deprecated and should not be used in newly-written code.

All the fields in the GDataFreebaseSearchQueryClass structure are private and should never be accessed directly.

Since: 0.15.1


enum GDataFreebaseSearchFilterType

GDataFreebaseSearchFilterType is deprecated and should not be used in newly-written code.

Search filter container types.

Members

GDATA_FREEBASE_SEARCH_FILTER_ALL

all enclosed elements must match, logically an AND

 

GDATA_FREEBASE_SEARCH_FILTER_ANY

any of the enclosed elements must match, logically an OR

 

GDATA_FREEBASE_SEARCH_FILTER_NOT

the match is inverted.

 

Since: 0.15.1

Property Details

The “language” property

  “language”                 gchar *

Language used for search results, in ISO-639-1 format.

GDataFreebaseSearchQuery:language has been deprecated since version 0.17.7 and should not be used in newly-written code.

Google Freebase has been permanently shut down.

Flags: Read / Write

Default value: NULL

Since: 0.15.1


The “stemmed” property

  “stemmed”                  gboolean

Whether word stemming should happen on the search terms. If this property is enabled, words like eg. "natural", "naturally" or "nature" would be all reduced to the root "natur" for search purposes.

GDataFreebaseSearchQuery:stemmed has been deprecated since version 0.17.7 and should not be used in newly-written code.

Google Freebase has been permanently shut down.

Flags: Read / Write

Default value: FALSE

Since: 0.15.1