Synopsis
#include <liblod.h>
LODINSTANCE *
lod_locate
(LODCONTEXT *context
, const char *uri
);
Description
lod_locate
attempts to locate triples where
uri
is the subject URI within the model
associated with context
. In contrast to
lod_fetch
and lod_resolve
,
lod_locate
will make no attempt to fetch
additional data if no triples where uri
is
the subject are present in the model.
Return value
Upon success, lod_locate
returns a new
LODINSTANCE
, which should be later freed using
lod_instance_destroy
.
If an error occurs, or uri
was not
a subject of any triple in the context's model,
lod_locate
returns NULL
.
Use lod_error
to determine whether an error
occurred, or whether the subject does not exist in the data. If an
error does occur, you can use lod_errmsg
to
obtain a description of the error condition.
See also
liblod, lod_resolve, lod_fetch, lod_create, lod_error, lod_errmsg, lod_instance_exists, lod_instance_stream, librdf_parser_create.