rdfList top-level constant
CollectionMapping
const rdfList
Maps Dart collections to RDF List structures (rdf:first/rdf:rest/rdf:nil).
RDF Structure: Creates an ordered linked list using rdf:first/rdf:rest/rdf:nil
Dart Type: Works with List<T> - will lead to compile errors in generated mappers if used with other types like Set<T> or Iterable<T>.
Order: Preserved - items appear in RDF in the same order as in the Dart List
Use Case: When order matters and RDF consumers understand rdf:List structures
Example Usage
@RdfProperty(SchemaBook.chapters, collection: rdfList)
final List<Chapter> chapters;
Generated RDF
<book> schema:chapters _:list1 .
_:list1 rdf:first <chapter1> ;
rdf:rest _:list2 .
_:list2 rdf:first <chapter2> ;
rdf:rest rdf:nil .
Underlying Mapper: RdfListMapper<T> from locorda_rdf_mapper package
Implementation
const rdfList = CollectionMapping.withItemMappers(RdfListMapper);