TrackerResource

TrackerResource keeps track of a set of properties for a given resource. The resulting data can be serialized in several ways.

TrackerResource

GObject
    ╰──TrackerResource

The TrackerResource object represents information about a given resource.

Members

parent_instance (GObject) –
No description available

Class structure

TrackerResourceClass


Tracker.ResourceClass


Tracker.ResourceClass


Tracker.Resource

GObject.Object
    ╰──Tracker.Resource

The TrackerResource object represents information about a given resource.

Members

parent_instance (GObject.Object) –
No description available

Tracker.Resource

GObject.Object
    ╰──Tracker.Resource

The TrackerResource object represents information about a given resource.

Members

parent_instance (GObject.Object) –
No description available

Constructors

tracker_resource_new

TrackerResource *
tracker_resource_new (const char* identifier)

Creates a TrackerResource instance.

Parameters:

identifier ( [nullable])

A string containing a URI, or NULL.

Returns

a newly created TrackerResource. Free with g_object_unref when done


Tracker.Resource.prototype.new

function Tracker.Resource.prototype.new(identifier: String): {
    // javascript wrapper for 'tracker_resource_new'
}

Creates a TrackerResource instance.

Parameters:

identifier (String)

A string containing a URI, or null.

Returns (Tracker.Resource)

a newly created Tracker.Resource. Free with GObject.Object.prototype.unref when done


Tracker.Resource.new

def Tracker.Resource.new (identifier):
    #python wrapper for 'tracker_resource_new'

Creates a TrackerResource instance.

Parameters:

identifier (str)

A string containing a URI, or None.

Returns (Tracker.Resource)

a newly created Tracker.Resource. Free with GObject.Object.unref when done


Methods

tracker_resource_add_boolean

tracker_resource_add_boolean (TrackerResource * self,
                              const char* property_uri,
                              gboolean value)

Adds a boolean object to a multi-valued property.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object


Tracker.Resource.prototype.add_boolean

function Tracker.Resource.prototype.add_boolean(property_uri: String, value: Number): {
    // javascript wrapper for 'tracker_resource_add_boolean'
}

Adds a boolean object to a multi-valued property.

Parameters:

property_uri (String)

a string identifying the property to modify

value (Number)

the property object


Tracker.Resource.add_boolean

def Tracker.Resource.add_boolean (self, property_uri, value):
    #python wrapper for 'tracker_resource_add_boolean'

Adds a boolean object to a multi-valued property.

Parameters:

property_uri (str)

a string identifying the property to modify

value (bool)

the property object


tracker_resource_add_datetime

tracker_resource_add_datetime (TrackerResource * self,
                               const char* property_uri,
                               GDateTime * value)

Adds GDateTime object to the multi-valued property.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object

Since : 3.2


Tracker.Resource.prototype.add_datetime

function Tracker.Resource.prototype.add_datetime(property_uri: String, value: GLib.DateTime): {
    // javascript wrapper for 'tracker_resource_add_datetime'
}

Adds GDateTime object to the multi-valued property.

Parameters:

property_uri (String)

a string identifying the property to modify

value (GLib.DateTime)

the property object

Since : 3.2


Tracker.Resource.add_datetime

def Tracker.Resource.add_datetime (self, property_uri, value):
    #python wrapper for 'tracker_resource_add_datetime'

Adds GDateTime object to the multi-valued property.

Parameters:

property_uri (str)

a string identifying the property to modify

value (GLib.DateTime)

the property object

Since : 3.2


tracker_resource_add_double

tracker_resource_add_double (TrackerResource * self,
                             const char* property_uri,
                             double value)

Adds a double object to a multi-valued property.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object


Tracker.Resource.prototype.add_double

function Tracker.Resource.prototype.add_double(property_uri: String, value: Number): {
    // javascript wrapper for 'tracker_resource_add_double'
}

Adds a double object to a multi-valued property.

Parameters:

property_uri (String)

a string identifying the property to modify

value (Number)

the property object


Tracker.Resource.add_double

def Tracker.Resource.add_double (self, property_uri, value):
    #python wrapper for 'tracker_resource_add_double'

Adds a double object to a multi-valued property.

Parameters:

property_uri (str)

a string identifying the property to modify

value (float)

the property object


tracker_resource_add_gvalue

tracker_resource_add_gvalue (TrackerResource * self,
                             const char* property_uri,
                             const GValue * value)

Add 'value' to the list of values for given property.

You can pass any kind of GValue for value, but serialization functions will normally only be able to serialize URIs/relationships and fundamental value types (string, int, etc.).

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to set

value

an initialised GValue


Tracker.Resource.prototype.add_gvalue

function Tracker.Resource.prototype.add_gvalue(property_uri: String, value: GObject.Value): {
    // javascript wrapper for 'tracker_resource_add_gvalue'
}

Add 'value' to the list of values for given property.

You can pass any kind of GValue for value, but serialization functions will normally only be able to serialize URIs/relationships and fundamental value types (string, int, etc.).

Parameters:

property_uri (String)

a string identifying the property to set

value (GObject.Value)

an initialised GObject.Value


Tracker.Resource.add_gvalue

def Tracker.Resource.add_gvalue (self, property_uri, value):
    #python wrapper for 'tracker_resource_add_gvalue'

Add 'value' to the list of values for given property.

You can pass any kind of GValue for value, but serialization functions will normally only be able to serialize URIs/relationships and fundamental value types (string, int, etc.).

Parameters:

property_uri (str)

a string identifying the property to set

value (GObject.Value)

an initialised GObject.Value


tracker_resource_add_int

tracker_resource_add_int (TrackerResource * self,
                          const char* property_uri,
                          int value)

Adds an integer object to a multi-valued property.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object


Tracker.Resource.prototype.add_int

