Skip to content

🎨 Facet

∈ Is rdfs:Class

In RDF

In RDF, a Facet is represented as an IRI, like this:

python://iolanta.facets.textual_default.InverseProperties

You can use properties like iolanta:hasInstanceFacet to attach a facet, by its IRI, to various IRIs — and thus influence how Iolanta renders these IRIs.

Python class facets

The Facet IRI above actually points to a Python class which should be importable to Iolanta as follows:

from iolanta.facets.textual_default import InverseProperties
from iolanta.facets.facet import Facet

assert issubclass(InverseProperties, Facet)    # ⇒ True    # noqa: S101

Check out the source code of this class: it defines show() method which Iolanta will call to render inverse properties for an IRI on screen.

Where to get Python facets from?

  • A number of facets are bundled with Iolanta;
  • More facets can be installed with Iolanta plugins from PyPI;
  • and, you can write your own — it is enough for Iolanta to be able to import them.

More facet types

!!! "info" "TBD" WASM powered plugins are on the Iolanta roadmap. They will enable users to run visualizations downloading them dynamically from the Web, and do so safely.