joshsh/sesametools — Issue #21: remove "leading statement" constraint from RdfListUtil methods
Author: joshsh
Created: 2011-11-14 03:05:10+00:00
State: open

RdfListUtil.getList and RdfListUtil.addList could be useful in situations where an RDF List is known (only) by the URI of its head, but currently they expect a "leading statement" pointing to the list. For example, it would be nice to support patterns like the following:

```Java
Graph graph = ...
List values = ...

URI myList = vf.createURI("http://example.org/ns#mylist");
RdfListUtil.addList(myList, values, graph);
```

Would it make RdfListUtil less useful for current applications if we were to take out the leading-statement logic, changing the method signatures to the following:

`public static void addList(Resource head, List values, Graph graph, Resource... contexts)` and
`public static List getList(Resource head, Graph graph, Resource... contexts)`

Note that I am also suggesting a varargs "context" parameter in getList.

@ansell, please let me know what you think.