function Tracker.Resource.prototype.add_int(property_uri: String, value: Number): {
    // javascript wrapper for 'tracker_resource_add_int'
}

Adds an integer object to a multi-valued property.

Parameters:

property_uri (String)

a string identifying the property to modify

value (Number)

the property object


Tracker.Resource.add_int

def Tracker.Resource.add_int (self, property_uri, value):
    #python wrapper for 'tracker_resource_add_int'

Adds an integer object to a multi-valued property.

Parameters:

property_uri (str)

a string identifying the property to modify

value (int)

the property object


tracker_resource_add_int64

tracker_resource_add_int64 (TrackerResource * self,
                            const char* property_uri,
                            gint64 value)

Adds an integer object to a multi-valued property.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object


Tracker.Resource.prototype.add_int64

function Tracker.Resource.prototype.add_int64(property_uri: String, value: Number): {
    // javascript wrapper for 'tracker_resource_add_int64'
}

Adds an integer object to a multi-valued property.

Parameters:

property_uri (String)

a string identifying the property to modify

value (Number)

the property object


Tracker.Resource.add_int64

def Tracker.Resource.add_int64 (self, property_uri, value):
    #python wrapper for 'tracker_resource_add_int64'

Adds an integer object to a multi-valued property.

Parameters:

property_uri (str)

a string identifying the property to modify

value (int)

the property object


tracker_resource_add_relation

tracker_resource_add_relation (TrackerResource * self,
                               const char* property_uri,
                               TrackerResource * resource)

Adds a resource object to a multi-valued property. This function produces similar RDF to tracker_resource_add_uri, although in this function the URI will depend on the identifier set on resource.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

resource

the property object


Tracker.Resource.prototype.add_relation

function Tracker.Resource.prototype.add_relation(property_uri: String, resource: Tracker.Resource): {
    // javascript wrapper for 'tracker_resource_add_relation'
}

Adds a resource object to a multi-valued property. This function produces similar RDF to Tracker.Resource.prototype.add_uri, although in this function the URI will depend on the identifier set on resource.

Parameters:

property_uri (String)

a string identifying the property to modify

resource (Tracker.Resource)

the property object


Tracker.Resource.add_relation

def Tracker.Resource.add_relation (self, property_uri, resource):
    #python wrapper for 'tracker_resource_add_relation'

Adds a resource object to a multi-valued property. This function produces similar RDF to Tracker.Resource.add_uri, although in this function the URI will depend on the identifier set on resource.

Parameters:

property_uri (str)

a string identifying the property to modify

resource (Tracker.Resource)

the property object


tracker_resource_add_string

tracker_resource_add_string (TrackerResource * self,
                             const char* property_uri,
                             const char* value)

Adds a string object to a multi-valued property.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object


Tracker.Resource.prototype.add_string

function Tracker.Resource.prototype.add_string(property_uri: String, value: String): {
    // javascript wrapper for 'tracker_resource_add_string'
}

Adds a string object to a multi-valued property.

Parameters:

property_uri (String)

a string identifying the property to modify

value (String)

the property object


Tracker.Resource.add_string

def Tracker.Resource.add_string (self, property_uri, value):
    #python wrapper for 'tracker_resource_add_string'

Adds a string object to a multi-valued property.

Parameters:

property_uri (str)

a string identifying the property to modify

value (str)

the property object


tracker_resource_add_take_relation

tracker_resource_add_take_relation (TrackerResource * self,
                                    const char* property_uri,
                                    TrackerResource * resource)

Adds a resource object to a multi-valued property. This function produces similar RDF to tracker_resource_add_uri, although in this function the URI will depend on the identifier set on resource. This function takes ownership of resource.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

resource

the property object


tracker_resource_add_uri

tracker_resource_add_uri (TrackerResource * self,
                          const char* property_uri,
                          const char* value)

Adds a resource object to a multi-valued property. This function produces similar RDF to tracker_resource_add_relation, although it requires that the URI is previously known.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object


Tracker.Resource.prototype.add_uri

function Tracker.Resource.prototype.add_uri(property_uri: String, value: String): {
    // javascript wrapper for 'tracker_resource_add_uri'
}

Adds a resource object to a multi-valued property. This function produces similar RDF to Tracker.Resource.prototype.add_relation, although it requires that the URI is previously known.

Parameters:

property_uri (String)

a string identifying the property to modify

value (String)

the property object


Tracker.Resource.add_uri

def Tracker.Resource.add_uri (self, property_uri, value):
    #python wrapper for 'tracker_resource_add_uri'

Adds a resource object to a multi-valued property. This function produces similar RDF to Tracker.Resource.add_relation, although it requires that the URI is previously known.

Parameters:

property_uri (str)

a string identifying the property to modify

value (str)

the property object


tracker_resource_get_first_boolean

gboolean
tracker_resource_get_first_boolean (TrackerResource * self,
                                    const char* property_uri)

Returns the first boolean object previously assigned to a property.

Parameters:

self

A TrackerResource

property_uri

a string identifying the property to look up

Returns

the first boolean object


Tracker.Resource.prototype.get_first_boolean

function Tracker.Resource.prototype.get_first_boolean(property_uri: String): {
    // javascript wrapper for 'tracker_resource_get_first_boolean'
}

Returns the first boolean object previously assigned to a property.

Parameters:

property_uri (String)

a string identifying the property to look up

Returns (Number)

the first boolean object


Tracker.Resource.get_first_boolean

def Tracker.Resource.get_first_boolean (self, property_uri):
    #python wrapper for 'tracker_resource_get_first_boolean'

Returns the first boolean object previously assigned to a property.

Parameters:

property_uri (str)

a string identifying the property to look up

Returns (bool)

the first boolean object


