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
Members
parent_instance
(GObject)
–
Class structure
TrackerResourceClass
Tracker.ResourceClass
Tracker.ResourceClass
Tracker.Resource
GObject.Object ╰──Tracker.Resource
The
Members
parent_instance
(GObject.Object)
–
Tracker.Resource
GObject.Object ╰──Tracker.Resource
The
Members
parent_instance
(GObject.Object)
–
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.
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.
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.
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.
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.
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.
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.
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.
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.
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:
the Tracker.Resource
a string identifying the property to set
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:
the Tracker.Resource
a string identifying the property to set
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.
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.
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.
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.
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.
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.
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.
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.
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
(
[transfer: full])
–
the property object
Tracker.Resource.prototype.add_take_relation
function Tracker.Resource.prototype.add_take_relation(property_uri: String, resource: Tracker.Resource): {
// javascript wrapper for 'tracker_resource_add_take_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. This function takes ownership of resource.
Tracker.Resource.add_take_relation
def Tracker.Resource.add_take_relation (self, property_uri, resource):
#python wrapper for 'tracker_resource_add_take_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. This function takes ownership of resource.
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.
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.
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.
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:
a string identifying the property to look up
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:
a string identifying the property to look up
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.
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:
a string identifying the property to look up
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:
a string identifying the property to look up
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.
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:
a string identifying the property to look up
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:
a string identifying the property to look up
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.
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:
a string identifying the property to look up
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:
a string identifying the property to look up
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.
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:
a string identifying the property to look up
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:
a string identifying the property to look up
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.
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:
a string identifying the property to look up
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:
a string identifying the property to look up
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.
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:
a string identifying the property to look up
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:
a string identifying the property to look up
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.
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:
a string identifying the property to look up
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:
a string identifying the property to look up
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 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:
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:
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
–
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:
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:
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.
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:
a string identifying the property to query
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:
a string identifying the property to query
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.
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.
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.
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.
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:
a string identifying the resource
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:
a string identifying the resource
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
–
namespaces
(
[nullable])
–
a set of prefixed URLs, or NULL to use the Nepomuk set
a newly-allocated string containing JSON-LD data.
deprecated : 3.5: Use tracker_resource_print_rdf()
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.
a newly-allocated string containing JSON-LD data.
deprecated : 3.5: Use tracker_resource_print_rdf()
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.
a newly-allocated string containing JSON-LD data.
deprecated : 3.5: Use tracker_resource_print_rdf()
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
–
namespaces
–
a set of prefixed URLs
format
–
RDF format of the printed string
graph
(
[nullable])
–
target graph of the resource RDF, or NULL for the default graph
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:
a set of prefixed URLs
RDF format of the printed 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:
a set of prefixed URLs
RDF format of the printed string
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
–
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
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.
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.
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
–
namespaces
(
[allow-none])
–
a set of prefixed URLs, or NULL to use the Nepomuk set
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.
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.
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 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:
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:
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.
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.
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
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
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.
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.
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:
the Tracker.Resource
a string identifying the property to set
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:
the Tracker.Resource
a string identifying the property to set
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.
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:
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 None, a SPARQL blank node identifier such as "_:123" is assigned to the resource.
Parameters:
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.
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.
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.
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.
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.
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.
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.
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.
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
(
[transfer: full])
–
the property object
Tracker.Resource.prototype.set_take_relation
function Tracker.Resource.prototype.set_take_relation(property_uri: String, resource: Tracker.Resource): {
// javascript wrapper for 'tracker_resource_set_take_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. This function takes ownership of resource.
Tracker.Resource.set_take_relation
def Tracker.Resource.set_take_relation (self, property_uri, resource):
#python wrapper for 'tracker_resource_set_take_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. This function takes ownership of resource.
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.
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.
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
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:
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:
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
Constants
TRACKER_TYPE_RESOURCE
#define TRACKER_TYPE_RESOURCE tracker_resource_get_type()
The results of the search are