LMMS
Loading...
Searching...
No Matches

Functions

LILV_API LILV_DEPRECATED const char * lilv_uri_to_path (const char *uri)
LILV_API char * lilv_file_uri_parse (const char *uri, char **hostname)
LILV_API LilvNodelilv_new_uri (LilvWorld *world, const char *uri)
LILV_API LilvNodelilv_new_file_uri (LilvWorld *world, const char *host, const char *path)
LILV_API LilvNodelilv_new_string (LilvWorld *world, const char *str)
LILV_API LilvNodelilv_new_int (LilvWorld *world, int val)
LILV_API LilvNodelilv_new_float (LilvWorld *world, float val)
LILV_API LilvNodelilv_new_bool (LilvWorld *world, bool val)
LILV_API void lilv_node_free (LilvNode *val)
LILV_API LilvNodelilv_node_duplicate (const LilvNode *val)
LILV_API bool lilv_node_equals (const LilvNode *value, const LilvNode *other)
LILV_API char * lilv_node_get_turtle_token (const LilvNode *value)
LILV_API bool lilv_node_is_uri (const LilvNode *value)
LILV_API const char * lilv_node_as_uri (const LilvNode *value)
LILV_API bool lilv_node_is_blank (const LilvNode *value)
LILV_API const char * lilv_node_as_blank (const LilvNode *value)
LILV_API bool lilv_node_is_literal (const LilvNode *value)
LILV_API bool lilv_node_is_string (const LilvNode *value)
LILV_API const char * lilv_node_as_string (const LilvNode *value)
LILV_API char * lilv_node_get_path (const LilvNode *value, char **hostname)
LILV_API bool lilv_node_is_float (const LilvNode *value)
LILV_API float lilv_node_as_float (const LilvNode *value)
LILV_API bool lilv_node_is_int (const LilvNode *value)
LILV_API int lilv_node_as_int (const LilvNode *value)
LILV_API bool lilv_node_is_bool (const LilvNode *value)
LILV_API bool lilv_node_as_bool (const LilvNode *value)

Detailed Description

Function Documentation

◆ lilv_file_uri_parse()

LILV_API char * lilv_file_uri_parse ( const char * uri,
char ** hostname )

Convert a file URI string to a local path string.

For example, "file://foo/bar%20one/baz.ttl" returns "/foo/bar one/baz.ttl". Return value must be freed by caller with lilv_free().

Parameters
uriThe file URI to parse.
hostnameIf non-NULL, set to the hostname in the URI, if any.
Returns
uri converted to a path, or NULL on failure (URI is not local).

◆ lilv_new_bool()

LILV_API LilvNode * lilv_new_bool ( LilvWorld * world,
bool val )

Create a new boolean value.

Returned value must be freed by caller with lilv_node_free().

◆ lilv_new_file_uri()

LILV_API LilvNode * lilv_new_file_uri ( LilvWorld * world,
const char * host,
const char * path )

Create a new file URI value.

Relative paths are resolved against the current working directory. Note that this may yield unexpected results if host is another machine.

Parameters
worldThe world.
hostHost name, or NULL.
pathPath on host.
Returns
A new node that must be freed by caller.

◆ lilv_new_float()

LILV_API LilvNode * lilv_new_float ( LilvWorld * world,
float val )

Create a new floating point value.

Returned value must be freed by caller with lilv_node_free().

◆ lilv_new_int()

LILV_API LilvNode * lilv_new_int ( LilvWorld * world,
int val )

Create a new integer value.

Returned value must be freed by caller with lilv_node_free().

◆ lilv_new_string()

LILV_API LilvNode * lilv_new_string ( LilvWorld * world,
const char * str )

Create a new string value (with no language).

Returned value must be freed by caller with lilv_node_free().

◆ lilv_new_uri()

LILV_API LilvNode * lilv_new_uri ( LilvWorld * world,
const char * uri )

Create a new URI value.

