All predicatesShow sourcebrowse.pl -- ClioPatria RDF data browser

This module implements basic browsing of an RDF repository. This is not intended to be used as an end-user application, but for the developer to gain insight in the data in the RDF store. That said, the distinction between end-user and developer can be rather vague if we consider `back-office' applications. To a certain extend, back-office applications are considered within the scope of this module and therefore it provides several hooks and defines several `components' that allow back-office applications to reuse this infrastructure.

See also
- cliopatria(hooks) for available hooks.
Source list_graphs(+Request)[private]
Display a page holding a table with all RDF graphs. The graphs are sorted to the number of triples.
Source graph_actions(+Options0, -Options)[private]
 multigraph_actions(+Options)[private]
Deal with actions on multiple graphs.
Source multigraph_action(Request)[private]
HTTP Handler for user actions on multiple graphs.
Source list_graph(+Request)[private]
HTTP handler that provides information about an individual RDF graph. The output is an HTML table.
Source graph_info(+Graph)//
HTML component that shows -statistical- properties about the given named graph.
Source subject_in_graph(+Graph, -Subject)[private]
Generate the distinct subjects in a graph. There are two ways to do this: first the subjects and then whether they appear in the graph or the other way around. At least this has the advantage that we get distinct subjects for free.
Source type_in_graph(+Graph, -Class)[private]
Generate the unique types in Graph
Source graph_persistency(+Graph)//[private]
Show information about the persistency of the graph
Source graph_actions(+Graph)// is det
Provide a form for basic actions on the graph
Source list_classes(+Request)[private]
HTTP handler that lists all classes of all subjects that appear in the named graph. The output is an HTML page holding all referenced classes sorted by their label.
Source types_in_graph(+Graph, -Map:list(Type-InstanceCount))[private]
Generate a map of all types that appear in Graph with a count on the number of instances.
Source instance_in_graph(?Graph, ?Class, +Type, -Subject, -PropertyCount) is nondet[private]
True of Subject is an instance of Class with PropertyCount properties provided from Graph.
Source graph_as_resource(+Graph, Options)// is det
Show resource info for a graph if it is described.
Source list_instances(+Request)[private]
HTTP handler that lists instances that satisfy certain criteria.
Source list_predicates(+Request)[private]
List all predicates used in graph, sorted by label.
 predicate_row(?Graph, +Pred) is det[private]
Source resource_type(+URI, +Graph, -Type) is multi[private]
Source list_predicate_resources(+Request)[private]
List resources related to a predicate. The side argument is one of:
subject
Display all subject values for the predicate
object
Display all object values for the predicate
domain
Display the types of all subject values
range
Display the types of all object values.

If the skosmap attribute is true, an extra column is added that shows SKOS concepts that match literals. This only makes sense if side = object and (some) objects are literals.

