providedAs property
Optional name under which this resource's IRI will be provided to dependent mappers.
When specified, the generated mapper will provide a String Function() that returns
the resource's IRI, making it available to child/dependent mappers that reference
{providedName} in their IRI templates.
This is particularly useful for hierarchical data structures where child resources need to reference their parent's IRI in their own IRI construction.
Example:
@RdfGlobalResource(
ParentClass.classIri,
IriStrategy('{+baseUri}/parents/{id}', 'parentIri')
)
class Parent {
@RdfIriPart()
final String id;
@RdfProperty(Vocab.child)
final Child child;
}
@RdfGlobalResource(
ChildClass.classIri,
IriStrategy('{+parentIri}/children/{childId}'),
registerGlobally: false
)
class Child {
@RdfIriPart()
final String childId;
}
Implementation
final String? providedAs;