Synopsis
#include <liblod.h>
LODINSTANCE *
lod_instance_primarytopic
(LODINSTANCE *instance
);
Description
The lod_instance_primarytopic
attempts to follow
a foaf:primaryTopic
relationship between the subject
of the supplied instance and another resource.
If such a triple exists in the associated context's model, a new instance will be created with the object of the triple as its subject.
Note that the object of the foaf:primaryTopic
triple may not itself be present in the model, and you should
use lod_instance_exists
on the newly-returned
instance to check.
Return value
If a foaf:primaryTopic
triple exists where the
subject matches that of the instance,
lod_instance_primarytopic
returns a new instance
whose subject is the object of that triple.
If no such triple was found, or an error occurs,
NULL
will be returned instead. Use
lod_error
to determine whether an error occurred,
or whether an appropriate triple was simply absent.