liblod

Linked Open Data client library

Synopsis

cc flag file … -llod library …

#include <liblod.h>

Description

Linked Open Data is a method of publishing machine-readable structured data on the web, using resolveable URIs as the means of identifying the entities described and referred to by the data.

liblod is a library for consuming published Linked Open Data, providing a simple interface for resolving a URI and interrogating the data which is retrieved.

Interfaces

liblod provides the public interfaces listed below.

FunctionDescription
lod_createCreate a new context
lod_resolveAttempt to resolve a Linked Open Data URI
lod_locateLocate triples about a subject already present in a context's model
lod_fetchResolve a Linked Open Data URI, fetching the data irrespective of whether the subject exists in the context's model
lod_destroyDestroy a previously-created context
lod_worldObtain the librdf world used by a context
lod_set_worldSet the librdf world used by a context
lod_storageObtain the librdf storage used by a context
lod_set_storageSet the librdf storage used by a context
lod_modelObtain the librdf model used by a context
lod_set_modelSet the librdf model used by a context
lod_curlObtain the libcurl handle used by a context
lod_set_curlSet the libcurl handle used by a context
lod_subjectRetrieve the most recently-resolved subject URI
lod_documentRetrieve the URL of the most recently parsed document
lod_statusObtain the HTTP status of the most recent request
lod_errorDetermine whether an error has occurred
lod_errmsgObtain a description of a context's error condition
lod_librdf_loggerDefault logging function for librdf world objects.
lod_useragentObtain the User-Agent HTTP header string for a context
lod_acceptObtain the Accept HTTP header string for a context
lod_instance_destroyFree resources allocated to an instance
lod_instance_streamObtain a librdf stream for an instance
lod_instance_uriObtain a librdf URI for an instance
lod_instance_existsDetermine whether the subject of an instance exists within the context's model
lod_instance_primarytopicAttempt to follow a foaf:primaryTopic relationship

Dependencies

liblod depends upon libcurl, librdf, libxml2 and liburi.

A copy of liburi is included in the source distribution.

See also

libcurl, librdf, libxml2.