IriTerm.validated constructor

IriTerm.validated(
  1. String value
)

Creates an IRI term with the specified IRI string

The IRI should be a valid absolute IRI according to RFC 3987. This constructor validates that the IRI is well-formed and absolute.

Throws RdfConstraintViolationException if the IRI is not well-formed or not absolute.

If you need to create an IRI in a const context (e.g., for annotations), use the IriTerm constructor instead, but ensure the IRI is valid at compile time.

Implementation

IriTerm.validated(this.value) {
  _validateAbsoluteIri(value);
}