tracker_resource_get_first_datetime

GDateTime *
tracker_resource_get_first_datetime (TrackerResource * self,
                                     const char* property_uri)

Returns the first resource object previously assigned to a property.

Parameters:

self

A TrackerResource

property_uri

a string identifying the property to look up

Returns

the first GDateTime object

Since : 3.2


Tracker.Resource.prototype.get_first_datetime

function Tracker.Resource.prototype.get_first_datetime(property_uri: String): {
    // javascript wrapper for 'tracker_resource_get_first_datetime'
}

Returns the first resource object previously assigned to a property.

Parameters:

property_uri (String)

a string identifying the property to look up

Returns (GLib.DateTime)

the first GDateTime object

Since : 3.2


Tracker.Resource.get_first_datetime

def Tracker.Resource.get_first_datetime (self, property_uri):
    #python wrapper for 'tracker_resource_get_first_datetime'

Returns the first resource object previously assigned to a property.

Parameters:

property_uri (str)

a string identifying the property to look up

Returns (GLib.DateTime)

the first GDateTime object

Since : 3.2


tracker_resource_get_first_double

double
tracker_resource_get_first_double (TrackerResource * self,
                                   const char* property_uri)

Returns the first double object previously assigned to a property.

Parameters:

self

A TrackerResource

property_uri

a string identifying the property to look up

Returns

the first double object


Tracker.Resource.prototype.get_first_double

function Tracker.Resource.prototype.get_first_double(property_uri: String): {
    // javascript wrapper for 'tracker_resource_get_first_double'
}

Returns the first double object previously assigned to a property.

Parameters:

property_uri (String)

a string identifying the property to look up

Returns (Number)

the first double object


Tracker.Resource.get_first_double

def Tracker.Resource.get_first_double (self, property_uri):
    #python wrapper for 'tracker_resource_get_first_double'

Returns the first double object previously assigned to a property.

Parameters:

property_uri (str)

a string identifying the property to look up

Returns (float)

the first double object


tracker_resource_get_first_int

int
tracker_resource_get_first_int (TrackerResource * self,
                                const char* property_uri)

Returns the first integer object previously assigned to a property.

Parameters:

self

A TrackerResource

property_uri

a string identifying the property to look up

Returns

the first integer object


Tracker.Resource.prototype.get_first_int

function Tracker.Resource.prototype.get_first_int(property_uri: String): {
    // javascript wrapper for 'tracker_resource_get_first_int'
}

Returns the first integer object previously assigned to a property.

Parameters:

property_uri (String)

a string identifying the property to look up

Returns (Number)

the first integer object


Tracker.Resource.get_first_int

def Tracker.Resource.get_first_int (self, property_uri):
    #python wrapper for 'tracker_resource_get_first_int'

Returns the first integer object previously assigned to a property.

Parameters:

property_uri (str)

a string identifying the property to look up

Returns (int)

the first integer object


tracker_resource_get_first_int64

gint64
tracker_resource_get_first_int64 (TrackerResource * self,
                                  const char* property_uri)

Returns the first integer object previously assigned to a property.

Parameters:

self

A TrackerResource

property_uri

a string identifying the property to look up

Returns

the first integer object


Tracker.Resource.prototype.get_first_int64

function Tracker.Resource.prototype.get_first_int64(property_uri: String): {
    // javascript wrapper for 'tracker_resource_get_first_int64'
}

Returns the first integer object previously assigned to a property.

Parameters:

property_uri (String)

a string identifying the property to look up

Returns (Number)

the first integer object


Tracker.Resource.get_first_int64

def Tracker.Resource.get_first_int64 (self, property_uri):
    #python wrapper for 'tracker_resource_get_first_int64'

Returns the first integer object previously assigned to a property.

Parameters:

property_uri (str)

a string identifying the property to look up

Returns (int)

the first integer object


tracker_resource_get_first_relation

TrackerResource *
tracker_resource_get_first_relation (TrackerResource * self,
                                     const char* property_uri)

Returns the first resource object previously assigned to a property.

Parameters:

self

A TrackerResource

property_uri

a string identifying the property to look up

Returns ( [transfer: none])

the first resource object


Tracker.Resource.prototype.get_first_relation

function Tracker.Resource.prototype.get_first_relation(property_uri: String): {
    // javascript wrapper for 'tracker_resource_get_first_relation'
}

Returns the first resource object previously assigned to a property.

Parameters:

property_uri (String)

a string identifying the property to look up

Returns (Tracker.Resource)

the first resource object


Tracker.Resource.get_first_relation

def Tracker.Resource.get_first_relation (self, property_uri):
    #python wrapper for 'tracker_resource_get_first_relation'

Returns the first resource object previously assigned to a property.

Parameters:

property_uri (str)

a string identifying the property to look up

Returns (Tracker.Resource)

the first resource object


tracker_resource_get_first_string

const char*
tracker_resource_get_first_string (TrackerResource * self,
                                   const char* property_uri)

Returns the first string object previously assigned to a property.

Parameters:

self

A TrackerResource

property_uri

a string identifying the property to look up

Returns

the first string object


Tracker.Resource.prototype.get_first_string

function Tracker.Resource.prototype.get_first_string(property_uri: String): {
    // javascript wrapper for 'tracker_resource_get_first_string'
}

Returns the first string object previously assigned to a property.

Parameters:

property_uri (String)

a string identifying the property to look up

Returns (String)

the first string object


Tracker.Resource.get_first_string

def Tracker.Resource.get_first_string (self, property_uri):
    #python wrapper for 'tracker_resource_get_first_string'

Returns the first string object previously assigned to a property.

Parameters:

property_uri (str)

a string identifying the property to look up

Returns (str)

the first string object


tracker_resource_get_first_uri

const char*
tracker_resource_get_first_uri (TrackerResource * self,
                                const char* property_uri)

Returns the first resource object previously assigned to a property.

Parameters:

self

A TrackerResource

property_uri

a string identifying the property to look up

Returns

the first resource object as an URI.


Tracker.Resource.prototype.get_first_uri

function Tracker.Resource.prototype.get_first_uri(property_uri: String): {
    // javascript wrapper for 'tracker_resource_get_first_uri'
}

Returns the first resource object previously assigned to a property.

Parameters:

property_uri (String)

a string identifying the property to look up

Returns (String)

the first resource object as an URI.


Tracker.Resource.get_first_uri

def Tracker.Resource.get_first_uri (self, property_uri):
    #python wrapper for 'tracker_resource_get_first_uri'

Returns the first resource object previously assigned to a property.

Parameters:

property_uri (str)

a string identifying the property to look up

Returns (str)

the first resource object as an URI.


tracker_resource_get_identifier

const char*
tracker_resource_get_identifier (TrackerResource * self)

Returns the identifier of a resource.

If the identifier was set to NULL, the identifier returned will be a unique SPARQL blank node identifier, such as "_:123".

Parameters:

self

A TrackerResource

Returns

a string owned by the resource


Tracker.Resource.prototype.get_identifier

function Tracker.Resource.prototype.get_identifier(): {
    // javascript wrapper for 'tracker_resource_get_identifier'
}

Returns the identifier of a resource.

If the identifier was set to NULL, the identifier returned will be a unique SPARQL blank node identifier, such as "_:123".

Parameters:

Returns (String)

a string owned by the resource


Tracker.Resource.get_identifier

def Tracker.Resource.get_identifier (self):
    #python wrapper for 'tracker_resource_get_identifier'

Returns the identifier of a resource.

If the identifier was set to NULL, the identifier returned will be a unique SPARQL blank node identifier, such as "_:123".

Parameters:

Returns (str)

a string owned by the resource


tracker_resource_get_properties

GList *
tracker_resource_get_properties (TrackerResource * resource)

Gets the list of properties defined in resource

Parameters:

resource

a TrackerResource

Returns ( [transfer: container][element-typeutf8])

The list of properties. The list should be freed with g_list_free.

Since : 3.0


Tracker.Resource.prototype.get_properties

function Tracker.Resource.prototype.get_properties(): {
    // javascript wrapper for 'tracker_resource_get_properties'
}

Gets the list of properties defined in resource

Parameters:

Returns ([ String ])

The list of properties. The list should be freed with g_list_free (not introspectable).

Since : 3.0


Tracker.Resource.get_properties

def Tracker.Resource.get_properties (self):
    #python wrapper for 'tracker_resource_get_properties'

Gets the list of properties defined in resource

Parameters:

Returns ([ str ])

The list of properties. The list should be freed with g_list_free (not introspectable).

Since : 3.0


tracker_resource_get_property_overwrite

gboolean
tracker_resource_get_property_overwrite (TrackerResource * resource,
                                         const gchar * property_uri)

Returns whether the prior values for this property would be deleted in the SPARQL issued by resource.

Parameters:

resource

a TrackerResource

property_uri

a string identifying the property to query

Returns

TRUE if the property would be overwritten

Since : 3.1


Tracker.Resource.prototype.get_property_overwrite

function Tracker.Resource.prototype.get_property_overwrite(property_uri: String): {
    // javascript wrapper for 'tracker_resource_get_property_overwrite'
}

Returns whether the prior values for this property would be deleted in the SPARQL issued by resource.

Parameters:

property_uri (String)

a string identifying the property to query

Returns (Number)

true if the property would be overwritten

Since : 3.1


Tracker.Resource.get_property_overwrite

def Tracker.Resource.get_property_overwrite (self, property_uri):
    #python wrapper for 'tracker_resource_get_property_overwrite'

Returns whether the prior values for this property would be deleted in the SPARQL issued by resource.

Parameters:

property_uri (str)

a string identifying the property to query

Returns (bool)

True if the property would be overwritten

Since : 3.1


tracker_resource_get_values

GList *
tracker_resource_get_values (TrackerResource * self,
                             const char* property_uri)

Returns the list of all known values of the given property.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to look up

Returns ( [transfer: container][element-typeGValue])

a GList of GValue instances. The list should be freed with g_list_free


Tracker.Resource.prototype.get_values

function Tracker.Resource.prototype.get_values(property_uri: String): {
    // javascript wrapper for 'tracker_resource_get_values'
}

Returns the list of all known values of the given property.

Parameters:

property_uri (String)

a string identifying the property to look up

Returns ([ GObject.Value ])

a GLib.List of GObject.Value instances. The list should be freed with g_list_free (not introspectable)


Tracker.Resource.get_values

def Tracker.Resource.get_values (self, property_uri):
    #python wrapper for 'tracker_resource_get_values'

Returns the list of all known values of the given property.

Parameters:

property_uri (str)

a string identifying the property to look up

Returns ([ GObject.Value ])

a GLib.List of GObject.Value instances. The list should be freed with g_list_free (not introspectable)


tracker_resource_identifier_compare_func

gint
tracker_resource_identifier_compare_func (TrackerResource * resource,
                                          const char* identifier)

A helper function that compares a TrackerResource by its identifier string.

Parameters:

resource

a TrackerResource

identifier

a string identifying the resource

Returns

an integer less than, equal to, or greater than zero, if the resource identifier is <, == or > than identifier


Tracker.Resource.prototype.identifier_compare_func

function Tracker.Resource.prototype.identifier_compare_func(identifier: String): {
    // javascript wrapper for 'tracker_resource_identifier_compare_func'
}

A helper function that compares a Tracker.Resource by its identifier string.

Parameters:

identifier (String)

a string identifying the resource

Returns (Number)

an integer less than, equal to, or greater than zero, if the resource identifier is <, == or > than identifier


Tracker.Resource.identifier_compare_func

def Tracker.Resource.identifier_compare_func (self, identifier):
    #python wrapper for 'tracker_resource_identifier_compare_func'

A helper function that compares a Tracker.Resource by its identifier string.

Parameters:

identifier (str)

a string identifying the resource

Returns (int)

an integer less than, equal to, or greater than zero, if the resource identifier is <, == or > than identifier


tracker_resource_print_jsonld

char*
tracker_resource_print_jsonld (TrackerResource * self,
                               TrackerNamespaceManager * namespaces)

Serialize all the information in resource as a JSON-LD document.

See http://www.jsonld.org/ for more information on the JSON-LD serialization format.

The namespaces object is used to expand any compact URI values. In most cases you should pass the one returned by tracker_sparql_connection_get_namespace_manager from the connection that is the intended recipient of this data.

Parameters:

self

a TrackerResource

namespaces ( [allow-none])

a set of prefixed URLs, or NULL to use the Nepomuk set

Returns

a newly-allocated string containing JSON-LD data.


Tracker.Resource.prototype.print_jsonld

function Tracker.Resource.prototype.print_jsonld(namespaces: Tracker.NamespaceManager): {
    // javascript wrapper for 'tracker_resource_print_jsonld'
}

Serialize all the information in resource as a JSON-LD document.

See http://www.jsonld.org/ for more information on the JSON-LD serialization format.

The namespaces object is used to expand any compact URI values. In most cases you should pass the one returned by Tracker.SparqlConnection.prototype.get_namespace_manager from the connection that is the intended recipient of this data.

Parameters:

namespaces (Tracker.NamespaceManager)

a set of prefixed URLs, or null to use the Nepomuk set

Returns (String)

a newly-allocated string containing JSON-LD data.


Tracker.Resource.print_jsonld

def Tracker.Resource.print_jsonld (self, namespaces):
    #python wrapper for 'tracker_resource_print_jsonld'

Serialize all the information in resource as a JSON-LD document.

See http://www.jsonld.org/ for more information on the JSON-LD serialization format.

The namespaces object is used to expand any compact URI values. In most cases you should pass the one returned by Tracker.SparqlConnection.get_namespace_manager from the connection that is the intended recipient of this data.

Parameters:

namespaces (Tracker.NamespaceManager)

a set of prefixed URLs, or None to use the Nepomuk set

Returns (str)

a newly-allocated string containing JSON-LD data.


tracker_resource_print_rdf

char*
tracker_resource_print_rdf (TrackerResource * self,
                            TrackerNamespaceManager * namespaces,
                            TrackerRdfFormat format,
                            const gchar * graph)

Serialize all the information in resource into the selected RDF format.

The namespaces object is used to expand any compact URI values. In most cases you should pass the one returned by tracker_sparql_connection_get_namespace_manager from the connection that is the intended recipient of this data.

Parameters:

self

a TrackerResource

namespaces

a set of prefixed URLs

format

RDF format of the printed string

graph

target graph of the resource RDF, or NULL for the default graph

Returns

a newly-allocated string containing RDF data in the requested format.

Since : 3.4


Tracker.Resource.prototype.print_rdf

function Tracker.Resource.prototype.print_rdf(namespaces: Tracker.NamespaceManager, format: Tracker.RdfFormat, graph: String): {
    // javascript wrapper for 'tracker_resource_print_rdf'
}

Serialize all the information in resource into the selected RDF format.

The namespaces object is used to expand any compact URI values. In most cases you should pass the one returned by Tracker.SparqlConnection.prototype.get_namespace_manager from the connection that is the intended recipient of this data.

Parameters:

namespaces (Tracker.NamespaceManager)

a set of prefixed URLs

format (Tracker.RdfFormat)

RDF format of the printed string

graph (String)

target graph of the resource RDF, or null for the default graph

Returns (String)

a newly-allocated string containing RDF data in the requested format.

Since : 3.4


Tracker.Resource.print_rdf

def Tracker.Resource.print_rdf (self, namespaces, format, graph):
    #python wrapper for 'tracker_resource_print_rdf'

Serialize all the information in resource into the selected RDF format.

The namespaces object is used to expand any compact URI values. In most cases you should pass the one returned by Tracker.SparqlConnection.get_namespace_manager from the connection that is the intended recipient of this data.

Parameters:

namespaces (Tracker.NamespaceManager)

a set of prefixed URLs

format (Tracker.RdfFormat)

RDF format of the printed string

graph (str)

target graph of the resource RDF, or None for the default graph

Returns (str)

a newly-allocated string containing RDF data in the requested format.

Since : 3.4


tracker_resource_print_sparql_update

char*
tracker_resource_print_sparql_update (TrackerResource * self,
                                      TrackerNamespaceManager * namespaces,
                                      const char* graph_id)

Generates a SPARQL command to update a database with the information stored in resource.

The namespaces object is used to expand any compact URI values. In most cases you should pass the one returned by tracker_sparql_connection_get_namespace_manager from the connection that is the intended recipient of this data.

Parameters:

self

a TrackerResource

namespaces ( [allow-none])

a set of prefixed URLs, or NULL to use the Nepomuk set

graph_id ( [allow-none])

the URN of the graph the data should be added to, or NULL

Returns

a newly-allocated string containing a SPARQL update command.


Tracker.Resource.prototype.print_sparql_update

function Tracker.Resource.prototype.print_sparql_update(namespaces: Tracker.NamespaceManager, graph_id: String): {
    // javascript wrapper for 'tracker_resource_print_sparql_update'
}

