Resource


Object Hierarchy:

Object hierarchy for Resource

Description:

[ CCode ( type_id = "tracker_resource_get_type ()" ) ]
public class Resource : Object

`TrackerResource` is an in-memory representation of RDF data about a given resource.

This object keeps track of a set of properties for a given resource, and can also link to other `TrackerResource` objects to form trees or graphs of RDF data. See [method@Resource.set_relation] and [method@Resource.set_uri] on how to link a `TrackerResource` to other RDF data.

`TrackerResource` may also hold data about literal values, added through the specialized [method@Resource.set_int64], [ method@Resource.set_string], etc family of functions, or the generic [method@Resource.set_gvalue] method.

Since RDF properties may be multi-valued, for every `set` call there exists another `add` call (e.g. [method@Resource.add_int64], [ method@Resource.add_string] and so on). The `set` methods do also reset any previously value the property might hold for the given resource.

Resources may have an IRI set at creation through [ctor@Resource.new], or set afterwards through [method@Resource.set_identifier]. Resources without a name will represent a blank node, and will be dealt with as such during database insertions.

`TrackerResource` performs no validation on the data being coherent as per any ontology. Errors will be found out at the time of using the TrackerResource for e.g. database updates.

Once the RDF data is built in memory, the (tree of) `TrackerResource` may be converted to a RDF format through [method@Resource.print_rdf ], or directly inserted into a database through [method@Batch.add_resource] or [method@SparqlConnection.update_resource].


Namespace: Tsparql
Package: tinysparql-3.0

Content:

Properties:

Static methods:

Creation methods:

Methods:

Inherited Members: