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.
- Display a page holding a table with all RDF graphs. The graphs are sorted to the number of triples.
- graph_actions(+Options0, -Options)[private]
- Deal with actions on multiple graphs.
- HTTP Handler for user actions on multiple graphs.
- HTTP handler that provides information about an individual RDF graph. The output is an HTML table.
- HTML component that shows -statistical- properties about the given named graph.
- 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.
- type_in_graph(+Graph, -Class)[private]
- Generate the unique types in Graph
- Show information about the persistency of the graph
- graph_actions(+Graph)// is det
- Provide a form for basic actions on the graph
- 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.
- 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.
- 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.
- graph_as_resource(+Graph, Options)// is det
- Show resource info for a graph if it is described.
- HTTP handler that lists instances that satisfy certain criteria.
- List all predicates used in graph, sorted by label.
- predicate_row(?Graph, +Pred) is det[private]
- resource_type(+URI, +Graph, -Type) is multi[private]
- List resources related to a predicate. The side argument is
- Display all subject values for the predicate
- Display all object values for the predicate
- Display the types of all subject values
- 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 =
objectand (some) objects are literals.
- skosmap(+Literal, +Options)//[private]
- Component that emits a
tdcell with links to SKOS concepts that are labeled Literal.
- 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.
- HTTP handler that lists the property table for a single resource (=local view)
- 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:
- Limit properties in the table to the given graph
- One of
- 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:
- Defines the order of the predicates. One of
none(database order) or
In addition, Options are passed to rdf_link//2.
- graph_footnotes(+GraphList, +Options)//[private]
- Describe footnote marks in the local view table that indicate the origin of triples.
- lview_graphs(+Subject, ?Graph, -Graphs) is det[private]
- 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.
- 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.
- p_order(+P, -SortKey) is semidet[private]
- SortKey is the key used for sorting the predicate P.
- uri_info(+URI, +Graph)// is det[private]
- Display additional info and actions about a URI in the context of the given graph.
- 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:
- shape(+Start, +Options, +URI, -Shape, +GVOptions) is semidet
- Specify GraphViz shape for URI. This predicate calls the hook cliopatria:node_shape/3.
- bag_shape(+Options, +Members, -Shape) is semidet
- Compute properties for a bag
- 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.
- 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.
- triple_table(+Triples, +Predicate, +Options)// is det[private]
- Show a list of triples. If Predicate is given, omit the predicate from the table.
- HTTP handler that creates a subject/predicate table for triples
that have the gived object. Object is specified using either
lparameter. Optionally, results can be limited to a predicate and/or graph.
- List triples that have a literal that matches the q-parameter. This is used for finding objects through the autocompletion interface.
- sort_by_label(+URIs, -Sorted) is det[private]
- Sort a list of URIs by their label using locale-based ordering.
- sort_triples_by_label(+Triples, -Sorted)[private]
- Sort a list of
rdf(S,P,O)by the labels.
- sort_pairs_by_label(+Pairs, -Sorted)[private]
- Sort a pair-list where the keys are resources by their label.
- p_label(+Id, -Label)[private]
- Defines the visible label for a property.
- HTTP handler to search for triples that contain a literal that matches a query.
- literal_triples(+ListOfLiterals, +Filter, -Triples) is det[private]
- Find the list of triples with a literal in ListOfLiterals and whose subject satisfies Filter.
- rdf_table(+Triples, +Options)// is det[private]
- Emit a table of triples.
- 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.
- table_rows(:Goal, +DataList)// is det[private]
- 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
odd. The first row is
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
- List known RDF prefixes in various formats