Generates a SPARQL command to update a database with the information stored in resource.

The namespaces object is used to expand any compact URI values. In most cases you should pass the one returned by Tracker.SparqlConnection.prototype.get_namespace_manager from the connection that is the intended recipient of this data.

Parameters:

namespaces (Tracker.NamespaceManager)

a set of prefixed URLs, or null to use the Nepomuk set

graph_id (String)

the URN of the graph the data should be added to, or null

Returns (String)

a newly-allocated string containing a SPARQL update command.


Tracker.Resource.print_sparql_update

def Tracker.Resource.print_sparql_update (self, namespaces, graph_id):
    #python wrapper for 'tracker_resource_print_sparql_update'

Generates a SPARQL command to update a database with the information stored in resource.

The namespaces object is used to expand any compact URI values. In most cases you should pass the one returned by Tracker.SparqlConnection.get_namespace_manager from the connection that is the intended recipient of this data.

Parameters:

namespaces (Tracker.NamespaceManager)

a set of prefixed URLs, or None to use the Nepomuk set

graph_id (str)

the URN of the graph the data should be added to, or None

Returns (str)

a newly-allocated string containing a SPARQL update command.


tracker_resource_print_turtle

char*
tracker_resource_print_turtle (TrackerResource * self,
                               TrackerNamespaceManager * namespaces)

Serialize all the information in resource as a Turtle document.

The generated Turtle should correspond to this standard: https://www.w3.org/TR/2014/REC-turtle-20140225/

The namespaces object is used to expand any compact URI values. In most cases you should pass the one returned by tracker_sparql_connection_get_namespace_manager from the connection that is the intended recipient of this data.

Parameters:

self

a TrackerResource

namespaces ( [allow-none])

a set of prefixed URLs, or NULL to use the Nepomuk set

Returns

a newly-allocated string

deprecated : 3.4: Use tracker_resource_print_rdf() instead.


Tracker.Resource.prototype.print_turtle

function Tracker.Resource.prototype.print_turtle(namespaces: Tracker.NamespaceManager): {
    // javascript wrapper for 'tracker_resource_print_turtle'
}

Serialize all the information in resource as a Turtle document.

The generated Turtle should correspond to this standard: https://www.w3.org/TR/2014/REC-turtle-20140225/

The namespaces object is used to expand any compact URI values. In most cases you should pass the one returned by Tracker.SparqlConnection.prototype.get_namespace_manager from the connection that is the intended recipient of this data.

Parameters:

namespaces (Tracker.NamespaceManager)

a set of prefixed URLs, or null to use the Nepomuk set

Returns (String)

a newly-allocated string

deprecated : 3.4: Use tracker_resource_print_rdf() instead.


Tracker.Resource.print_turtle

def Tracker.Resource.print_turtle (self, namespaces):
    #python wrapper for 'tracker_resource_print_turtle'

Serialize all the information in resource as a Turtle document.

The generated Turtle should correspond to this standard: https://www.w3.org/TR/2014/REC-turtle-20140225/

The namespaces object is used to expand any compact URI values. In most cases you should pass the one returned by Tracker.SparqlConnection.get_namespace_manager from the connection that is the intended recipient of this data.

Parameters:

namespaces (Tracker.NamespaceManager)

a set of prefixed URLs, or None to use the Nepomuk set

Returns (str)

a newly-allocated string

deprecated : 3.4: Use tracker_resource_print_rdf() instead.


tracker_resource_serialize

GVariant *
tracker_resource_serialize (TrackerResource * resource)

Serializes a TrackerResource to a GVariant in a lossless way. All child resources are subsequently serialized. It is implied that both ends use a common TrackerNamespaceManager.

Parameters:

resource

A TrackerResource

Returns ( [transfer: full])

A variant describing the resource, the reference is floating.


Tracker.Resource.prototype.serialize

function Tracker.Resource.prototype.serialize(): {
    // javascript wrapper for 'tracker_resource_serialize'
}

Serializes a Tracker.Resource to a GLib.Variant in a lossless way. All child resources are subsequently serialized. It is implied that both ends use a common Tracker.NamespaceManager.

Parameters:

Returns (GLib.Variant)

A variant describing the resource, the reference is floating.


Tracker.Resource.serialize

def Tracker.Resource.serialize (self):
    #python wrapper for 'tracker_resource_serialize'

Serializes a Tracker.Resource to a GLib.Variant in a lossless way. All child resources are subsequently serialized. It is implied that both ends use a common Tracker.NamespaceManager.

Parameters:

Returns (GLib.Variant)

A variant describing the resource, the reference is floating.


tracker_resource_set_boolean

tracker_resource_set_boolean (TrackerResource * self,
                              const char* property_uri,
                              gboolean value)

Sets a single-valued boolean object.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object


Tracker.Resource.prototype.set_boolean

function Tracker.Resource.prototype.set_boolean(property_uri: String, value: Number): {
    // javascript wrapper for 'tracker_resource_set_boolean'
}

Sets a single-valued boolean object.

Parameters:

property_uri (String)

a string identifying the property to modify

value (Number)

the property object


Tracker.Resource.set_boolean

def Tracker.Resource.set_boolean (self, property_uri, value):
    #python wrapper for 'tracker_resource_set_boolean'

Sets a single-valued boolean object.

Parameters:

property_uri (str)

a string identifying the property to modify

value (bool)

the property object


tracker_resource_set_datetime

tracker_resource_set_datetime (TrackerResource * self,
                               const char* property_uri,
                               GDateTime * value)

Sets a single-valued GDateTime as a TrackerResource

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object

Since : 3.2


Tracker.Resource.prototype.set_datetime

