Top | ![]() |
![]() |
![]() |
![]() |
A class for handling RDF terms (URI, blank nodes, strings, datatyped literals) as well as those natively used in a query such as boolean, double, floating, integer, regex pattern and variables.
rasqal_literal * rasqal_new_typed_literal (rasqal_world *world
,rasqal_literal_type type
,const unsigned char *string
);
rasqal_literal * rasqal_new_boolean_literal (rasqal_world *world
,int value
);
rasqal_literal * rasqal_new_datetime_literal_from_datetime (rasqal_world *world
,rasqal_xsd_datetime *dt
);
rasqal_literal * rasqal_new_decimal_literal (rasqal_world *world
,const char *string
);
rasqal_literal * rasqal_new_decimal_literal_from_decimal (rasqal_world *world
,const char *string
,rasqal_xsd_decimal *decimal
);
rasqal_literal * rasqal_new_double_literal (rasqal_world *world
,double d
);
rasqal_literal * rasqal_new_float_literal (rasqal_world *world
,float f
);
rasqal_new_float_literal
is deprecated and should not be used in newly-written code.
rasqal_literal * rasqal_new_floating_literal (rasqal_world *world
,rasqal_literal_type type
,double d
);
rasqal_literal * rasqal_new_integer_literal (rasqal_world *world
,rasqal_literal_type type
,int integer
);
rasqal_literal * rasqal_new_numeric_literal_from_long (rasqal_world *world
,rasqal_literal_type type
,long value Param3
);
rasqal_literal * rasqal_new_pattern_literal (rasqal_world *world
,const char *pattern
,const char *flags
);
rasqal_literal * rasqal_new_simple_literal (rasqal_world *world
,rasqal_literal_type type
,const char *string
);
rasqal_literal * rasqal_new_string_literal (rasqal_world *world
,const char *string
,const char *language
,raptor_uri *datatype
,const unsigned char *datatype_qname
);
rasqal_literal * rasqal_new_uri_literal (rasqal_world *world
,raptor_uri *uri
);
rasqal_literal * rasqal_new_variable_literal (rasqal_world *world
,rasqal_variable *variable
);
rasqal_literal *
rasqal_new_literal_from_literal (rasqal_literal *l
);
const unsigned char * rasqal_literal_as_counted_string (rasqal_literal *l
,size_t *len_p
,int flags
,int *error_p
);
const unsigned char * rasqal_literal_as_string_flags (rasqal_literal *l
,int flags
,int *error_p
);
int rasqal_literal_compare (rasqal_literal *l1
,rasqal_literal *l2
,int flags
,int *error_p
);
rasqal_literal_type
rasqal_literal_get_rdf_term_type (rasqal_literal *l
);
Types of literal.
The order in the enumeration is significant as it encodes the SPARQL term ordering conditions:
Blank Nodes << IRIs << RDF literals << typed literals
which coresponds to in enum values
BLANK << URI << STRING << (BOOLEAN | INTEGER | DOUBLE | FLOAT | DECIMAL | DATETIME | XSD_STRING)
(RASQAL_LITERAL_FIRST_XSD ... RASQAL_LITERAL_LAST_XSD)
Not used (internal): PATTERN, QNAME, VARIABLE
See rasqal_literal_compare()
when used with flags
RASQAL_COMPARE_XQUERY
Internal. |
||
RDF blank node literal (SPARQL r:bNode) |
||
RDF URI Literal (SPARQL r:URI) |
||
RDF Plain Literal - no datatype (SPARQL r:Literal) |
||
String xsd:string |
||
Boolean literal xsd:boolean. |
||
Integer literal xsd:integer. |
||
Floating point literal xsd:float. |
||
Double floating point literal xsd:double. |
||
Decimal integer xsd:decimal. |
||
Date/Time literal xsd:dateTime. |
||
Internal. |
||
Internal. |
||
User defined typed literal with unknown datatype URI |
||
Pattern literal for a regex. |
||
XML Qname literal. |
||
Variable literal. |
||
Internal. |
||
Date literal xsd:date. |
||
Internal. |