unorderedItemsSet top-level constant

CollectionMapping const unorderedItemsSet

Maps Dart Set collections to multiple separate triples.

RDF Structure: Creates multiple triples with the same predicate Dart Type: Works with Set<T> - will lead to compile errors in generated mappers if used with other types like List<T> or Iterable<T>. Order: NOT preserved - each item becomes a separate triple Use Case: When you want explicit control over Set serialization as multiple triples

Example Usage

@RdfProperty(SchemaBook.genres, collection: unorderedItemsSet)
final Set<String> genres;

Generated RDF

<book> schema:genres "Fiction" .
<book> schema:genres "Mystery" .
<book> schema:genres "Thriller" .

Note: This is the default behavior for Set<T> when no collection is specified. Only use explicitly when you need to override other collection mapping defaults.

Underlying Mapper: UnorderedItemsSetMapper<T> from locorda_rdf_mapper package

Implementation

const unorderedItemsSet =
    CollectionMapping.withItemMappers(UnorderedItemsSetMapper);