function Tracker.Resource.prototype.set_datetime(property_uri: String, value: GLib.DateTime): {
    // javascript wrapper for 'tracker_resource_set_datetime'
}

Sets a single-valued GDateTime as a Tracker.Resource

Parameters:

property_uri (String)

a string identifying the property to modify

value (GLib.DateTime)

the property object

Since : 3.2


Tracker.Resource.set_datetime

def Tracker.Resource.set_datetime (self, property_uri, value):
    #python wrapper for 'tracker_resource_set_datetime'

Sets a single-valued GDateTime as a Tracker.Resource

Parameters:

property_uri (str)

a string identifying the property to modify

value (GLib.DateTime)

the property object

Since : 3.2


tracker_resource_set_double

tracker_resource_set_double (TrackerResource * self,
                             const char* property_uri,
                             double value)

Sets a single-valued double object.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object


Tracker.Resource.prototype.set_double

function Tracker.Resource.prototype.set_double(property_uri: String, value: Number): {
    // javascript wrapper for 'tracker_resource_set_double'
}

Sets a single-valued double object.

Parameters:

property_uri (String)

a string identifying the property to modify

value (Number)

the property object


Tracker.Resource.set_double

def Tracker.Resource.set_double (self, property_uri, value):
    #python wrapper for 'tracker_resource_set_double'

Sets a single-valued double object.

Parameters:

property_uri (str)

a string identifying the property to modify

value (float)

the property object


tracker_resource_set_gvalue

tracker_resource_set_gvalue (TrackerResource * self,
                             const char* property_uri,
                             const GValue * value)

State that the only value for the given property is 'value'. Any existing values for 'property' will be removed.

When serialising to SPARQL, any properties that were set with this function will get a corresponding DELETE statement to remove any existing values in the database.

You can pass any kind of GValue for value, but serialization functions will normally only be able to serialize URIs/relationships and fundamental value types (string, int, etc.).

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to set

value

an initialised GValue


Tracker.Resource.prototype.set_gvalue

function Tracker.Resource.prototype.set_gvalue(property_uri: String, value: GObject.Value): {
    // javascript wrapper for 'tracker_resource_set_gvalue'
}

State that the only value for the given property is 'value'. Any existing values for 'property' will be removed.

When serialising to SPARQL, any properties that were set with this function will get a corresponding DELETE statement to remove any existing values in the database.

You can pass any kind of GValue for value, but serialization functions will normally only be able to serialize URIs/relationships and fundamental value types (string, int, etc.).

Parameters:

property_uri (String)

a string identifying the property to set

value (GObject.Value)

an initialised GObject.Value


Tracker.Resource.set_gvalue

def Tracker.Resource.set_gvalue (self, property_uri, value):
    #python wrapper for 'tracker_resource_set_gvalue'

State that the only value for the given property is 'value'. Any existing values for 'property' will be removed.

When serialising to SPARQL, any properties that were set with this function will get a corresponding DELETE statement to remove any existing values in the database.

You can pass any kind of GValue for value, but serialization functions will normally only be able to serialize URIs/relationships and fundamental value types (string, int, etc.).

Parameters:

property_uri (str)

a string identifying the property to set

value (GObject.Value)

an initialised GObject.Value


tracker_resource_set_identifier

tracker_resource_set_identifier (TrackerResource * self,
                                 const char* identifier)

Changes the identifier of a TrackerResource. The identifier should be a URI or compact URI, but this is not necessarily enforced. Invalid identifiers may cause errors when serializing the resource or trying to insert the results in a database.

If the identifier is set to NULL, a SPARQL blank node identifier such as "_:123" is assigned to the resource.

Parameters:

self

a TrackerResource

identifier ( [allow-none])

a string identifying the resource


Tracker.Resource.prototype.set_identifier

function Tracker.Resource.prototype.set_identifier(identifier: String): {
    // javascript wrapper for 'tracker_resource_set_identifier'
}

Changes the identifier of a Tracker.Resource. The identifier should be a URI or compact URI, but this is not necessarily enforced. Invalid identifiers may cause errors when serializing the resource or trying to insert the results in a database.

If the identifier is set to NULL, a SPARQL blank node identifier such as "_:123" is assigned to the resource.

Parameters:

identifier (String)

a string identifying the resource


Tracker.Resource.set_identifier

def Tracker.Resource.set_identifier (self, identifier):
    #python wrapper for 'tracker_resource_set_identifier'

Changes the identifier of a Tracker.Resource. The identifier should be a URI or compact URI, but this is not necessarily enforced. Invalid identifiers may cause errors when serializing the resource or trying to insert the results in a database.

If the identifier is set to NULL, a SPARQL blank node identifier such as "_:123" is assigned to the resource.

Parameters:

identifier (str)

a string identifying the resource


tracker_resource_set_int

tracker_resource_set_int (TrackerResource * self,
                          const char* property_uri,
                          int value)

Sets a single-valued integer object.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object


Tracker.Resource.prototype.set_int

function Tracker.Resource.prototype.set_int(property_uri: String, value: Number): {
    // javascript wrapper for 'tracker_resource_set_int'
}

Sets a single-valued integer object.

Parameters:

property_uri (String)

a string identifying the property to modify

value (Number)

the property object


Tracker.Resource.set_int

def Tracker.Resource.set_int (self, property_uri, value):
    #python wrapper for 'tracker_resource_set_int'

Sets a single-valued integer object.

Parameters:

property_uri (str)

a string identifying the property to modify

value (int)

the property object


tracker_resource_set_int64

tracker_resource_set_int64 (TrackerResource * self,
                            const char* property_uri,
                            gint64 value)

Sets a single-valued integer object.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object


Tracker.Resource.prototype.set_int64

function Tracker.Resource.prototype.set_int64(property_uri: String, value: Number): {
    // javascript wrapper for 'tracker_resource_set_int64'
}