Returned value must be freed by caller with lilv_node_free().

◆ lilv_node_as_blank()

LILV_API const char * lilv_node_as_blank ( const LilvNode * value)

Return this value as a blank node identifier, like "genid03".

Valid to call only if lilv_node_is_blank(value) returns true. Returned value is owned by value and must not be freed by caller.

◆ lilv_node_as_bool()

LILV_API bool lilv_node_as_bool ( const LilvNode * value)

Return value as a bool.

Valid to call only if lilv_node_is_bool(value) returns true.

◆ lilv_node_as_float()

LILV_API float lilv_node_as_float ( const LilvNode * value)

Return value as a float.

Valid to call only if lilv_node_is_float(value) or lilv_node_is_int(value) returns true.

◆ lilv_node_as_int()

LILV_API int lilv_node_as_int ( const LilvNode * value)

Return value as an integer.

Valid to call only if lilv_node_is_int(value) returns true.

◆ lilv_node_as_string()

LILV_API const char * lilv_node_as_string ( const LilvNode * value)

Return value as a string.

◆ lilv_node_as_uri()

LILV_API const char * lilv_node_as_uri ( const LilvNode * value)

Return this value as a URI string, like "http://example.org/foo".

Valid to call only if lilv_node_is_uri(value) returns true. Returned value is owned by value and must not be freed by caller.

◆ lilv_node_duplicate()

LILV_API LilvNode * lilv_node_duplicate ( const LilvNode * val)

Duplicate a LilvNode.

◆ lilv_node_equals()

LILV_API bool lilv_node_equals ( const LilvNode * value,
const LilvNode * other )

Return whether two values are equivalent.

◆ lilv_node_free()

LILV_API void lilv_node_free ( LilvNode * val)

Free a LilvNode.

It is safe to call this function on NULL.

◆ lilv_node_get_path()

LILV_API char * lilv_node_get_path ( const LilvNode * value,
char ** hostname )

Return the path of a file URI node.

Returns NULL if value is not a file URI. Returned value must be freed by caller with lilv_free().

◆ lilv_node_get_turtle_token()

LILV_API char * lilv_node_get_turtle_token ( const LilvNode * value)

Return this value as a Turtle/SPARQL token.

Returned value must be freed by caller with lilv_free().

Example tokens:

◆ lilv_node_is_blank()

LILV_API bool lilv_node_is_blank ( const LilvNode * value)

Return whether the value is a blank node (resource with no URI).

◆ lilv_node_is_bool()

LILV_API bool lilv_node_is_bool ( const LilvNode * value)

Return whether this value is a boolean.

◆ lilv_node_is_float()

LILV_API bool lilv_node_is_float ( const LilvNode * value)

Return whether this value is a decimal literal.

◆ lilv_node_is_int()

LILV_API bool lilv_node_is_int ( const LilvNode * value)

Return whether this value is an integer literal.

◆ lilv_node_is_literal()

LILV_API bool lilv_node_is_literal ( const LilvNode * value)

Return whether this value is a literal (that is, not a URI).

Returns true if value is a string or numeric value.

◆ lilv_node_is_string()

LILV_API bool lilv_node_is_string ( const LilvNode * value)

Return whether this value is a string literal.

Returns true if value is a string value (and not numeric).

◆ lilv_node_is_uri()

LILV_API bool lilv_node_is_uri ( const LilvNode * value)

Return whether the value is a URI (resource).

◆ lilv_uri_to_path()

LILV_API LILV_DEPRECATED const char * lilv_uri_to_path ( const char * uri)

Convert a file URI string to a local path string.

For example, "file://foo/bar/baz.ttl" returns "/foo/bar/baz.ttl". Return value is shared and must not be deleted by caller. This function does not handle escaping correctly and should not be used for general file URIs. Use lilv_file_uri_parse() instead.

Returns
uri converted to a path, or NULL on failure (URI is not local).