Skip to main content

Hanami classes

Hanami ontology contains classes used to configure the UI. Below is a list of those classes with some common properties.

Hanami hierarchy

hanami:Workspace

Models a workspace (a set of collections) in Hanami.

Propertyrangedescription
dct:titlerdf:langStringThe title of the workspace
dct:createdxsd:dateTimeThe timestamp of when the workspace was created
dct:modifiedxsd:dateTimeThe timestamp of when the workspace was last modified

hanami:Collection

Models a collection (a set of items) in Hanami.

Propertyrangedescription
dct:titlerdf:langStringThe title of the collection
dct:createdxsd:dateTimeThe timestamp of when the collection was created
dct:modifiedxsd:dateTimeThe timestamp of when the collection was last modified
dct:identifierxsd:stringA unique identifier for the collection
hanami:shapessh:NodeShapeThe nodeshapes used to render the forms of the items in the collection
hanami:rdfStorehanami:RdfStoreSpecifies the triple store where the data is located
hanami:elasticsearchhanami:ElasticsearchSpecifies the Elasticsearch instance to use
hanami:workspacehanami:WorkspaceThe workspace the collection is located in
hanami:baseUrixsd:stringThe URI to use as base to generate URIs for newly created items
hanami:allowMultipleRootsxsd:booleanIndicates if an item of the collection can have multiple root nodes. Default false

Viewers and editors

Viewers are linked to sh:NodeShape through the hanami:viewerproperty. They configure how the chips of nodes having the class that is targeted by the node shape, should be rendered.

Editors are linked to a sh:PropertyShape through the hanami:editor property. They configure which kind of input fields should be used for the property targeted by the sh:PropertyShape.

hanami:TemplateViewer

Render a text based on a template inside the chip

Propertyrangedescription
hanami:templatexsd:stringThe template

hanami:NodeEditor

An editor to create or reference nodes through a property.

Propertyrangedescription
hanami:linkingStrategyhanami:LinkingStrategyThe linking strategy

Linking strategies

The first distinction that can be made for the linking strategies, is creation vs reference. The latter will reference an already existing node, while the former creates a new.

Hanami offers 2 linking strategies to create a new node: hanami:CreateLinkingStrategy and hanami:CreateManualLinkingStrategy. The latter allows the user to specify the URI of the newly created node, where the first will generate a URI for it.

When it comes to references, there is another distinction to make: internal or external references. For internal references, hanami:InternalReferenceLinkingStrategy is used to reference an already existing node within the model of the item.

For external references, one can use hanami:ExternalReferenceLinkingStrategy to reference an already existing node in the model of another item. To reference an external node, but still allow users to add triples to it in the current model, we use hanami:ExternalReferenceWithFormLinkingStrategy.

Any combination of linking strategies is also allowed. By default, Hanami falls back to hanami:CreateLinkingStrategy.

hanami:SelectEditor

The select editor presents an extensive list to the user to choose from. This list can be literals as well as URIs.

Propertyrangedescription
sh:classrdfs:ClassRenders a list of all nodes with the given type
hanami:optionhanami:PropertyOptionAn option in the list

hanami:PropertyOption

Models an option in the list created by hanami:SelectEditor

Propertyrangedescription
rdfs:labelrdf:langStringThe text that describes what the option means. This will be displayed in the list
hanami:valuerdfs:ResourceThe actual value to add to the data when the user selects the option

hanami:IriEditor

The Iri editor allows the input of an IRI. The difference with hanami:NodeEditor is that the IRI is not necessarily already present in the data set (although it could be). When the sh:PropertyShape that uses this editor has the sh:class triple, Hanami will add the type triple to the IRI in the data to be comform with the data.

Propertyrangedescription
sh:classrdfs:ClassWhen set, the user will be presented with suggestions of already present nodes in the dataset with this type. Hanami will not insert the type triple if the sh:class triple is not set on the property shape

hanami:RawEditor

The most basic editor in Hanami that lets the user specify the node kind, datatype or class (depending on the node kind) and the value. Hanami will use properties on the property shape to have reasonable defaults, but hanami:RawEditor cannot be configured with properties.

Connections

hanami:RdfStore

Models a connection to a triple store.

Propertyrangedescription
dct:titlerdf:langStringThe title of the triple store
dct:createdxsd:dateTimeThe timestamp of when the object was created
dct:modifiedxsd:dateTimeThe timestamp of when the object was last modified
hanami:rdfStoreConnectionhanami:RdfStoreConnectionReferences the connection object.

hanami:RdfStoreConnectionVirtuoso

Models a connection to a Virtuoso triple store.

Propertyrangedescription
hanami:usernamexsd:stringthe username for basic auth connection to Virtuoso
hanami:passwordxsd:stringthe password for basic auth connection to Virtuoso
hanami:connectionStringxsd:stringthe URL of the sparql endpoint

hanami:RdfStoreConnectionBean

Models the connection to the internal triple store of Hanami.

Propertyrangedescription
dct:identifierxsd:stringa unique identifier for the internal triple store

hanami:Elasticsearch

[TBA]

hanami:ElasticsearchConnectionBean

[TBA]