Class RDFContainers

java.lang.Object
org.eclipse.rdf4j.model.util.RDFContainers

public class RDFContainers extends Object
Utilities for working with RDF Containers and converting to/from Java Collection classes.

RDF Containers are represented using 3 different types of structures:

1. RDF.BAG : A Bag (a resource having type rdf:Bag) represents a group of resources or literals, possibly including duplicate members, where there is no significance in the order of the members.

2. RDF.SEQ : A Sequence or Seq (a resource having type rdf:Seq) represents a group of resources or literals, possibly including duplicate members, where the order of the members is significant.

3. RDF.ALT : An Alternative or Alt (a resource having type rdf:Alt) represents a group of resources or literals that are alternatives (typically for a single value of a property).

So, in each of the above types, the container starts with a first resource node, via the rdf:_1 relation. Similarly, the next member is connected via the rdf:_2 relation and so on.

For eg. Bag containing three literal values "A", "B", and "C" looks like this as an RDF Container:

   _:n1 -rdf:type--> rdf:Bag
     |
     +---rdf:_1--> "A"
     |
     +---rdf:_2--> "B"
     |
     +---rdf:_3--> "C"
 
See Also: