Redland RDF Library Manual | ||||
---|---|---|---|---|
Top | Description |
char * librdf_heuristic_gen_name (const char *name
); int librdf_heuristic_is_blank_node (const char *node
); const char * librdf_heuristic_get_blank_node (const char *node
); int librdf_heuristic_object_is_literal (const char *object
);
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
|
the name |
Returns : |
a new name or NULL on failure |
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.
|
string object to guess type |
Returns : |
non 0 if node is probably a blank node identifier |
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
|
string object to guess type |
Returns : |
the blank node identifer string or NULL if the node does not seem to be a blank node identifier |
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.
|
string object to guess type |
Returns : |
non 0 if object is probably a literal |
Navigation: Redland Home Page