GraphDB-Workbench

compared with
Current by Desislava Hristova
on Jun 02, 2015 11:34.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (76)

View Page History
!owlim_logo.png|height=88,width=240!
*GraphDB-Workbench*
Semantic Repository for RDF(S) and OWL
\\
\\
\\

*Version 6.0*
*GraphDB-Workbench*
*Version 5.4*
\\
\\
\\
\\
\\
*{_}User Guide{_}*
\\
\\
\\
\\
\\
\\
\\
\\
\\
*Table of Contents*
\\

{toc}

h1. Overview

The GraphDB Workbench is a stand-alone GraphDB server with a built-in web-based administration tool. The user interface is similar to the Sesame Workbench webapp, but with more functionality, most importantly in the area of security and user access roles. Unlike Sesame, where separate server and workbench webapps are deployed, the GraphDB Workbench is a fully functional GraphDB server with a SPARQL endpoint.
The GraphDB Workbench is a our recommended web-based administration tool. The user interface is similar to the Sesame Workbench webapp, but with more functionality. Here are some of the additional features:
* Query monitoring with the possibility to kill a long running query
* Better SPARQL editor based on [http://laurensrietveld.nl/yasgui/]
* Connectors administration(only present in the enterprise edition)

The GraphDB Workbench can be used to create GraphDB repositories, load and export data, execute SPARQL queries and updates, manage user accounts and control user access roles. The user interface is built using the Forest framework which provides syntax highlighting for SPARQL and other benefits.
Of course GraphDB Workbench can be used to create GraphDB repositories, load and export data, execute SPARQL queries and updates. The user interface is built using the Forest framework ready to use, bug free components.

The GraphDB Workbench is distributed in several forms, firstly as an executable 'jar' file so that it can be run without any dependency on Tomcat or any other servlet container/application server. It is also packaged as a 'war' file so that it can be deployed alongside other webapps in a servlet container.
The GraphDB Workbench can be found in the distribution as a separate war file. The war file can be deployed with the startup script in the distribution or deployed in a dedicated application server.


h1. Requirements

Java: JRE 1.67 or higher (JDK 1.67 or higher if using custom rule sets)
Tomcat: Version 7 or higher if deployed as a 'war' file

h1. Contents of the distribution

The GraphDB Workbench is packaged as a separate zip file from the 'standard' GraphDB-SE plus Sesame zip file. The existing means of deploying GraphDB-SE as described in the [installation section for that distribution|OWLIMv54:OWLIM-SE Installation] remains unchanged.

In the GraphDB Workbench zip file are:
* README.txt - helpful hints on how to run the GraphDB Workbench
* startup.sh (.bat) - start up script
* shutdown.sh (.bat) - shutdown script
* owlim-workbench.jar - standalone 'runnable' jar file containing the workbench

h1. Installation, start-up and shutdown

To run the GraphDB Workbench as a standalone server, unzip the distribution zip file and execute the startup.sh/.bat script.
For Mac the command line is:
{noformat}sh startup.sh{noformat}
{code:language=bash}
sh startup.sh
{code}

You can also start the workbench by running the line:
{noformat}java -jar graphdb-workbench.jar{noformat}.
These methods of deployment use the internal [Jetty|http://jetty.codehaus.org/jetty/] server. The GraphDB Workbench is accessed and administered using a Web browser. If located on the same machine, use a URL such as the following (assuming the default port number):

{code:language=bash}
java -jar graphdb-tomcat.jar
{code}

These methods of deployment use an embedded tomcat server which will deploy the war files in sesame_graphdb directory. The GraphDB Workbench is accessed and administered using a web browser. If located on the same machine, use a URL such as the following (assuming the default port number):

{noformat}
http://localhost:8080
{noformat}

To gracefully shutdown the GraphDB Workbench run the shutdown.bat/.sh script if started as a standalone application. If started in a servlet container use the appropriate tools, e.g. with Tomcat then the Tomcat server can be stopped or an individual Web application unloaded using the HTML manager tool.
Shutting down the workbench if you are using the embedded tomcat method can be done with Ctrl-c in the console. If started in a servlet container use the appropriate tools, e.g. with Tomcat then the Tomcat server can be stopped or an individual Web application unloaded using the HTML manager tool.

h1. Login and status if security is enabled

After starting, If you start the workbench with *\-Dsecurity.enabled=true*, the first page presented will be the login page. The default administrator account information is:

{info}
password: *root*
{info}
You are recommended to change the root password as soon as you login for the first time. Go to Admin->Users and choose Edit next to your username. Then change your password. See section [User administration|#GraphDB-Workbench-Useradministration] in the current document.

After logging in, the summary page is displayed that shows: version number, license details, currently selected repository (if any) and user name. If no repository is currently selected then the message 'Please select a repository' is displayed. Click this to get to the repository management page.

h1. Changing password
h1. Index page

You are recommended to change the root password as soon as you login for the first time. Go to ADMIN->USERS and choose Edit next to your username. Then change your password. See section [#User administration] in the current document.
After logging in, the summary page is displayed that shows: version number, license details, currently selected repository (if any) and user name. If no repository is currently selected then the message 'Please select a repository' is displayed. Click this to get to the repository management page.


h1. Invalid GraphDB License

In order to run the GraphDB Workbench application, you need a valid GraphDB license. In case you found out that your license had expired, you have to write to Ontotext for a new one. Once obtained, replace the old license with the new one.
The license file can be found in the graphdb jar file of the graphdb-workbench.jar. Unzip the graphdb-worbench.jar and go to WEB-INF/lib/graphdb-se-SomeVersion.jar. Unzip the owlim jar and replace the license. Create a new owlim jar file and then create a new graphdb-workbench.jar file.
In order to run the GraphDB Workbench application, you need a valid GraphDB license. By default there is an evaluation license included in the distribution but in case you found out that your license had expired, you have to write to Ontotext for a new one. Once obtained, the recommended way of specifying it is with a java system parameter. Just add the following parameter
{note} {code}
To create a jar file on Mac run the command:
{noformat} -Dowlim-license=<path-to-graphdb-license>
jar cf jar-file input-file(s)
{noformat} {code}
where:
- the c option means create;
- the f option indicates that you want the output to go to a file;
- jar-file is the name that you want the resulting JAR file to have.
- the input-file(s) argument is a space-separated list of one or more files that you want to include in your JAR file.
to the java process that is responsible for the workbench deployment(tomcat's setenv.sh file or our startup.sh script). Look at [How to setup graphdb license|https://confluence.ontotext.com/display/GraphDB6/GraphDB+FAQ#GraphDBFAQ-HowdoIsetuplicensefilesforGraphDBSEandGraphDBEnterprise] for other methods.

The newly generated jar file is placed in the current directory. The command also generates a default manifest file for the JAR archive.
{note}

_For setting up license files for GraphDB-SE and_ _GraphDB_ _Enterprise, see_ _[the FAQ section of the OWLIM v.54 documentation |OWLIMv54:OWLIM FAQ#How do I set up license files for GraphDB-SE and GraphDB-Enterprise]_

h1. Managing repositories

The repository management page is accessed using the menu bar ADMIN->Repositories. Admin->Repositories. This will display a list of available repositories and their locations as well as the permissions that the logged on user has for each repository.

h2. Adding a location

Before you add a repository to the application, you have to define the location where you want the repository to be added. To do this, a location must be entered for identifying the GraphDB Workbench instance (or directory on the current machine):
\#From admin-repositories click on "Add Location"
# Enter the URL, user and password for a Sesame location or a local location
If we were unable to detect the sesame server(i.e. it is not deployed in the same application server) you will have to connect to the sesame server manually. To do this:

It is also possible to use the current interface for creating and accessing a repository on another GraphDB Workbench instance (on another machine) or at a different location on the same machine.


# From admin-repositories click on "Add Location"
# Enter the URL to a sesame location
# Optionally specify credentials for the sesame location(user and password)
# Optionally add JMX Connection parameters(url and credentials) - this allows you to monitor the resources on the external location and do query monitoring

{info}

For now there is no possibility to manage the graphdb cluster setup through the workbench even if you add jmx connection parameters


{info}



{note}
The JMX connection url is of the form
{code}
service:jmx:rmi:///jndi/rmi://<ip-address>:<port>/jmxrmi
{code}
and the remote process should be started to allow remote JMX connections. Something like the following should work
{code}
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=<port> -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=<ip-address>
{code}
{note}


It is possible to use the current interface for creating and accessing a repository on another GraphDB Workbench instance (on another machine) or at a different location on the same machine.

!locations.png|border=1,width=781!

h2. Adding a repository

An GraphDB Workbench instance always has at least two repositories: the {{SYSTEM}} repository that holds the Sesame repository configurations and the {{security}} repository that holds user accounts and access rights. They are not visible in the Repositories window.
To create a new repository, click 'add repository'. This will display the configuration page for the new repository where a new, unique ID must be entered. The rest of the parameters are described in the [OWLIM-SE configuration section|OWLIMv54:OWLIM-SE Configuration#Sample Configuration] of the OWLIM v54 documentation.


!Configure_New_Repository.png|border=1,width=781!
!create-repository.png|border=1,width=772,,height=426!

h2. Selecting a repository

A repository can be selected, i.e. made 'current' by clicking the 'connect' button next to a repository. Subsequent import, export and query evaluation functions will operate against this repository.
You can make a repository the default connected repository in the repositories view by clicking the 'connect' button next to a repository


!repositories.png|border=1,width=781!

another way(recommended) is to use the dropdown in the top right corner. This will allow you easily change repository while running queries, importing, exporting data in other views.

 !repository-select-dropdown.png|border=1,width=776,,height=429!



h1. Loading data into a repository

After creating and connecting to a repository the following steps can be used to load data. Note that loading data is a two stage process: the data files are first loaded to the server and from there loaded in to GraphDB:
We provide two ways of importing files in the currently selected repository. Both can be accessed from *Data->Import* menu item in the workbench

# Pick a repository to work with from "Repositories in selected location" list and click "Connect"
# Some text on the top of the screen will say "Current repository is REPOSITORY_NAME, located in LOCATION_PATH"
# To load data use the menu bar DATA->Import and choose a file (.rdf, .n3, .nt, .trig, and .trix) - as each file is selected it is added to the list in this page. The files you want to load should be stored in a folder, called "olwim-impex" in your computer home directory - HOME/owlim-impex. The Max file size is 50.0 MB.
h3. Basic data load

{warning}
The limitation of this method is that it supports files that are smaller than 50.0 MB.
{warning}

Loading data from the *Upload files* tab is a two stage process: the data files are first uploaded to the workbench and from there loaded in to GraphDB:

# Click on *Select files to upload* and browse a file to upload
# After the files have been selected, click "Start Upload" for individual files or "Upload All" to load all of them
# When the upload is finished a "Load Data" button will appear for each successfully uploaded file. Press this to load files individually or use the "Load All" button for multiple files. After loading a message is displayed with a link to the query page.
# When the upload is finished a "Load Data" button will appear for each successfully uploaded file. Press this to load files individually or use the "Load All" button for multiple files. You will be asked to select a method to load your data:
## SPARQL - import the data in the default context without a base url
## Advanced - provides more options for the import process



!upload.png|border=1,width=781!

!load.png|border=1,width=781!

(/) If you want to load a large amount of data, one solution would be to convert the RDF data into a line-based RDF format (e.g. N-triples) and then split it into many smaller files (e.g. using the unix command 'split'). This would allow each file to be uploaded separately using either the console or the workbench application.
h3. Impex method

The impex method allows you to load files with arbitrary size. It has the limitation that the files must be put(symbolic links are supported) in a specific directory(by default {{*$\{user.home\}/owlim-impex/*}}. Look at the *impex.dir* system parameter if you want to tweak the directory location. The directory will be scanned recursively and all files with semantic mime type will be visible in the impex tab.

h1. Executing queries

Access the SPARQL pages using the menu bar *SPARQL->Query*. Above the query editing text area а query template can be accessed and selected. Clicking on it will populate the text-area with a SPARQL query that can be edited in place. The query can be freely edited (with syntax highlighting) and namespaces can be added very easily by accessing the list of known namespaces next to the query template.

A check-box is provided that allows the execution of the query over all RDF statements or just explicit statements. Another check-box controls whether equivalent URIs are expanded. This relates to the use of {{owl:sameAs}} and causes the automatic addition of the pseudo-graph {{FROM <}}{{[http://www.ontotext.com/disable-sameAs]}}{{>}} to the query. This is described in the [special query behaviour section of the OWLIM v54 user guide|OWLIMv54:OWLIM-SE Query Behaviour].
{noformat}

!update_query.png|border=1!
!update.png|border=1,width=781!

You can see the result of this an update below above the text-area.

h1. Exporting data
h3. Exporting repository or graphs

From the menu bar select DATA->Export *Data->Export* and the data export page will provide options for exporting the whole repository (in several different formats) or specific named graphs (in the same variety of formats). Just click the appropriate format and the download will begin:

! \!
!export.png|border=1,width=781!

h3. Exporting query results

SPARQL query results can be exported to JSON, XML, CSV, or TSV from the query results page:

!sparql-results-save.png|border=1,width=781!
h1. User administration

{info}

The user administration is disabled by default. If you want to enable it, run the workbench with *\-Dsecurity.enabled=true*


{info}


User management is accessed from the menu bar ADMIN->Users. This page displays a list of users and the number of repositories they have access to. It is also possible to disable security for the entire GraphDB Workbench instance by clicking the 'disable/enable' button, i.e. all users (even anonymous ones) have read/write access to all repositories.

Clicking 'create new user' or 'edit' allows a user's properties to be edited.

!edit_user.png|border=1!
!users.png|border=1,width=781!

This includes setting their role and the read/write permission to each repository. The password can also be changed here. ANd there is also an option to delete a user.