Skip to main content

Module display

Module display 

Source
Expand description

A human-meaningful display label for a node.

Linked-data ingest mints a node per JSON-LD subject and per referenced resource (see linked-data): a page’s author / publisher / image and the like. Anonymous subjects (no @id) are skolemized to urn:mere:bnode:…, and add_node_with_id seeds an untitled node’s title to its URL, so a naive title-or-URL label shows that raw URN (or a bare image URL) on the canvas and in the roster. This derives something a person can read instead, from data the node already carries.

The derivation branches on node kind, which is what keeps it honest: a linked page reached by a hyperlink edge must not be labelled “hyperlink”, so the incoming-edge role is consulted only for anonymous entities, where the role (author / publisher / image) genuinely is the node’s identity.

  • Anonymous entity (urn:mere:bnode:…): real title → incoming-edge role → humanized @type → a short id.
  • Real resource (an addressable URL): real title → filename (a URL’s last path segment when it carries an extension, e.g. Rust_logo.svg) → cached host → humanized @type → the scheme-stripped URL.

It is presentation-neutral (deterministic graph-derived text, no theme/host types) and recomputed on read, so ingest stays faithful and the label is free to evolve. Truncation to a widget’s width is the caller’s concern.