label.pl -- Support for showing labels
This module provides HTML components to display labels for resources.
- turtle_label(+RDFTerm)// is det
- HTML rule to emit an RDF term (resource or object) in turtle-like notation with CSS classes.
- rdf_link(+URI)// is det
- rdf_link(+URI, +Options)// is det
- Make a hyper-link to an arbitrary RDF resource or object using
the label. Options processed:
- resource_format(+Format)
- Determines peference for displaying resources. Values are:
- plain
- Display full resource a plain text
- label
- Try to display a resource using its label
- nslabel
- Try to display a resource as <prefix>:<Label>
- max_length(+Len)
- Truncate long texts to Len characters, using ellipses to indicate that the text is truncated.
- target(+Target)
- Passed to the HTML <a> element as
target
attribute.
This predicate creates two types of links. Resources are linked to the handler implementing
list_resource
using r=<resource> and literals that appear multiple times are linked tolist_triples_with_object
using a Prolog representation of the literal.This predicate can be hooked using display_link//2.
- resource_link(+URI, -URL) is det
- Generate a link to display more information about a resource.
The default is to link to the HTTP handler implementing
list_resource
using the parameterr
. See cpa_browse:list_resource/1. This predicate calls the hook resource_link/2, which allows for overruling the default. - rdf_link(+URI)// is det
- rdf_link(+URI, +Options)// is det
- Make a hyper-link to an arbitrary RDF resource or object using
the label. Options processed:
- resource_format(+Format)
- Determines peference for displaying resources. Values are:
- plain
- Display full resource a plain text
- label
- Try to display a resource using its label
- nslabel
- Try to display a resource as <prefix>:<Label>
- max_length(+Len)
- Truncate long texts to Len characters, using ellipses to indicate that the text is truncated.
- target(+Target)
- Passed to the HTML <a> element as
target
attribute.
This predicate creates two types of links. Resources are linked to the handler implementing
list_resource
using r=<resource> and literals that appear multiple times are linked tolist_triples_with_object
using a Prolog representation of the literal.This predicate can be hooked using display_link//2.