Virtuoso Open-Source Wiki
Virtuoso Open-Source, OpenLink Data Spaces, and OpenLink Ajax Toolkit
Advanced Search
Help?
Location: / Dashboard / Main / VirtSparqlCxmlFacetPivotBridge

Pivot Collections (Part 6)

Contents

Part 1: Introduction

Part 2: SparqlCxml

Part 3: SparqlCxml Deep Zoom Collections

Part 4: PivotViewer

Part 5: Importing CXML

Part 6: Facet Pivot Bridge

Part 7: DETs : Persisting SPARQL Query Results to DAV

Part 8: Frequently Asked Questions (FAQs)

Part 9: Glossary


Facet Pivot Bridge

The Facet Pivot Bridge provides one alternative to the /sparql endpoint and Conductor /sparql UI for CXML generation. It presents a more user-friendly front end for users unfamiliar with SPARQL or not wanting to use it directly. As its name suggests, it forms a bridge between Virtuoso's Facet Browser and Pivot Viewer, through which Pivot collections can be generated directly from search results returned by the Facets Web Service.

Overview

The screenshot below shows the standard Facet Browser start screen displayed by the Faceted Search service at /fct. On entering some search text, for example "CEO", and clicking "Search", the Facet Browser displays all entities in the host RDF quad store with any attribute containing the specified text.

If the Facet Pivot Bridge VAD is installed, the result page includes a 'Make Pivot Collection' link for generating a CXML snapshot of the results. When clicked, the Bridge automatically redirects to PivotViewer to display the resulting collection. Adjacent to the 'Make Pivot Collection' link are controls for tailoring the collection. Large collections can be split into pages, a QRcode (matrix bar code) can be included alongside each item's image and URIs can be typed as CXML Strings or Links.


Click to enlarge

Collections generated by the Bridge are saved to a file named collection_{timestamp}.cxml and placed in virtual directory http://<hostname>/pivot_collections/. The virtual directory maps to the WebDAV folder DAV/pivot_collections. So, the full URI to display a Bridge-created collection in PivotViewer would be something like:

  • http://linkeddata.uriburner.com/PivotViewer/?url=http://linkeddata.uriburner.com/pivot_collections/collection_2010-12-23_16-55-48.cxml

Tailoring the CXML Output

The Facet Pivot Bridge is built atop SparqlCxml. However, because the bridge shields users from the complexities of SPARQL, much of the flexibility of SparqlCxml for controlling the CXML output is necessarily lost. Internally, the bridge uses SPARQL DESCRIBEs rather than SELECTs for CXML generation. Consequently the same restrictions apply as discussed in the comparison of these two query types in section SparqlCxml. Specifically, adjusting the RDF to CXML mapping through SPARQL SELECT reserved query variables is not possible. All customisation of the CXML output must be done through graph virtcxml:

Paged Collections

When a collection is split into pages, links to the first, last, next and previous pages are displayed under the 'Related Collections' section of PivotViewer's Info Panel. Depending on the current page position, some of these links may not be displayed. For instance the first and previous links will not be shown if you are already viewing the first page.

Limits

Maximum CXML File Size

Experience has shown that the PivotViewer control can struggle to handle large CXML files. To avoid browser hangs, the Bridge checks the size of a generated CXML file before serving it to PivotViewer. It will report an error if the file size exceeds the configured maximum. By default, this is set to 5MB. To adjust this limit, change the PVT_MAX_CXML_FILE_SIZE entry in the Facet Pivot Bridge configuration table DB.DBA.PIVOT_CFG.

Collection Truncation & MaxSortedTopRows

In order to support paged Pivot collections, a faceted search on the free text "CEO" might result in the Facet Pivot Bridge constructing a query similar to:

describe ?s1 where { { select distinct ?s1 where { ?s1 a ?concept . ?s1 ?s1textp ?o1 . ?o1 bif:contains '"CEO"' . } order by ?s1 limit 100 offset 10300 } }

to provide, in this instance, the result set for page 104 of the collection, where the chosen page size is 100 items.

The "order by/limit/offset" construct used by this query is subject to a Virtuoso limit, MaxTopSortedRows, which may be hit when handling very large collections. MaxSortedTopRows limits the combined size of the limit and offset in an 'order by' query. The default value is 10000. Ordinarily, an error similar to:

Error: (22023) SR353: Sorted TOP clause specifies more then 10400 rows to sort. Only 10000 are allowed. Either decrease the offset and/or row count or use a scrollable cursor"

might result, but the Facet Pivot Bridge protects against this condition arising by limiting, if necessary, the number of pages in a collection. When such a limit is imposed, the 'Last Page' link in the 'Related Collections' section of PivotViewer's Info Panel will read 'Last Page (collection truncated)'. This condition will only arise when handling very large collections. It can be avoided by increasing the value of the MaxTopSortedRows parameter under the "Parameters" section of the virtuoso.ini configuration file.

Powered By Virtuoso