Containers and Collections
JRDF supports RDF collections and containers, which are added using the JRDF graph's TripleFactory.
JRDF containers implement the java.util.Collection
interface and include:
- Alternative
An unordered list of statements with no duplicates. It represents a set of objects that are semantically the same.
- Bag
An unordered list of statements allowing duplicates.
- Sequence
An ordered list of statements allowing duplicates. Statements are returned in a first in, first out (FIFO) order.
JRDF collections hold all the statements of a particular group and are represented as a linked list. Collections do not implement java.util.Collection
.
Triple Factory
A TripleFactory, obtained from a JRDF graph, is used to insert collections and containers, and for reification of triples for the graph.
Triples are reified by providing a SubjectNode and the triple to be reified.