Provides a convenience encapsulation for lists formed from chains of RDF statements arranged to form a head/tail cons-cell structure. The properties that form the links between cells, and from cells to values, are specified by a vocabulary interface, so this abstraction is designed to cope equally well with DAML lists, RDF lists, and user-defined lists.
A well-formed list has cells that are made up of three statements: one denoting the rdf:type
of the list cell, one denoting the link to the value of the list at that point, and one pointing to the list tail. If a list cell is not well-formed, list operations may fail in unpredictable ways. However, to explicitly check that the list is well-formed at all times is expensive. Therefore the list operates in two modes: in strict mode, the well-formedness of the list is checked at the start of each list operation, and an {@link InvalidListException} is thrown if the list is notwell- formed. This ensures that list operations are safe, but will slow down processing. In non-strict mode, this checking is switched off, but can be invoked explicitly by clients by calling {@link #isValid}. By default, RDF lists are processed in non-strict mode.
java.util.List
backed by an RDF collection (rdf:List). The list allows modification that are reflected to the underlying TripleCollection
. It reads the data from the TripleCollection
when it is first needed, so changes to the TripleCollection affecting the rdf:List may or may not have an effect on the values returned by instances of this class. For that reason only one instance of this class should be used for accessing an rdf:List of sublists thereof when the lists are being modified, having multiple lists exclusively for read operations (such as for immutable TripleCollection
s) is not problematic.
@author rbn, mir
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|