Nanopublication types and labels
How a nanopublication's types and label are found, why they matter, and when to state them explicitly.
Why types matter
Every nanopublication is filed under one or more types, and the types decide where it is found: which repository it lands in, which listings include it, which views show it, whether a lookup for "all spaces" or "all presentations" returns it. A nanopublication with no useful type is stored but effectively invisible.
How types are found
Types are read off the nanopublication itself, so nothing needs registering. A type stated on the nanopublication in its publication info counts, whether as a plain type or with npx:hasNanopubType. So does every type of a thing the nanopublication introduces, describes or embeds, and every type of its assertion. Two shortcuts cover simple assertions: if all statements have the same subject, that subject's types count, and if all use the same predicate, that predicate itself becomes the type — which is why a one-statement nanopublication saying "X is relevant for Y" is filed under "is relevant for".
Stating a type explicitly
Forms add a type when their template declares one, and most nanopublications get theirs from what they introduce. A nanopublication written by hand, or one whose type cannot be inferred, should state it explicitly with npx:hasNanopubType; otherwise it will not reach the repository where the queries for its kind look. A nanopublication may carry several types, and a query for any of them finds it.
Examples of a new type
A type's repository is created when the first nanopublication of that type appears, so queries for a brand-new type find nothing until then. When introducing a new kind of nanopublication, publish an example first, marked npx:ExampleNanopub and labelled as such, so that the repository exists and the queries can be tested. Listings leave example nanopublications out.
Labels
A nanopublication is shown by its label wherever it is listed, so give it one. The label is taken, in order, from a label on the nanopublication itself, a title on it, a label or title on its assertion, and finally the label of the thing it introduces — so a nanopublication that introduces a labelled term needs no label of its own. Templates can name the nanopublication after one of its fields. A missing label leaves the nanopublication listed by its address, which nobody can read.
This page is a copy of the topic Nanopublication types and labels of the Nanopublication Docs. Each paragraph is a nanopublication. In Nanodash you also find their examples, related paragraphs, and version history, and members of the nanopub space can edit them there.