Sets a single-valued integer object.

Parameters:

property_uri (String)

a string identifying the property to modify

value (Number)

the property object


Tracker.Resource.set_int64

def Tracker.Resource.set_int64 (self, property_uri, value):
    #python wrapper for 'tracker_resource_set_int64'

Sets a single-valued integer object.

Parameters:

property_uri (str)

a string identifying the property to modify

value (int)

the property object


tracker_resource_set_relation

tracker_resource_set_relation (TrackerResource * self,
                               const char* property_uri,
                               TrackerResource * resource)

Sets a single-valued resource object as a TrackerResource. This function produces similar RDF to tracker_resource_set_uri, although in this function the URI will depend on the identifier set on resource.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

resource

the property object


Tracker.Resource.prototype.set_relation

function Tracker.Resource.prototype.set_relation(property_uri: String, resource: Tracker.Resource): {
    // javascript wrapper for 'tracker_resource_set_relation'
}

Sets a single-valued resource object as a Tracker.Resource. This function produces similar RDF to Tracker.Resource.prototype.set_uri, although in this function the URI will depend on the identifier set on resource.

Parameters:

property_uri (String)

a string identifying the property to modify

resource (Tracker.Resource)

the property object


Tracker.Resource.set_relation

def Tracker.Resource.set_relation (self, property_uri, resource):
    #python wrapper for 'tracker_resource_set_relation'

Sets a single-valued resource object as a Tracker.Resource. This function produces similar RDF to Tracker.Resource.set_uri, although in this function the URI will depend on the identifier set on resource.

Parameters:

property_uri (str)

a string identifying the property to modify

resource (Tracker.Resource)

the property object


tracker_resource_set_string

tracker_resource_set_string (TrackerResource * self,
                             const char* property_uri,
                             const char* value)

Sets a single-valued string object.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object


Tracker.Resource.prototype.set_string

function Tracker.Resource.prototype.set_string(property_uri: String, value: String): {
    // javascript wrapper for 'tracker_resource_set_string'
}

Sets a single-valued string object.

Parameters:

property_uri (String)

a string identifying the property to modify

value (String)

the property object


Tracker.Resource.set_string

def Tracker.Resource.set_string (self, property_uri, value):
    #python wrapper for 'tracker_resource_set_string'

Sets a single-valued string object.

Parameters:

property_uri (str)

a string identifying the property to modify

value (str)

the property object


tracker_resource_set_take_relation

tracker_resource_set_take_relation (TrackerResource * self,
                                    const char* property_uri,
                                    TrackerResource * resource)

Sets a single-valued resource object as a TrackerResource. This function produces similar RDF to tracker_resource_set_uri, although in this function the URI will depend on the identifier set on resource. This function takes ownership of resource.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

resource

the property object


tracker_resource_set_uri

tracker_resource_set_uri (TrackerResource * self,
                          const char* property_uri,
                          const char* value)

Sets a single-valued resource object as a string URI. This function produces similar RDF to tracker_resource_set_relation, although it requires that the URI is previously known.

Parameters:

self

the TrackerResource

property_uri

a string identifying the property to modify

value

the property object


Tracker.Resource.prototype.set_uri

function Tracker.Resource.prototype.set_uri(property_uri: String, value: String): {
    // javascript wrapper for 'tracker_resource_set_uri'
}

Sets a single-valued resource object as a string URI. This function produces similar RDF to Tracker.Resource.prototype.set_relation, although it requires that the URI is previously known.

Parameters:

property_uri (String)

a string identifying the property to modify

value (String)

the property object


Tracker.Resource.set_uri

def Tracker.Resource.set_uri (self, property_uri, value):
    #python wrapper for 'tracker_resource_set_uri'

Sets a single-valued resource object as a string URI. This function produces similar RDF to Tracker.Resource.set_relation, although it requires that the URI is previously known.

Parameters:

property_uri (str)

a string identifying the property to modify

value (str)

the property object


Functions

tracker_resource_deserialize

TrackerResource *
tracker_resource_deserialize (GVariant * variant)

Deserializes a TrackerResource previously serialized with tracker_resource_serialize. It is implied that both ends use a common TrackerNamespaceManager.

Parameters:

variant

a GVariant

Returns ( [transfer: full])

A TrackerResource, or NULL if deserialization fails.


Tracker.Resource.prototype.deserialize

function Tracker.Resource.prototype.deserialize(variant: GLib.Variant): {
    // javascript wrapper for 'tracker_resource_deserialize'
}

Deserializes a Tracker.Resource previously serialized with Tracker.Resource.prototype.serialize. It is implied that both ends use a common Tracker.NamespaceManager.

Parameters:

variant (GLib.Variant)

a GLib.Variant

Returns (Tracker.Resource)

A TrackerResource, or null if deserialization fails.


Tracker.Resource.deserialize

def Tracker.Resource.deserialize (variant):
    #python wrapper for 'tracker_resource_deserialize'

Deserializes a Tracker.Resource previously serialized with Tracker.Resource.serialize. It is implied that both ends use a common Tracker.NamespaceManager.

Parameters:

variant (GLib.Variant)

a GLib.Variant

Returns (Tracker.Resource)

A TrackerResource, or None if deserialization fails.


Properties

identifier

“identifier” gchar *

The URI identifier for this class, or NULL for a blank node.

Flags : Read / Write


identifier

“identifier” String

The URI identifier for this class, or null for a blank node.

Flags : Read / Write


identifier

“self.props.identifier” str

The URI identifier for this class, or None for a blank node.

Flags : Read / Write


Constants

TRACKER_TYPE_RESOURCE

#define TRACKER_TYPE_RESOURCE tracker_resource_get_type()

The results of the search are