Source skosmap(+Literal, +Options)//[private]
Component that emits a td cell with links to SKOS concepts that are labeled Literal.
Source term_frequency_list(+Terms, -TermFrequencyPairs)[private]
TermFrequencyPairs is a list if pairs Value-Count of equivalent term in Terms. Equivalence is determined using ==/2. The terms themselves are sorted on the standard order of terms.
Source list_resource(+Request)[private]
HTTP handler that lists the property table for a single resource (=local view)
See also
- The functionality of this handler is also available as an embedable component through list_resource//2.
Source list_resource(+URI, +Options)// is det
Component that emits the `local view' for URI. The local view shows the basic properties of URI, the context in which is appears and the graphs from which the information is extracted. Options is one of:
graph(Graph)
Limit properties in the table to the given graph
sorted(Sorted)
One of default or none.

Calls the hook cliopatria:list_resource//2. For compatibility reasons, it also tries the hook cliopatria:list_resource//1.

See also
- list_resource/1 is the corresponding HTTP handler. The component rdf_link//1 creates a link to list_resource/1.
Source define_prefix(+URI)//[private]
Allow defining a new prefix if the resource is not covered by a prefix.
 location(+URI, ?Graph) is det[private]
Show the URI. If the URI is a blank node, show its context using Turtle notation.
 as_graph(+URI) is det[private]
Show the places where URI is used as a named graph
 as_object(+URI, +Graph) is det[private]
Show the places where URI is used as an object.
 local_view(+URI, ?Graph, +Options) is det[private]
Show the local-view table for URI. If Graph is given, only show triples from the given graph. Options processed:
top_max(+Count)
bottom_max(+Count)
sorted(+How)
Defines the order of the predicates. One of none (database order) or default
show_graph(+Bool)

In addition, Options are passed to rdf_link//2.

Source graph_footnotes(+GraphList, +Options)//[private]
Describe footnote marks in the local view table that indicate the origin of triples.
Source lview_graphs(+Subject, ?Graph, -Graphs) is det[private]
Source po_pairs(+Subject, ?Graph, -Pairs, +Options) is det[private]
Pairs is a list of P-ObjectList for the S,P,O triples on Subject. The list is normally sorted by predicate as defined by p_order/2 below.
Source sort_po(+Pairs, -Sorted) is det[private]
Sort a list of P-ValueList. This is used to keep the dominant rdf, rdfs, skos, etc. properties in a fixed order at the start of the table.
Source p_order(+P, -SortKey) is semidet[private]
SortKey is the key used for sorting the predicate P.
To be done
- Make this hookable.
Source uri_info(+URI, +Graph)// is det[private]
Display additional info and actions about a URI in the context of the given graph.
Source context_graph(+URI, +Options)// is det
Show graph with the context of URI. Options is passed to cliopatria:context_graph/3 and cliopatria:node_shape/3. Two options have special meaning:
style(?Style)
If this option is not specified, it is passed as a variable. It can be tested or filled by cliopatria:context_graph/3 and subsequently used by cliopatria:node_shape/3.
start(+URI)
Passed to cliopatria:node_shape/3 to indicate the origin of the context graph.
Source shape(+Start, +Options, +URI, -Shape, +GVOptions) is semidet
Specify GraphViz shape for URI. This predicate calls the hook cliopatria:node_shape/3.
Source bag_shape(+Options, +Members, -Shape) is semidet
Compute properties for a bag
Source context_graph(+URI, -Triples, +Options) is det[private]
Triples is a graph that describes the environment of URI. Currently, the environment is defined as:
  • skos:related properties (using 1 step)
  • Transitive properties (using upto 3 steps).

This predicate can be hooked using context_graph/2.

Source list_triples(+Request)[private]
List triples for a given predicate. The triple-set can optionally be filtered on the graph, type of the subject or type of the object.
Source triple_table(+Triples, +Predicate, +Options)// is det[private]
Show a list of triples. If Predicate is given, omit the predicate from the table.
Source list_triples_with_object(+Request)[private]
HTTP handler that creates a subject/predicate table for triples that have the gived object. Object is specified using either the r or l parameter. Optionally, results can be limited to a predicate and/or graph.
Source list_triples_with_literal(+Request)[private]
List triples that have a literal that matches the q-parameter. This is used for finding objects through the autocompletion interface.
Source sort_by_label(+URIs, -Sorted) is det[private]
Sort a list of URIs by their label using locale-based ordering.
Source sort_triples_by_label(+Triples, -Sorted)[private]
Sort a list of rdf(S,P,O) by the labels.
Source sort_pairs_by_label(+Pairs, -Sorted)[private]
Sort a pair-list where the keys are resources by their label.
Source p_label(+Id, -Label)[private]
Defines the visible label for a property.
See also
- html_property_table//2.
Source search(+Request)[private]
HTTP handler to search for triples that contain a literal that matches a query.
To be done
- Produce a sensible search language.
Source literal_triples(+ListOfLiterals, +Filter, -Triples) is det[private]
Find the list of triples with a literal in ListOfLiterals and whose subject satisfies Filter.
Source rdf_table(+Triples, +Options)// is det[private]
Emit a table of triples.
Arguments:
Triples- is a list of rdf(S,P,O).
Source html_property_table(+Template, :Goal)// is det[private]
Create a table for all instantiations of Template for which Goal is true. Template is a term row(C1, C2, ...). The first column (C1) is considered the property-name and emitted as a cell of class p_name. The label for the property is derived using p_label/2. The remainder is emited as normal td value-cells.
Source table_rows(:Goal, +DataList)// is det[private]
Source table_rows(:Goal, +DataList, +MaxTop, +MaxBottom)// is det[private]
Emit a number of table rows (tr). The content of each row is created by calling call(Goal, Data) as a DCG. The rows have alternating classes even and odd. The first row is odd.

The variation table_rows//4 limits the size of the table, placing a cell with class skip, indicating the number of skipped rows.

Note that we can also achieve alternate colouring using the CSS pseudo classes tr:nth-child(odd) and tr:nth-child(even).

Source list_prefixes(+Request)[private]
List known RDF prefixes in various formats