This HTML5 document contains 86 embedded RDF statements represented using HTML+Microdata notation.

The embedded RDF content will be recognized by any processor of HTML5 Microdata.

PrefixNamespace IRI
n40http://download3.openlinksw.com/uda/virtuoso/rdfproviders/sesame/40/create.
n32http://download3.openlinksw.com/uda/virtuoso/rdfproviders/sesame/40/virtuoso.
n46http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/virt_sesame2.
n49http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/create-virtuoso.
n65http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository12.
n11http://rdfs.org/sioc/services#
n50http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/virtuoso.
n66http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtSesame2HttpRepository03.
dchttp://purl.org/dc/elements/1.1/
n42http://download3.openlinksw.com/uda/virtuoso/rdfproviders/sesame/40/virt_sesame4.
n4http://vos.openlinksw.com/dataspace/owiki#
n64http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository11.
n26http://vos.openlinksw.com/dataspace/%28NULL%29/wiki/VOS/
n2http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/
dctermshttp://purl.org/dc/terms/
n56http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository04.
n10http://vos.openlinksw.com/dataspace/services/wiki/
n20http://tomcat.apache.org/tomcat-6.0-doc/index.
n45http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/create.
rdfshttp://www.w3.org/2000/01/rdf-schema#
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
n14http://www.openrdf.org/doc/sesame2/users/ch07.html#
n57http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository09.
n58http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository10.
atomhttp://atomowl.org/ontologies/atomrdf#
n68http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtSesame2HttpRepository01.
n7http://vos.openlinksw.com/dataspace/dav#
n55http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository03.
xsdhhttp://www.w3.org/2001/XMLSchema#
n44https://download3.openlinksw.com/uda/virtuoso/jdbc/virtjdbc4_2.
n34http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtSesame2HttpRepository06.
n41http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtSesame2HttpRepository09.
n39https://download3.openlinksw.com/uda/virtuoso/rdfproviders/rdf4j/2/create.
n21http://tomcat.apache.org/download-60.
n24http://rdf4j.org/download/
n30https://download3.openlinksw.com/uda/virtuoso/rdfproviders/rdf4j/2/virtuoso.
n38http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtSesame2HttpRepository12.
n48https://download3.openlinksw.com/uda/virtuoso/rdfproviders/rdf4j/2/virt_rdf4j.
siochttp://rdfs.org/sioc/ns#
n61http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository08.
n12http://www.openrdf.org/doc/sesame2/2.3.1/users/userguide.html#
n23http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository02.
n28http://vos.openlinksw.com/dataspace/person/owiki#
n60http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository07.
oplhttp://www.openlinksw.com/schema/attribution#
n8http://vos.openlinksw.com/dataspace/person/dav#
n13http://docs.rdf4j.org/server-workbench-console/#
n67http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtSesame2HttpRepository04.
n71http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/VirtSesame2HttpRepository/sioc.
n15http://localhost:8080/
n29http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtSesame2HttpRepository07.
n51http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/virtjdbc3.
n22http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository01.
n36http://download3.openlinksw.com/uda/virtuoso/rdfproviders/sesame/40/create-virtuoso.
n43http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtSesame2HttpRepository10.
n27http://docs.rdf4j.org/server-workbench-console/
n47http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtSesame2HttpRepository13.
n17http://rdf4j.org/2016/05/18/goodbye-sesame-hello-rdf4j/
n54http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository06.
n25http://www.openrdf.org/download.
n63http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository14.
foafhttp://xmlns.com/foaf/0.1/
n53http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository05.
siocthttp://rdfs.org/sioc/types#
n52http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/virtjdbc4.
n69http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtSesame2HttpRepository02.
n35https://download3.openlinksw.com/uda/virtuoso/rdfproviders/rdf4j/2/create-virtuoso.
n33http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtSesame2HttpRepository05.
n9http://vos.openlinksw.com/dataspace/owiki/wiki/
n31http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtSesame2HttpRepository08.
n62http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtRDF4JHttpRepository13.
n37http://vos.openlinksw.com:80/wiki/main/VOS/VirtSesame2HttpRepository/VirtSesame2HttpRepository11.
Subject Item
n8:this
foaf:made
n2:VirtSesame2HttpRepository
Subject Item
n7:this
sioc:creator_of
n2:VirtSesame2HttpRepository
Subject Item
n10:item
n11:services_of
n2:VirtSesame2HttpRepository
Subject Item
n4:this
sioc:creator_of
n2:VirtSesame2HttpRepository
Subject Item
n9:VOS
sioc:container_of
n2:VirtSesame2HttpRepository
atom:entry
n2:VirtSesame2HttpRepository
atom:contains
n2:VirtSesame2HttpRepository
Subject Item
n2:VirtSesame2HttpRepository
rdf:type
atom:Entry sioct:Comment
dcterms:created
2018-04-13T12:07:50.227831
dcterms:modified
2018-05-16T09:53:27.129152
rdfs:label
VirtSesame2HttpRepository
foaf:maker
n8:this n28:this
dc:title
VirtSesame2HttpRepository
opl:isDescribedUsing
n71:rdf
sioc:has_creator
n7:this n4:this
sioc:attachment
n22:png n23:png n29:png n31:png n33:png n34:png n37:png n38:png n41:png n43:png n45:xsl n46:jar n47:png n49:xsl n50:ttl n51:jar n52:jar n53:png n54:png n55:png n56:png n57:png n58:png n60:png n61:png n62:png n63:png n64:png n65:png n66:png n67:png n68:png n69:png
sioc:content
---+Virtuoso RDF4J and Sesame HTTP Repository Configuration and Usage %TOC% ---++What Eclipse RDF4J ([[http://rdf4j.org/2016/05/18/goodbye-sesame-hello-rdf4j/][formerly known as OpenRDF Sesame]]) is an open source Java framework for storing, querying and reasoning with RDF and RDF Schema. It can be used as a database for RDF and RDF Schema, or as a Java library for applications that need to work with RDF internally. The RDF4J HTTP and Console repositories serves as a proxy for a RDF store hosted on a remote RDF4J server, enabling the querying of the RDF store using the RDF4J HTTP protocol. ---++Why The RDF4J HTTP repository endpoint provides users with the greater flexibility for manipulating the RDF store via a common interface. RDF4J provides you with the necessary tools to parse, interpret, query and store all this information, embedded in your own application if you want, or, if you prefer, in a separate database or even on a remote server. ---++How To create a new RDF4J HTTP repository, the Console needs to create such an RDF document and submit it to the SYSTEM repository. The Console uses so called repository configuration templates to accomplish this. Repository configuration templates are simple Turtle RDF files that describe a repository configuration, where some of the parameters are replaced with variables. The Console parses these templates and asks the user to supply values for the variables. The variables are then substituted with the specified values, which produces the required configuration data. Refer to the [[http://docs.rdf4j.org/server-workbench-console/][RDF4J Server, Workbench, and Console]] documentation for more details on it usage. ---++Setup and Testing This section details the steps required for configuring and testing a Virtuoso RDF4J or Sesame Repository, both using the HTTP and Console RDF4J or Sesame repositories. ---+++Requirements * [[http://rdf4j.org/download/][RDF4J 2.x SDK]] or [[http://www.openrdf.org/download.jsp][Sesame 2.3.1]] or higher * [[https://download3.openlinksw.com/uda/virtuoso/rdfproviders/rdf4j/2/virt_rdf4j.jar][RDF4J 2.x]] (virt_rdf4j.jar), <a href="VOSDownload/virt_sesame2.jar" style="wikiautogen">Virtuoso Sesame 2.x </a> (virt_sesame2.jar) or [[http://download3.openlinksw.com/uda/virtuoso/rdfproviders/sesame/40/virt_sesame4.jar][Virtuoso Sesame 4.x]] (virt_sesame4.jar) Provider * [[https://download3.openlinksw.com/uda/virtuoso/jdbc/virtjdbc4_2.jar][Virtuoso JDBC Driver for Java 8]] (virtjdbc4_2.jar) or <a href="VOSDownload/virtjdbc4.jar" style="wikiautogen">Virtuoso JDBC Driver for earlier Java versions</a> (virtjdbc4.jar) * Virtuoso System Repository config file for [[https://download3.openlinksw.com/uda/virtuoso/rdfproviders/rdf4j/2/create.xsl][RDF4J 2.x]] or <a href="%ATTACHURLPATH%/create.xsl" style="wikiautogen">Sesame 2.x</a> or [[http://download3.openlinksw.com/uda/virtuoso/rdfproviders/sesame/40/create.xsl][Sesame 4.x]] (create.xsl) * Virtuoso Repository config file for [[https://download3.openlinksw.com/uda/virtuoso/rdfproviders/rdf4j/2/create-virtuoso.xsl][RDF4J 2.x]] or <a href="%ATTACHURLPATH%/create-virtuoso.xsl" style="wikiautogen">Sesame 2.x </a> or [[http://download3.openlinksw.com/uda/virtuoso/rdfproviders/sesame/40/create-virtuoso.xsl][Sesame 4.x]] (create-virtuoso.xsl) * Configuration Template file for a Virtuoso Repository for [[https://download3.openlinksw.com/uda/virtuoso/rdfproviders/rdf4j/2/virtuoso.ttl][RDF4J 2.x]] or <a href="%ATTACHURLPATH%/virtuoso.ttl" style="wikiautogen">Sesame 2.x </a> or [[http://download3.openlinksw.com/uda/virtuoso/rdfproviders/sesame/40/virtuoso.ttl][Sesame 4.x]] (virtuoso.ttl) * [[http://tomcat.apache.org/download-60.cgi][Apache Tomcat]] version 5 or higher ---+++Setup RDF4J or Sesame HTTP Repository This section details the steps required for configuring and testing a Virtuoso HTTP RDF4J or Sesame Repository. 1 Install [[http://tomcat.apache.org/tomcat-6.0-doc/index.html][Apache Tomcat]] web server 1 If using RDF4J: * From the RDF4J 2.x SDK "lib" directory copy the "rdf4j-server.war" and "rdf4j-workbench.war" files to the tomcat "webapps" directory where they will automatically be deployed creating two new sub directories "rdf4j-server" and "rdf4j-workbench". * Place the corresponding Virtuoso RDF4J 2.x Provider "virt_rdf4j.jar" and JDBC Driver "virtjdbc4_2.jar" into the Tomcat <code>~/webapps/rdf4j-server/WEB-INF/lib/</code> and <code>~/webapps/rdf4j-workbench/WEB-INF/lib/</code> directories for use by the RDF4J HTTP Repository for accessing the Virtuoso RDF repository. * Place the "create.xsl" and "create-virtuoso.xsl" files in the Tomcat <code>~/webapps/rdf4j-workbench/transformations/</code> directory. Note "create.xsl" replaces the default provided with RDF4J and contains the necessary entries required to reference the new "create-virtuoso.xsl" template file for Virtuoso repository configuration. * The RDF4J HTTP Repository will now be accessible on the URLs * http://localhost:8080/rdf4j-server %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository01.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% * http://localhost:8080/rdf4j-workbench %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository02.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% 1 If using Sesame: * From Sesame 2.3.1 or higher "lib" directory copy the "openrdf-sesame.war" and "openrdf-workbench.war" files to the tomcat "webapps" directory where they will automatically be deployed creating two new sub directories "openrdf-sesame" and "openrdf-workbench". * Place the corresponding Virtuoso Sesame Provider "virt_sesame2.jar" or "virt_sesame4.jar" and JDBC Driver "virtjdbc4.jar" into the Tomcat <code>~/webapps/openrdf-sesame/WEB-INF/lib/</code> and <code>~/webapps/openrdf-workbench/WEB-INF/lib/</code> directories for use by the Sesame HTTP Repository for accessing the Virtuoso RDF repository. * Place the "create.xsl" and "create-virtuoso.xsl" files in the Tomcat <code>~/webapps/openrdf-workbench/transformations/</code> directory. Note "create.xsl" replaces the default provided with Sesame and contains the necessary entries required to reference the new "create-virtuoso.xsl" template file for Virtuoso repository configuration. * The Sesame HTTP Repository will now be accessible on the URLs <verbatim> http://localhost:8080/openrdf-sesame http://localhost:8080/openrdf-workbench </verbatim> 1 The Eclipse RDF4J or Sesame <nop>OpenRDF Workbench is used for accessing the RDF4J or Sesame HTTP Repositories, loading "http://localhost:8080/openrdf-workbench" will enable the default "SYSTEM" repository to be accessed. * RDF4J %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository02.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% * Sesame %BR%%BR% <img src="%ATTACHURLPATH%/VirtSesame2HttpRepository02.png" style="wikiautogen"/> %BR%%BR% 1 Click on the "New Repository" link in the left frame to create a new RDF4J or Sesame Repository. * RDF4J %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository03.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% * Sesame %BR%%BR% <img src="%ATTACHURLPATH%/VirtSesame2HttpRepository03.png" style="wikiautogen"/> %BR%%BR% 1 Select the "Virtuoso RDF Store" from the "Type" drop down list box presented. * RDF4J %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository04.png" style="max-width: 800px ; min-width: 300px ; width: 100%"/> %BR%%BR% * Sesame %BR%%BR% <img src="%ATTACHURLPATH%/VirtSesame2HttpRepository04.png" style="wikiautogen"/> %BR%%BR% 1 Choose suitable repository "ID" and "Title" for the Virtuoso repository to be created and click "Next". * RDF4J %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository05.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% * Sesame %BR%%BR% <img src="%ATTACHURLPATH%/VirtSesame2HttpRepository05.png" style="wikiautogen"/> %BR%%BR% 1 Fill in the connection parameters for the target Virtuoso sever the repository is to be created for and click the "create" button. The minimum required are the hostname, port number, username and password of the Virtuoso Server. * RDF4J %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository06.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% * Sesame %BR%%BR% <img src="%ATTACHURLPATH%/VirtSesame2HttpRepository06.png" style="wikiautogen"/> %BR%%BR% 1 The new Virtuoso respository will be created and its summary page displayed. * RDF4J %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository07.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% * Sesame %BR%%BR% <img src="%ATTACHURLPATH%/VirtSesame2HttpRepository07.png" style="wikiautogen"/> %BR%%BR% 1 Click on the "Namespaces" link in the left frame to obtain a list of the available namespaces in the Virtuoso repository. * RDF4J %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository08.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% * Sesame %BR%%BR% <img src="%ATTACHURLPATH%/VirtSesame2HttpRepository08.png" style="wikiautogen"/> %BR%%BR% 1 Click on the "Context" link in the left frame to obtain a list of the available contexts in the Virtuoso repository. * RDF4J %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository09.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% * Sesame %BR%%BR% <img src="%ATTACHURLPATH%/VirtSesame2HttpRepository09.png" style="wikiautogen"/> %BR%%BR% 1 Click on the "Types" link in the left frame to obtain a list of the available types in the Virtuoso repository. * RDF4J %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository10.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% * Sesame %BR%%BR% <img src="%ATTACHURLPATH%/VirtSesame2HttpRepository10.png" style="wikiautogen"/> %BR%%BR% 1 Click on the "Query" link in the left frame, enter a suitable SPARQL query to execute against the Virtuoso repository and click the "execute" button. * RDF4J %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository11.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% * Sesame %BR%%BR% <img src="%ATTACHURLPATH%/VirtSesame2HttpRepository11.png" style="wikiautogen"/> %BR%%BR% 1 The results of the SPARQL query are returned. * RDF4J %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository12.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% * Sesame %BR%%BR% <img src="%ATTACHURLPATH%/VirtSesame2HttpRepository12.png" style="wikiautogen"/> %BR%%BR% 1 Click on the "SPARQL Update" link in the left where SPARQL update queries can be executed against the Virtuoso repository and click the "execute" button. * RDF4J %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository13.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% 1 Click on the "Repositories" link in the left frame and the newly created Virtuoso repository entry is displayed along side the default SYSTEM repository. * RDF4J %BR%%BR% <img src="%ATTACHURLPATH%/VirtRDF4JHttpRepository14.png" style="max-width: 800px ; min-width: 250px ; width: 100%"/> %BR%%BR% * Sesame %BR%%BR% <img src="%ATTACHURLPATH%/VirtSesame2HttpRepository13.png" style="wikiautogen"/> %BR% ---+++Setup RDF4J or Sesame Console Repository This section details the steps required for configuring and testing a Virtuoso RDF4J Console Repository 1 Extract RDF4J 2.x SDK or Sesame 2.3.1 or higher archive to a location of choice and place the <code>virt_rdf4j.jar</code>, <code>virt_sesame2.jar</code> or <code>virt_sesame4.jar</code> and <code>virtjdbc4.jar</code> files to the sesame "lib" directory 1 Start the [[http://docs.rdf4j.org/server-workbench-console/#_rdf4j_console][RDF4J]] or [[http://www.openrdf.org/doc/sesame2/users/ch07.html#section-console-repository-creation][Sesame]] console application by running the "console.bat" script in the sesame "bin" directory and then "exit." the program <verbatim> $ sh console.sh SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/Users/myuser/openrdf-sesame-2.3.1/lib/logback-classic-0.9.18.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/Users/myuser/openrdf-sesame-2.3.1/lib/slf4j-jdk14-1.5.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 10:32:38.317 [main] DEBUG info.aduna.platform.PlatformFactory - os.name <http://os.name> <http://os.name> = mac os x 10:32:38.351 [main] DEBUG info.aduna.platform.PlatformFactory - Detected Mac OS X platform Connected to default data directory Commands end with '.' at the end of a line Type 'help.' for help exit. </verbatim> 1 This will create the necessary sesame application data directories as detailed in the [[http://docs.rdf4j.org/server-workbench-console/][RDF4J]] or Sesame [[http://www.openrdf.org/doc/sesame2/2.3.1/users/userguide.html#chapter-datadir-config][data directory configuration]] documentation. <verbatim> Windows - C:\Documents and Settings\LocalService\Application Data\Aduna\ Mac OS X - /Users/myuser/Library/Application Support/Aduna/ Linux - $HOME/.aduna/ </verbatim> 1 If you do not want to use the default sesame data directory location the RDF4J or Sesame console application can be started by specifying a custom data directory location with the "-d" option. Note in this case the directory "<nop>OpenRDF Sesame console" always has to be manually appended to the directory as RDF4J/Sesame assumes the data file will reside in a sub directory of this name. <verbatim> $ sh console.sh -d /Users/myuser/OpenRDF Sesame console </verbatim> 1 Add the <code>virtuoso.ttl</code> file to the <code>~/OpenRDF Sesame console/templates</code> folder, to enable the Virtuoso repository default configuration parameters to be located. 1 Start the sesame console application with the required data directory location and create a Virtuoso repository as detailed in the steps below, the key parameters to be specified being the target Virtuoso server hostname, port number, username, password and a unique "Repository ID". <verbatim> $ sh console.sh SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/Users/myuser/openrdf-sesame-2.3.1/lib/logback-classic-0.9.18.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/Users/myuser/openrdf-sesame-2.3.1/lib/slf4j-jdk14-1.5.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 10:32:38.317 [main] DEBUG info.aduna.platform.PlatformFactory - os.name <http://os.name> <http://os.name> = mac os x 10:32:38.351 [main] DEBUG info.aduna.platform.PlatformFactory - Detected Mac OS X platform Connected to default data directory Commands end with '.' at the end of a line Type 'help.' for help create virtuoso . Please specify values for the following variables: Host list [localhost:1111]: Username [dba]: Password [dba]: Default graph name [sesame:nil]: Enable using batch optimization (false|true) [false]: Use RoundRobin for connection (false|true) [false]: Buffer fetch size [200]: Inference RuleSet name [null]: Repository ID [virtuoso]: myvirt Repository title [Virtuoso repository]: Repository created show r . +---------- |SYSTEM |myvirt ("Virtuoso repository") +---------- open myvirt . Opened repository 'myvirt' myvirt> show n . +---------- |bif bif: |dawgt http://www.w3.org/2001/sw/DataAccess/tests/test-dawg# |dbpedia http://dbpedia.org/resource/ |dbpprop http://dbpedia.org/property/ |dc http://purl.org/dc/elements/1.1/ |foaf http://xmlns.com/foaf/0.1/ |geo http://www.w3.org/2003/01/geo/wgs84_pos# |go http://purl.org/obo/owl/GO# |math http://www.w3.org/2000/10/swap/math# |mesh http://purl.org/commons/record/mesh/ |mf http://www.w3.org/2001/sw/DataAccess/tests/test-manifest# |nci http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl# |obo http://www.geneontology.org/formats/oboInOwl# |owl http://www.w3.org/2002/07/owl# |protseq http://purl.org/science/protein/bysequence/ |rdf http://www.w3.org/1999/02/22-rdf-syntax-ns# |rdfdf http://www.openlinksw.com/virtrdf-data-formats# |rdfs http://www.w3.org/2000/01/rdf-schema# |sc http://purl.org/science/owl/sciencecommons/ |scovo http://purl.org/NET/scovo# |skos http://www.w3.org/2004/02/skos/core# |sql sql: |vcard http://www.w3.org/2001/vcard-rdf/3.0# |virtrdf http://www.openlinksw.com/schemas/virtrdf# |void http://rdfs.org/ns/void# |xf http://www.w3.org/2004/07/xpath-functions |xml http://www.w3.org/XML/1998/namespace |xsd http://www.w3.org/2001/XMLSchema# |xsl10 http://www.w3.org/XSL/Transform/1.0 |xsl1999 http://www.w3.org/1999/XSL/Transform |xslwd http://www.w3.org/TR/WD-xsl |yago http://dbpedia.org/class/yago/ +---------- exit. </verbatim> ---+++Connection to RDF4J or Sesame HTTP repository from Console repository The RDF4J or Sesame Console repository can connect to a RDF4J or Sesame HTTP repository and vice-versa, enabling access to remote RDF4J or Sesame HTTP repositories from a local server. 1 The RDF4J or Sesame Console repository can connect to a RDF4J or Sesame HTTP repository and query it as if local using the "connect" command. <verbatim> $ sh console.sh SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/Users/myuser/openrdf-sesame-2.3.1/lib/logback-classic-0.9.18.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/Users/myuser/openrdf-sesame-2.3.1/lib/slf4j-jdk14-1.5.10.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 10:32:38.317 [main] DEBUG info.aduna.platform.PlatformFactory - os.name <http://os.name> <http://os.name> = mac os x 10:32:38.351 [main] DEBUG info.aduna.platform.PlatformFactory - Detected Mac OS X platform Connected to default data directory Commands end with '.' at the end of a line Type 'help.' for help > connect http://localhost:8080/openrdf-sesame. Connected to http://localhost:8080/openrdf-sesame > show r. +---------- |SYSTEM ("System configuration repository") |VirtSesRep ("Virtuoso Sesame HTTP Repository") +---------- > open VirtSesRep. Opened repository 'VirtSesRep' VirtSesRep> sparql select * from <http://localhost:8890/Northwind> where {?s ?p ?o} Limit 10. Evaluating query... +------------------------+------------------------+------------------------+ | s | p | o | +------------------------+------------------------+------------------------+ | <http://localhost:8890/Northwind/CustomerContact/ALFKI#this>| rdf:type | foaf:Person | | <http://localhost:8890/Northwind/CustomerContact/ALFKI#this>| rdf:type | northwind:CustomerContact| | <http://localhost:8890/Northwind/CustomerContact/ALFKI#this>| opl:isDescribedUsing | northwind: | | <http://localhost:8890/Northwind/CustomerContact/ANATR#this>| rdf:type | foaf:Person | | <http://localhost:8890/Northwind/CustomerContact/ANATR#this>| rdf:type | northwind:CustomerContact| | <http://localhost:8890/Northwind/CustomerContact/ANATR#this>| opl:isDescribedUsing | northwind: | | <http://localhost:8890/Northwind/CustomerContact/ANTON#this>| rdf:type | foaf:Person | | <http://localhost:8890/Northwind/CustomerContact/ANTON#this>| rdf:type | northwind:CustomerContact| | <http://localhost:8890/Northwind/CustomerContact/ANTON#this>| opl:isDescribedUsing | northwind: | | <http://localhost:8890/Northwind/CustomerContact/AROUT#this>| rdf:type | foaf:Person | +------------------------+------------------------+------------------------+ 10 result(s) (530 ms) VirtSesRep> show n. +---------- |SearchResults http://www.zillow.com/static/xsd/SearchResults.xsd |UpdatedPropertyDetails http://www.zillow.com/static/xsd/UpdatedPropertyDetails.xsd |a http://www.w3.org/2005/Atom |aapi http://rdf.alchemyapi.com/rdf/v1/s/aapi-schema# |address http://schemas.talis.com/2005/address/schema# |admin http://webns.net/mvcb/ |amz http://webservices.amazon.com/AWSECommerceService/2005-10-05 |atom http://atomowl.org/ontologies/atomrdf# |audio http://purl.org/media/audio# |awol http://bblfish.net/work/atom-owl/2006-06-06/# |aws http://soap.amazon.com/ |b3s http://b3s.openlinksw.com/ </verbatim> 1 Conversely the RDF4J or Sesame HTTP repository can be configured to access the repository created by the RDF4J or Sesame console. To do this the location of the data directory for both needs to be reconfigured using the Java system property info.aduna.platform.appdata.basedir (does not include RDF4J or Sesame console directory) to point to the same location. When you are using Tomcat as the servlet container then you can set this property using the JAVA_OPTS parameter. Note, if you are using Apache Tomcat as a Windows Service you should use the Windows Services configuration tool to set this property. Other users can either edit the Tomcat startup script or set the property some other way. <verbatim> * set JAVA_OPTS=-Dinfo.aduna.platform.appdata.basedir=\path\to\other\dir\ (on Windows) * export JAVA_OPTS='-Dinfo.aduna.platform.appdata.basedir=/path/to/other/dir/' (on Linux/UNIX/Mac OS X) </verbatim> <img src="%ATTACHURLPATH%/VirtSesame2HttpRepository01.png" style="wikiautogen"/> %BR% ---+++ Remote RDF4J or Sesame HTTP Repository Connections There are two methods of making a remote RDF4J or Sesame HTTP connection to a Virtuoso repository: * <b>RDF4J or Sesame Remote Repository Manager</b> class - A manager for Repositories that reside on a remote server, allowing one to access repositories over HTTP similar to how local repositories are accessed using the LocalRepositoryManager. A connection via this method is made via the Virtuoso RDF4J or Sesame provider which will be faster and provide better support for transactions, than making a direct connection to the SPARQL endpoint using the HTTP Repository class. This is analogous to the ODBC Driver Manager in the ODBC realm for generic access to a data store via a suitable ODBC Driver. * <b>RDF4J or Sesame HTTP Repository</b> class - A repository that serves as a proxy for a remote repository on a RDF4J or Sesame server or directly to a SPARQL endpoint. This method does not make use of the Virtuoso RDF4J or Sesame Provider, using instead the HTTP protocol to make requests directly RDF4J or Sesame server or other SPARQL endpoint. ---++++ Using the RDF4J or Sesame Remote Repository Manager class If a RDF4J or Sesame HTTP Repository endpoint, as detailed above already exists, the [[http://docs.rdf4j.org/server-workbench-console/#_http_repository_configuration][Remote Repository Manager class]] can be used to make a remote connection as follows by specify the URL to the remote RDF4J or Sesame HTTP Server and the <nop>RepositoryID for the repository the connection is to be made to: <verbatim> //Initialize Remote Repository Manager RepositoryManager repositoryManager = new RemoteRepositoryManager( "http://hostname:portno/openrdf-sesame" ); repositoryManager.initialize(); //Set Virtuoso (or any other) repositoryID on http://hostname:portno/openrdf-sesame Repository repository = repositoryManager.getRepository("RepositoryID"); // Open a connection to this repository con = repository.getConnection(); // ... do something </verbatim> ---++++ Using the RDF4J or Sesame HTTP Repository class A direct connection to the default built-in Virtuoso SPARQL Endpoint can be made using the [[http://docs.rdf4j.org/server-workbench-console/#_rdf4j_console][RDF4J or Sesame HTTP Repository class]] by simply specifying the URL to the Virtuoso SPARQL Endpoint i.e. <code>http://{host}:{port}/sparql</code> as follows: <verbatim> // Initialize Direct SPARQL Endpoint HTTP Repository connection String endpointURL = "http://hostname:portno/sparql"; HTTPRepository sparqlEndpoint = new HTTPRepository(endpointURL, ""); sparqlEndpoint.initialize(); // Open a connection to this repository con = sparqlEndpoint.getConnection(); // ... do something </verbatim> ---++Related * [[VirtSesame2Provider][Virtuoso RDF4J and Sesame Provider]]
sioc:id
46f3f0a380ecdec1342292f7ceaccf0e
sioc:link
n2:VirtSesame2HttpRepository
sioc:has_container
n9:VOS
n11:has_services
n10:item
atom:title
VirtSesame2HttpRepository
sioc:links_to
n12:chapter-datadir-config n13:_http_repository_configuration n13:_rdf4j_console n14:section-console-repository-creation n15:rdf4j-workbench n15:openrdf-workbench n17: n20:html n15:rdf4j-server n21:cgi n24: n25:jsp n26:LocalRepositoryManager n27: n30:ttl n32:ttl n35:xsl n36:xsl n39:xsl n40:xsl n42:jar n44:jar n48:jar
atom:source
n9:VOS
atom:author
n8:this
atom:published
2018-04-13T12:07:50Z
atom:updated
2018-05-16T09:53:27Z
sioc:topic
n9:VOS
Subject Item
n2:VOSIndex
sioc:links_to
n2:VirtSesame2HttpRepository