Tracker.Resource.print_rdf

### Method

# Tracker Resourceprint_rdf

since: 3.4

#### Declaration [src]

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

#### Description [src]

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.

Available since: 3.4

#### Parameters

`namespaces`

  Type: `TrackerNamespaceManager`

  A set of prefixed URLs.

  The data is owned by the caller of the method.

`format`

  Type: `TrackerRdfFormat`

  RDF format of the printed string.

`graph`

  Type: `const gchar*`

  Target graph of the resource RDF, or `NULL` for the default graph.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `char*`

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

The caller of the method takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.