Top | ![]() |
![]() |
![]() |
![]() |
char * | librdf_heuristic_gen_name () |
int | librdf_heuristic_is_blank_node () |
const char * | librdf_heuristic_get_blank_node () |
int | librdf_heuristic_object_is_literal () |
Various utility functions for performing heuristics such as generating a name, guessing if a string is a URI or RDF literal.
char *
librdf_heuristic_gen_name (const char *name
);
Generate a new name from an existing name.
Adds an integer or increases the integer at the end of the name in order to generate a new one
int
librdf_heuristic_is_blank_node (const char *node
);
Try to guess if an node string is a blank node identifier.
The guessing is done by assuming the object is a blank node if it matches ^_: like N-Triples, N3 and related.
const char *
librdf_heuristic_get_blank_node (const char *node
);
Get a blank node identifier from a node string.
Picks the blank node identifier out of a string. Looks for things like _:ABC
int
librdf_heuristic_object_is_literal (const char *object
);
Try to guess if an object string is a literal or a resource.
The guessing is done by assuming the object is a URL if it matches
^[isalnum()
]+:[^isblank()
]+$
This will be fooled by literals of form 'thing:non-blank-thing' but is good enough.