compactIri method
Implementation
CompactIri compactIri(IriTerm iri, IriRole role) {
final slot = compactIris[iri]?[role.index];
if (slot == null) {
final known = compactIris[iri];
if (known != null) {
final knownRoles = IriRole.values
.where((r) => known[r.index] != null)
.map((r) => r.name)
.join(', ');
_log.warning(
'No compact IRI found for $iri with role ${role.name}. '
'Did you specify the correct IriRole? '
'Found this IRI for roles: $knownRoles. Will treat as full IRI.',
);
} else {
_log.warning(
'No compact IRI found for $iri with role ${role.name}. '
'Is this IRI used in the graph? Will treat as full IRI.',
);
}
return FullIri(iri.value);
}
return slot;
}