Serializer options

There are several options that can be set on serializers. The exact list of options can be found at run time via the Querying Functionality or in the API reference for raptor_option.

Options are integer enumerations of the raptor_option enum and have values that are either booleans, integers or strings. The function that sets options for serializers is: raptor_serializer_set_option() used as follows:

  /* Set a boolean or integer valued option to value 1 */
  raptor_serializer_set_option(rdf_serializer, option, NULL, 1);

  /* Set a string valued option to value "abc" */
  raptor_serializer_set_option(rdf_serializer, option, "abc", -1);

There is a corresponding function for reading the values of serializer option raptor_serializer_get_option() which takes the option enumeration parameter and returns the boolean / integer or string value correspondingly into the appropriate pointer argument.

  /* Get a boolean or integer option value */
  int int_var;
  raptor_serializer_get_option(rdf_serializer, option, NULL, &int_var);

  /* Get a string option value */
  char* string_var;
  raptor_serializer_get_option(rdf_serializer, option, &string_var, NULL);



Navigation: Redland Home Page

Copyright 2000-2014 Dave Beckett