MapperDirection enum
Specifies whether a mapper should handle serialization, deserialization, or both.
This enum is used to control the directionality of mappers when using custom
mapper constructors (.namedMapper(), .mapper(), .mapperInstance()).
The generated code will create appropriate serializer-only, deserializer-only, or bidirectional mapper implementations based on this setting.
Values
- both → const MapperDirection
-
Mapper handles both serialization and deserialization (default).
This is the standard mode where the mapper can convert objects to RDF and back from RDF to objects.
- serializeOnly → const MapperDirection
-
Mapper only handles serialization to RDF.
Use this when you only need to write RDF data and never need to reconstruct objects from RDF.
- deserializeOnly → const MapperDirection
-
Mapper only handles deserialization from RDF.
Use this when you only need to read RDF data and construct objects, but never need to serialize objects back to RDF. This is particularly useful when the IRI construction strategy is not needed or cannot be determined from the object properties alone.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
MapperDirection> - A constant List of the values in this enum, in order of their declaration.