annotations library
Locorda annotations for model classes.
Import this in your model classes to use sync annotations:
import 'package:locorda/annotations.dart';
@RootResource(AppVocab(appBaseUri: 'https://example.com/app'))
class MyModel {
@RdfIriPart()
final String id;
final String name;
}
Classes
- AppVocab
- Configuration class for application vocabulary generation.
-
BaseMapping<
M> - Base class for all mapping configurations that share common mapper functionality.
-
BaseMappingAnnotation<
M extends Mapper> - CollectionMapping
- Configures mapping details for collection properties in RDF.
- ContextualMapping
- Configuration for contextual property mapping.
- CrdtImmutable
- Annotation for immutable properties that never change.
- CrdtLwwRegister
- Annotation for Last-Writer-Wins Register merge strategy.
- CrdtOrSet
- Annotation for Observed-Remove Set merge strategy.
- FullIndex
- Configuration for the default FullIndex of a root resource.
- GlobalResourceMapping
- Configures mapping details for global resources (resources with IRIs) at the property level.
- GroupingProperty
- Defines a property used for grouping in a GroupIndex, with optional transforms.
- GroupKey
- Annotation for GroupIndex key classes that organize root resources into logical groups for partitioned indexing.
- IndexItem
- Annotation for index item (entry) classes that represent projections of root resources within indices.
- IndexItemIriStrategy
- IriMapping
- Configures mapping details for IRI terms in RDF at the property level.
- IriStrategy
- Defines the strategy for generating IRIs for RDF resources.
- LiteralContent
- Represents the content for building an RDF Literal.
- LiteralMapping
- Configures mapping details for literal values in RDF at the property level.
- LocalResource
- Annotation for local RDF resources (blank nodes).
- LocalResourceMapping
- Configures mapping details for local resources (blank nodes) at the property level.
- LocordaAnnotation
- Marker interface for class-level Locorda annotations.
-
MapperRef<
M> - Base class for type-safe mapper references.
- MergeContract
- CRDT mapping configuration for automatic generation or external references.
- MergeContracts
- MergeIdentifying
- Annotation to mark a property as identifying for a local resource (blank node).
- RdfAnnotation
- Base annotation interface for RDF mapper generation.
- RdfEnumValue
- Annotation for customizing how individual enum constants are serialized in RDF.
- RdfGlobalResource
- Marks a Dart class as an RDF resource with a global IRI.
- RdfIgnore
- Marks a property to be completely excluded from RDF mapping in generated vocabulary mode.
- RdfIri
- Marks a Dart class or enum as representing an RDF IRI term.
- RdfIriPart
- Marks a property as a part of the IRI for the enclosing class.
- RdfLanguageTag
- Marks a property as providing the language tag for RDF literals.
- RdfLiteral
- Marks a Dart class or enum as representing an RDF literal term.
- RdfLocalResource
- Marks a Dart class as a local RDF resource (referred to via a blank node).
- RdfMapEntry
- Specifies the Dart Type that represents each entry in a Map.
- RdfMapKey
-
Designates a property as the key in a mapped
Map<K,V>collection. - RdfMapValue
-
Designates a property or class as the value in a mapped
Map<K,V>collection. - RdfProperty
- Maps a Dart class property to an RDF predicate.
- RdfProvides
- Marks a property as providing a named value that can be referenced in IRI templates in the RDF mapping system.
- RdfUnmappedTriples
- Marks a property to capture and preserve unmapped RDF triples during lossless mapping.
- RdfValue
- Marks a property within a class as the primary value source for RDF literal conversion.
- RegexTransform
- Defines a regex transformation applied to a grouping property value.
- RootIriConfig
- RootIriStrategy
- RootResource
- Annotation for top-level RDF resources with CRDT synchronization.
- RootResourceRef
- SubIriStrategy
- SubResource
- Annotation for nested RDF resources within a root resource.
Enums
- MapperDirection
- Specifies whether a mapper should handle serialization, deserialization, or both.
Constants
- rdfAlt → const CollectionMapping
- Maps Dart collections to RDF Alternative structures (first is preferred).
- rdfBag → const CollectionMapping
- Maps Dart collections to RDF Bag structures (unordered collections).
- rdfList → const CollectionMapping
- Maps Dart collections to RDF List structures (rdf:first/rdf:rest/rdf:nil).
- rdfSeq → const CollectionMapping
- Maps Dart collections to RDF Sequence structures (rdf:_1, rdf:_2, rdf:_3...).
- resourceRefFactoryKey → const String
- unorderedItems → const CollectionMapping
- Maps Dart Iterable collections to multiple separate triples.
- unorderedItemsList → const CollectionMapping
- Maps Dart List collections to multiple separate triples.
- unorderedItemsSet → const CollectionMapping
- Maps Dart Set collections to multiple separate triples.