[redland-dev] My Raptor2 remaining todo list

Dave Beckett dave at dajobe.org
Sat Mar 6 23:52:58 CET 2010


Dave Beckett wrote:
> I'm down to around 6 possible API changes left before I'd think raptor2 is
> worth focusing on an initial release (and doing lots of documentation
> writing and updating).
> 
>  1. Consider making raptor_parser_set_graph_name() and namespace handler
>     calls redundant.
>  2. Consider removing raptor_feature_get_value_type() - *new* - from public
>     api, use descriptor.
>  3. Consider interface to return a set of mimetypes of parser/serializer in
>     enumerating them - array of types?
>  4. Add raptor world class method to allow flushing / deleting of uri tree.
>     Add world option/feature to disable it from initial creation.
>  5. Consider adding raptor_serialize_flush() to allow abbreviating
>     serializers to dump all they have and reset for more.
>  6. Check all librdf_node class functions have raptor_term equivalents
>     exported - where it makes sense; encode/decode probably don't need it.


Decisions so far (based on another change I made, adding a 'domain' concept
enum which allows describing a raptor class such as parser.  It may be
used in log messages at some point):

1. Think about later.

2. Yes.
Remove and make options enumerate functions into a single
raptor_option_get_description_by_domain(world, domain, int index) exposing
fields enum ID, name, desc, uri, type and maybe default value with form
raptor_option_get_description(world, enum ID)

3. Yes.
Change parser/serializer enumeration functions into
  raptor_world_get_parser_description(world, int index)
returning fields name, desc, static array of aliases, static array of
{mime_type, q} pairs.

4. Yes.
Add raptor world class method to allow flushing / deleting of uri tree.
raptor_world_flush_resources(raptor_world* world, int flag)

Add raptor_world_flag enum value to disable uri tree from initial creation
via raptor_world_set_flag()

5. Think about later.


and new decisions:

6. Make world class have config via simple flags (NOT options since it's
pre-raptor_world_open() ) such as raptor_world_set_flag(world,
raptor_world_flag flag, int value)


7. Make per-domain options set/get with int/string into 1 function not 2.
API Choices:
A) generic args form:
  raptor_parser_set_option(raptor_parser* parser, raptor_option option,
    raptor_option_type type, void *value)
  that allows extending types later from current string, int, bool.
B) raptor_parser_set_option(raptor_parser* parser, raptor_option option,
    char* string, int integer)
  which just does the right thing (TM) for any types.


I haven't decided on the #7 choices yes.  A is like curl_easy_setopt
but I don't like the typeless.  B is simpler and I can't see it being
a problem.

Dave


More information about the redland-dev mailing list