====== Jene Fuseki ====== ===== - JENA Database ===== ==== - Installation ==== Follow this link to install Jena/Fuseki server: https://jena.apache.org/documentation/fuseki2/#getting-started-with-fuseki * Unpack apache-jena-fuseki to, e.g., /opt/apache-jena-fuseki-3.4.0. * Configuration of fuseki server is done with /etc/default/fuseki (see fuseki init.d script). Create config file in /etc/default/fuseki USEKI_HOME=/opt/apache-jena-fuseki-3.4.0 FUSEKI_BASE=/opt/apache-jena-fuseki-3.4.0/run * Run fuseki-server once to generate ./run folder. * Copy init.d script 'fuseki' to /etc/init.d/fuseki * Notice security configuration, which restricts fuseki service to localhost by default so ui on server does not work): https://jena.apache.org/documentation/fuseki2/fuseki-security.html. Edit run/shiro.ini to allow any access, uncomment: /$/** = anon * Start fuseki /etc/init.d/fuseki start Check futher fuseki configuration guide https://jena.apache.org/documentation/fuseki2/fuseki-configuration.html ==== - Usage ==== * Fuseki UI can be open at http://localhost:3030/ * Create a new dataset "servicedirectory" (using tbd2??? testme). A new dataset conf is generated run/configuration/servicedirectory.ttl. Data can be grouped into differen **dataset**. The dataset is further devided into **graph**. These two parameters are required for querying Jena database. * Dataset: datasets can be add/removed using fuseki's "manage datasets". Each dataset is associated with a set of query urls (services), allowing operations on the dataset. The operations are listed on dataset's info tab, e.g., http://localhost:3030/servicedirectory/query is the SPARQL URL for ''servicedirectory'' dataset. * Graph: data in dataset is grouped by graph. In ''edit tab'', list of graph can be showed. Graph name is given as part of query information. If now graph is specified, default graph will be used, e.g., SELECT ?x ?p ?o WHERE { GRAPH { <--- this is it! ?x ?p ?o } } * Clear All graph change query url to http quads, then: CLEAR ALL ==== - Importing existing OWL data to Jena ==== Data can be added to Jena using fuseki queries. Additionally, bulk records available in .owl files can be easily imported using Fuseki upload URL or WebUI. In ''upload files'' tab, we can select .owl files and the **destination graph** name to import owl records. This sample project upload data using Fuseki API and also generate .owl for manual import. git@gitlab.dai-labor.de:isco/isco-demo.git (develop) We first import the owl files contained in iscoServices/src/main/resources/{services, services-1.2} ==== - More query samples ==== * https://gitlab.dai-labor.de/isco/api/wikis/Sparql-Example-Playground * http://filteredpush.sourceforge.net/pages/fuseki.html