!owlim_logo.png|height=88,width=240!
Semantic Repository for RDF(S) and OWL
\\
\\
\\
*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 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.
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.
h1. Requirements
Java: JRE 1.6 or higher (JDK 1.6 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}
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):
{noformat}
http://localhost:8080
{noformat}
When deployed as a 'war' file, the procedure is the same as deploying any other Web application, i.e. the {{graphdb-workbench-x.y.z.war}} file must be copied to the servlet container's {{webapps}} directory. In order to access the GraphDB Workbench use a browser with a URL similar to the following:
{noformat}
http://localhost:8080/graphdb-workbench-webapp-x.y
{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.
h1. Login and status
After starting, the first page presented will be the login page. The default administrator account information is:
{info}
username: *admin*
password: *root*
{info}
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
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.
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.
{note}
To create a jar file on Mac run the command:
{noformat}
jar cf jar-file input-file(s)
{noformat}
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.
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. 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
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.
!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!
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.
!repositories.png|border=1,width=781!
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:
# 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.
# 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.
!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.
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].
The query is executed by clicking the 'Submit' button, where the results are presented in the results page.
h1. Results page
The results page will show the response for your query:
!sparql-results.png|border=1,width=781!
From the results page it is possible to download results as JSON, XML, CSV, or TSV. It is also possible to provide an alternative view of query results by 'viewing as exhibit'. This allows the results to be sorted on each column and provides a summary of values found in each column.
h1. Executing updates
SPARQL updates can be executed from the update page by accessing the menu bar SPARQL->Update. This behaves in a similar way to the query page, except that different templates are available for inserting and deleting statements, as well as loading and dropping named graphs. After executing an update the page is updated with a message about the success of the update, but no results page is shown.
Also similar to the query page, namespaces can easily be added to the query by accessing the list of known namespaces from the list about the text-area.
Example: deleting all triples from the default graph. Copy the following statement and run it from the update page:
{noformat}
DELETE { ?s ?p ?o }
WHERE { ?s ?p ?o }
{noformat}
!update_query.png|border=1!
You can see the result of this update below the text-area.
h1. Exporting data
Data can be exported in several ways and formats.
h3. Exporting repository or graphs
From the menu bar select 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
SPRQL query results can be exported to JSON, XML, CSV, or TSV from the query results page:
!sparql-results-save.png|border=1,width=781!
h3. Exporting resources
From the resource description page, it is possible to export the RDF triples that make up the resource description to JSON, JSON-LD, RDF-XML, N3/Turtle and N-Triples:
!resource.png|border=1,width=781!
h1. Adding new resource
To add new resource to the repository go to DATA->Add new resource. It opens a window, where you write the URI of this new resource. Then you can add, change or delete the properties of this new resource.
!resource-new.png|border=1,width=781!
!resource-add-property.png|border=1,width=781!
!resource-edit.png|border=1,width=781!
!resource-trig.png|border=1,width=781!
When you are ready you save the new resource to the repository.
h1. Changing a resource
You can also change the properties of an already stored resource. Click on the Edit button next to the resource namespace. Then you can add, change or delete the properties of this resource.
!Screen Shot 2014-05-23 at 13.40.39.png|border=1,width=781!
(!) Note that you can not change or delete the inferred statements. For more information, see the [FAQ section|OWLIMv54:OWLIM FAQ#Why can't I delete some statements?] of the GraphDB v54 documentation.
!Screen Shot 2014-05-23 at 13.43.09.png|border=1,width=781!
h1. User administration
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.
!User_administration.png|border=1,width=781!
Clicking 'create new user' or 'edit' allows a user's properties to be edited.
!edit_user.png|border=1!
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.
User Roles are:
* User - user that can read and write according to his permissions for each repository.
* Admin - user with full access including creating, editing, deleting users.
* Information Extraction Expert - user with access only to add new resource page.
* Search Configuration Expert - user user with full access, except for Repositories and Users management.
!Create_user.png|border=1,width=781!
h1. Configuration
In addition to the standard GraphDB command line parameters, the GraphDB Workbench can be controlled with additional parameters as follows. These should be of this form {{\-Dparam=value}}
|| Parameter || Default || Description ||
| app.cors.enable | false | enable cross-origin resource sharing |
| app.info | true | control the display of build date and revision |
| app.maxConnections | 15 | set the maximum number of concurrent connections to an owlim instance |
| impex.dir | $\{user.home\}/owlim-impex/ | change the location of the file import folder |
| jetty.port | 8080 | set the jetty port |
| repo.data | <none> | connect to the specified location for repositories |
| resource.language | 'en' (English) | set the default language with which to filter results displayed in resource exploration |
| resource.limit | 100 | set the limit for the number of statements displayed in the resource view page |
| security.enabled | true | enable/disable security |
| sparql.limit | 100 | set the limit for the number of rows of SPARQL query results displayed in the query results page |
| sparql.equivalence | false | enable result expansion over equivalent URIs for SPARQL queries when using the query page |
Semantic Repository for RDF(S) and OWL
\\
\\
\\
*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 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.
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.
h1. Requirements
Java: JRE 1.6 or higher (JDK 1.6 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}
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):
{noformat}
http://localhost:8080
{noformat}
When deployed as a 'war' file, the procedure is the same as deploying any other Web application, i.e. the {{graphdb-workbench-x.y.z.war}} file must be copied to the servlet container's {{webapps}} directory. In order to access the GraphDB Workbench use a browser with a URL similar to the following:
{noformat}
http://localhost:8080/graphdb-workbench-webapp-x.y
{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.
h1. Login and status
After starting, the first page presented will be the login page. The default administrator account information is:
{info}
username: *admin*
password: *root*
{info}
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
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.
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.
{note}
To create a jar file on Mac run the command:
{noformat}
jar cf jar-file input-file(s)
{noformat}
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.
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. 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
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.
!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!
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.
!repositories.png|border=1,width=781!
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:
# 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.
# 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.
!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.
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].
The query is executed by clicking the 'Submit' button, where the results are presented in the results page.
h1. Results page
The results page will show the response for your query:
!sparql-results.png|border=1,width=781!
From the results page it is possible to download results as JSON, XML, CSV, or TSV. It is also possible to provide an alternative view of query results by 'viewing as exhibit'. This allows the results to be sorted on each column and provides a summary of values found in each column.
h1. Executing updates
SPARQL updates can be executed from the update page by accessing the menu bar SPARQL->Update. This behaves in a similar way to the query page, except that different templates are available for inserting and deleting statements, as well as loading and dropping named graphs. After executing an update the page is updated with a message about the success of the update, but no results page is shown.
Also similar to the query page, namespaces can easily be added to the query by accessing the list of known namespaces from the list about the text-area.
Example: deleting all triples from the default graph. Copy the following statement and run it from the update page:
{noformat}
DELETE { ?s ?p ?o }
WHERE { ?s ?p ?o }
{noformat}
!update_query.png|border=1!
You can see the result of this update below the text-area.
h1. Exporting data
Data can be exported in several ways and formats.
h3. Exporting repository or graphs
From the menu bar select 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
SPRQL query results can be exported to JSON, XML, CSV, or TSV from the query results page:
!sparql-results-save.png|border=1,width=781!
h3. Exporting resources
From the resource description page, it is possible to export the RDF triples that make up the resource description to JSON, JSON-LD, RDF-XML, N3/Turtle and N-Triples:
!resource.png|border=1,width=781!
h1. Adding new resource
To add new resource to the repository go to DATA->Add new resource. It opens a window, where you write the URI of this new resource. Then you can add, change or delete the properties of this new resource.
!resource-new.png|border=1,width=781!
!resource-add-property.png|border=1,width=781!
!resource-edit.png|border=1,width=781!
!resource-trig.png|border=1,width=781!
When you are ready you save the new resource to the repository.
h1. Changing a resource
You can also change the properties of an already stored resource. Click on the Edit button next to the resource namespace. Then you can add, change or delete the properties of this resource.
!Screen Shot 2014-05-23 at 13.40.39.png|border=1,width=781!
(!) Note that you can not change or delete the inferred statements. For more information, see the [FAQ section|OWLIMv54:OWLIM FAQ#Why can't I delete some statements?] of the GraphDB v54 documentation.
!Screen Shot 2014-05-23 at 13.43.09.png|border=1,width=781!
h1. User administration
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.
!User_administration.png|border=1,width=781!
Clicking 'create new user' or 'edit' allows a user's properties to be edited.
!edit_user.png|border=1!
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.
User Roles are:
* User - user that can read and write according to his permissions for each repository.
* Admin - user with full access including creating, editing, deleting users.
* Information Extraction Expert - user with access only to add new resource page.
* Search Configuration Expert - user user with full access, except for Repositories and Users management.
!Create_user.png|border=1,width=781!
h1. Configuration
In addition to the standard GraphDB command line parameters, the GraphDB Workbench can be controlled with additional parameters as follows. These should be of this form {{\-Dparam=value}}
|| Parameter || Default || Description ||
| app.cors.enable | false | enable cross-origin resource sharing |
| app.info | true | control the display of build date and revision |
| app.maxConnections | 15 | set the maximum number of concurrent connections to an owlim instance |
| impex.dir | $\{user.home\}/owlim-impex/ | change the location of the file import folder |
| jetty.port | 8080 | set the jetty port |
| repo.data | <none> | connect to the specified location for repositories |
| resource.language | 'en' (English) | set the default language with which to filter results displayed in resource exploration |
| resource.limit | 100 | set the limit for the number of statements displayed in the resource view page |
| security.enabled | true | enable/disable security |
| sparql.limit | 100 | set the limit for the number of rows of SPARQL query results displayed in the query results page |
| sparql.equivalence | false | enable result expansion over equivalent URIs for SPARQL queries when using the query page |