. . . . . . . . . . . "7d097ef48ba17dff011418ed5a7e8dc4" . . . . . . . "2017-06-13T06:04:26Z" . . . . . . . . . . . "VirtRDFDriverRedland" . . "VirtRDFDriverRedland" . . . . "VirtRDFDriverRedland" . . . . . . "2017-06-13T06:04:26Z" . "2017-06-13T06:04:26.948709"^^ . "2017-06-13T06:04:26.948709"^^ . . . . . "%META:TOPICPARENT{name=\"VOSRDFDataProviders\"}%\n%VOSNAV%\n\n---+ Virtuoso Redland RDF Storage Provider\n\n%TOC%\n\n---++ What is Redland\n\n[[http://librdf.org][Redland]] is a set of free software 'C' libraries that provide support for the \nResource Description Framework (RDF), providing modular, object-based libraries, and APIs for manipulating \nthe RDF graph, triples, URIs, and Literals. Redland includes several high-level language APIs providing \nRDF manipulation and storage, and requires the [[http://librdf.org/raptor/][Raptor]] RDF parser and \n[[http://librdf.org/rasqal/][Rasqal]] RDF syntax and query library for its use.\n\n---++ What is the Virtuoso Redland Provider\n\nThe Virtuoso Redland RDF Provider is an implementation of the Storage API, Model, and Query interfaces \nof the Redland framework for RDF. This provider enables the execution of queries via the Redland Rasqal \nquery engine or via Virtuoso query engine directly against the Virtuoso Quad store. The Virtuoso Redland \nProvider uses ODBC as the data access mechanism for communicating with the Virtuoso Quad Store and therefore \nrequires the Virtuoso ODBC Driver be installed on the Redland client and a suitable ODBC DSN be configured \nfor connecting to the target Virtuoso Quad Store instance. The provider has been tested against the \n[[http://download.librdf.org/source/][Redland 1.0.8]] version available for download at the time of writing.\n\n---+++ Fig 1: Redland Component Stack\n\n\"Fig\n\nAs indicated in the diagram above, the Virtuoso Provider can be used to execute RDF queries either directly \nagainst the Virtuoso graph storage module (which supports the [[http://dbpedia.org/resource/SPARQL][SPARQL]], \n[[http://dbpedia.org/resource/SPARUL][SPARUL]], and \n[[http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSArticleBISPARQL2][SPARQL-BI]] query languages) \nor via the Rasqal query engine built into Redland (which supports only the SPARQL query language). The \nquery handler is specified by the query; use \"vsparql\" for Virtuoso, or the default \"sparql\" for Redland, \nas indicated in the sample queries below:\n\nrdfproc -r xml -t \"user='dba',password='dba',dsn='Demo'\" gr query sparql - \"SELECT * WHERE { ?s ?p ?o }\" ;; via Redland Rasqal engine\n\nrdfproc -r xml -t \"user='dba',password='dba',dsn='Demo'\" gr query vsparql - \"SELECT * WHERE { ?s ?p ?o }\" ;; direct to Virtuoso storage module\n\n\nThe Virtuoso Provider uses the [[http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSSQL2RDF][SPASQL]] \nquery language for querying the remote Virtuoso QUAD store.\n\n---++ Setup\n\n---+++ Required files\n\nThe Virtuoso Redland Provider has been integrated into the Redland RDF Framework and submitted to the open source \nproject to become part of the standard distribution available for [[http://librdf.org/INSTALL.html][download]]. \n\n---+++ Compling Redland with Virtuoso storage support\n\n 1 [[http://svn.librdf.org/][Download Redland]] from the svn repository.\n 1 Use the following additional configure options to enable support for Virtuoso storage:\n\n--with-virtuoso(=yes|no) Enable Virtuoso RDF store \n (default=auto)\n--with-iodbc(=DIR) Select iODBC support\n DIR is the iODBC base install directory\n (default=/usr/local)\n--with-unixodbc(=DIR) Select UnixODBC support\n DIR is the UnixODBC base install directory\n (default=/usr/local)\n--with-datadirect(=DIR) Select DataDirect support\n DIR is the DataDirect base install directory\n (default=/usr/local)\n--with-odbc-inc=DIR Specify custom ODBC include directory\n (default=/usr/local/include)\n--with-odbc-lib=DIR Specify custom ODBC lib directory\n (default=/usr/local/lib)\n\n * The --with-virtuoso option is auto-enabled if a valid ODBC Driver \n Manager (iODBC, UnixODBC, or DataDirect) or include and lib \n directories for required ODBC header files and libraries are discovered via the suitable \n setting for one or more of the other ODBC related options above. \n * Assuming [[http://www.iodbc.org/][iODBC]] is installed, the following command can \n be used to enable Virtuoso storage support to be configured for compilation into \n your Redland build:\n\n./configure --with-iodbc=/usr/local/iODBC\n\n 1 Run make to compile the Redland libraries and sudo make install \n to install in the default /usr/local location\n 1 Test compilation with the utils/rdfproc test utility. This test will use \n the default hashes storage.\n\nrdfproc test parse http://planetrdf.com/guide/rss.rdf\nrdfproc test print\nrdfproc test serialize ntriples\n\n 1 Ensure you have [[http://virtuoso.openlinksw.com/download/][the Virtuoso ODBC Driver]] \n installed, and [[http://docs.openlinksw.com/virtuoso/odbcimplementation/][a valid ODBC \n DSN called \"Local Virtuoso\"]] configured for your target Virtuoso Server.\n 1 Set the following environment variable:\n\nexport RDFPROC_STORAGE_TYPE=virtuoso ;; Enable Virtuoso Storage \nexport ODBCINI=/odbc.ini ;; Enable ODBC DSN to be located\nexport LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ;; May be required to enable Redland libraries to be located\n\n 1 Test Virtuoso storage with the provided utils/vtest test program:\n\n$ utils/vtest \n 1: Remove all triples in context\n**PASSED**: removed context triples from the graph\n 2: Add triples to context\n**PASSED**: add triple to context\n 3: Print all triples in context\n[[\n {[aa], [bb], [cc]} with context [http://red]\n {[aa], [bb1], [cc]} with context [http://red]\n {[aa], [a2], \"cc\"} with context [http://red]\n {[aa], [a2], (cc)} with context [http://red]\n {[mm], [nn], \"Some long literal with language@en\"} with context [http://red]\n {[oo], [pp], \"12345^^\"} with context [http://red]\n]]\n**PASSED**:\n 4: Count of triples in context\n**PASSED**: graph has 6 triples\n 5: Exec: ARC aa bb \nMatched node: [cc]\n**PASSED**:\n 6: Exec: ARCS aa cc \nMatched node: [bb] with context [http://red]\nMatched node: [bb1] with context [http://red]\n: matching nodes: 2\n**PASSED**:\n 7: Exec: ARCS-IN cc \nMatched arc: [bb] with context [http://red]\nMatched arc: [bb1] with context [http://red]\n**PASSED**: matching arcs: 2\n 8: Exec: ARCS-OUT aa \nMatched arc: [bb] with context [http://red]\nMatched arc: [bb1] with context [http://red]\nMatched arc: [a2] with context [http://red]\nMatched arc: [a2] with context [http://red]\n**PASSED**: matching arcs: 4\n 9: Exec: CONTAINS aa bb1 cc \n**PASSED**: the graph contains the triple\n 10: Exec: FIND aa - - \nMatched triple: {[aa], [bb], [cc]} with context [http://red]\nMatched triple: {[aa], [bb1], [cc]} with context [http://red]\nMatched triple: {[aa], [a2], \"cc\"} with context [http://red]\nMatched triple: {[aa], [a2], (cc)} with context [http://red]\n**PASSED**: matching triples: 4\n 11: Exec: HAS-ARC-IN cc bb \n**PASSED**: the graph contains the arc\n 12: Exec: HAS-ARC-OUT aa bb \n**PASSED**: the graph contains the arc\n 13: Exec: SOURCE aa cc \nMatched node: [aa]\n**PASSED**:\n 14: Exec: SOURCES bb cc \nMatched node: [aa] with context [http://red]\n: matching nodes: 1\n**PASSED**:\n 15: Exec: TARGET aa bb \nMatched node: [cc]\n**PASSED**:\n 16: Exec: TARGETS aa bb \nMatched node: [cc] with context [http://red]\n: matching nodes: 1\n**PASSED**:\n 17: Exec: REMOVE aa bb1 cc \n**PASSED**: removed triple from the graph\n 18: Exec: QUERY \"CONSTRUCT {?s ?p ?o} FROM WHERE {?s ?p ?o}\" \nMatched triple: {[aa], [a2], \"cc\"}\nMatched triple: {[oo], [pp], \"12345^^\"}\nMatched triple: {[aa], [a2], (cc)}\nMatched triple: {[aa], [bb], [cc]}\nMatched triple: {[mm], [nn], \"Some long literal with language@en\"}\n**PASSED**: matching triples: 5\n 19: Exec1: QUERY_AS_BINDINGS \"SELECT * WHERE {graph { ?s ?p ?o }}\" \n**: Formatting query result as 'xml':\n\n\n \n \n \n \n \n \n \n aa\n bb\n cc\n \n \n aa\n a2\n cc\n \n \n aa\n a2\n cc\n \n \n mm\n nn\n Some long literal with language@en\n \n \n oo\n pp\n 12345^^<http://www.w3.org/2001/XMLSchema#int>\n \n \n\n**PASSED**:\n 20: Exec2: QUERY_AS_BINDINGS \"SELECT * WHERE {graph { ?s ?p ?o }}\" \n: Query returned bindings results:\nresult: [s=[aa], p=[bb], o=[cc]]\nresult: [s=[aa], p=[a2], o=cc]\nresult: [s=[aa], p=[a2], o=(cc)]\nresult: [s=[mm], p=[nn], o=Some long literal with language@en]\nresult: [s=[oo], p=[pp], o=12345^^]\n: Query returned 5 results\n**PASSED**:\n=============================================\nPASSED: 20 FAILED: 0\n\n\n---+++ Connection Attributes\n\nThe Virtuoso Redland Provider has the following connection attributes available for use:\n\n * *dsn* - ODBC datasource name\n * *user* - user name of database server\n * *password* - password of database server\n * *host* - hostname:portno of the database server\n * *charset* - database charset to use\n\nNOTE: Take care exposing the password as, for example, program arguments or environment \nvariables. The rdfproc utility can help with this by reading the password from standard \ninput. Inside programs, one way to prevent storing the password in a string is to construct a Redland \nhash of the storage options such as via librdf_hash_from_string and \nuse librdf_new_storage_with_options to create a storage. The \nrdfproc utility source code demonstrates this.\n\nThe storage name parameter given to the storage constructor librdf_new_storage \nis used inside the Virtuoso store to allow multiple stores inside one Virtuoso database instance, as \nparametrized with the options above.\n\nThis store always provides contexts; the Boolean storage option contexts is not checked.\n\nExamples:\n\n /* A new Virtuoso store */\n storage=librdf_new_storage(world, \"virtuoso\", \"db1\",\n \"dsn='Local Virtuoso',user='demo',password='demo'\");\n\n /* A different, existing Virtuoso store in the same database as above */\n storage=librdf_new_storage(world, \"virtuoso\", \"db2\",\n \"dsn='Local Virtuoso',user='demo',password='demo'\");\n\n /* An existing Virtuoso store on a different database server */\n storage=librdf_new_storage(world, \"virtuoso\", \"http://red3\",\n \"dsn='Remote Virtuoso',user='demo',password='demo'\");\n\n /* Opening with an options hash */\n options=librdf_new_hash(world, NULL);\n librdf_hash_from_string(options, \n \"dsn='Local Virtuoso',user='demo'\");\n librdf_hash_put_strings(options, \"password\", user_password);\n storage=librdf_new_storage_with_options(world, \"virtuoso\", \"http://red3\", options);\n\n\n---++ Related\n\n * [[VirtJenaProvider][Virtuoso Jena RDF Storage Provider]]\n * [[VirtSesame2Provider][Virtuoso Sesame RDF Storage Provider]]\n * [[VirtRDFDriverRedland][Virtuoso Redland RDF Storage Provider]]\n * [[VirtRDFInsert][RDF Insert Methods in Virtuoso]]\n * [[VirtBulkRDFLoader][Guide for Bulk Loading of RDF Source Files into one or more Graph IRIs]]\n * [[VOSBuild][Virtuoso Installation Guide]]\n * [[http://librdf.org/docs/api/redland-storage.html][RedLand Triple Store]]\n * [[http://librdf.org/docs/api/redland-storage-modules.html][RedLand Storage Modules]] \n\nCategoryRDF CategoryOpenSource CategoryVirtuoso CategoryVOS CategoryNativeRDFProviders CategoryDocumentation\n\n%VOSCOPY%\n\n" . . . . . .