$git clone https://gitlab.insight-centre.org/egov/ogi-tools.git ogi-cubebuilder
//You may need to install git -> $sudo apt-get install git
$sudo chmod 777 -R ogi
$cd ogi-cubebuilder/
$git checkout test
Use instructions at:
> https://jstirnaman.wordpress.com/2013/10/11/installing-fuseki-with-jena-and-tdb-on-os-x/
(just change the tar.gz locations to):
(1) https://archive.apache.org/dist/jena/binaries/apache-jena-2.11.0.tar.gz
(2) https://archive.apache.org/dist/jena/binaries/jena-fuseki-1.0.0-distribution.tar.gz
$mkdir {user.dir}/jena-fuseki-1.0.0/LinkedcubeSpace
$sudo screen -S cubeserver ./fuseki-server --port=8080 --update --loc=LinkedcubeSpace /ds
$curl http://localhost:8080
$cd ogi-cubebuilder/src/main/resources/
$nano config.properties (add fuseki port of your choice) // to be deleted when json cube API works
$mkdir {base.dir}/ogi-cubebuilder/lib/
$cd {base.dir}/ogi-cubebuilder/lib/
$wget --no-check-certificate 'https://github.com/opencube-toolkit/tarql-component/raw/master/lib/extensions/tarql-1.0a.jar' -O tarql-1.0a.jar
OR
$curl -L -o tarql-1.0a.jar "https://github.com/opencube-toolkit/tarql-component/raw/master/lib/extensions/tarql-1.0a.jar"
$wget --no-check-certificate 'https://github.com/opencube-toolkit/tarql-component/raw/master/lib/extensions/tarql-1.0a-javadoc.jar' -O tarql-1.0a-javadoc.jar
OR
$curl -L -o tarql-1.0a-javadoc.jar "https://github.com/opencube-toolkit/tarql-component/raw/master/lib/extensions/tarql-1.0a-javadoc.jar"
$cd {base.dir}/ogi-cubebuilder/
$mvn install:install-file -Dfile=lib/tarql-1.0a.jar -DgroupId=org.deri.tarql -DartifactId=tarql -Dversion=1.0a -Dpackaging=jar
$mvn install:install-file -Dfile=lib/tarql-1.0a-javadoc.jar -DgroupId=org.deri.tarql -DartifactId=tarql-doc -Dversion=1.0a -Dpackaging=jar
$mvn clean install
$cd {base.dir}/
$clone .............................. ogi-api
$cd ogi-api/resources/
$nano config.prop (Set fuseki/SPARQL server URL, ex: http://localhost:8080/ds/query)
$cd ogi-api/
$mvn package
add to tomcat server, or run using jetty server
1- Run OGI UI:
$cd {base.dir}/ogi
$mvn exec:java -Dexec.args="--run:desktop"
2- Run OGI CMD:
$cd {base.dir}/ogi-cubebuilder
$ mvn exec:java -Dexec.args="--run:cmd -csv:~/IWaveBNetwork_spectral.csv -schema:~/IWaveBNetowrk_spectral_output.ttl -qbN:cmdTest.ttl -qbpath:~/Desktop/ -format_in:TURTLE -format_out:TURTLE"
Usage: RDF Data Cube Builder [options]
Options:
--csvFilePath, -csv
CSV input file Location and name
--dataSetSchema, -schema
Data Set Schema
--help, -help, -h
Help
Default: false
--qbFileName_out, -qbN
Cube output file name
--qbFilePath_out, -qbpath
Cube output file Location
--run, -run, -r, -play
Which main class to Run!
--serialization_in, -format_in
Input Cube Schema serlization format (turtle or ntriples)
Default: turtle
--serialization_out, -format_out
Output Cube RDF serlization format (turtle or ntriples)
Default: turtle
3- Run OGI Web Service API:
$cd {base.dir}/ogi-cubebuilder
$mvn exec:java -Dexec.args="--run:webservice"
> curl http://localhost:4567/
> curl http://localhost:4567/cubeBuilderAPI/cubeBuilderArgs?csv=inputFileNameAndLocation&schema=marineInstituteDatasetId&serialization=turtle&qbPath=outputFileLocation&qbName=outputFileName
> curl http://localhost:4567/cubeQueryingAPI/listLqbs?limit=numberOfRetrievedRecords
> curl http://localhost:4567/cubeQueryingAPI/LqbMeta?dsuri=marineInstituteDatasetURI
>curl http://localhost:4567/cubeQueryingAPI/listdataofLqb?dsuri=marineInstituteDatasetURI&limit=numberOfRetrievedRecords
>curl http://localhost:4567/cubeQueryingAPI/cubeQueryingArgs?query=sparqlQueryToExecuteAgainstLinkedCubeSpace
$cd {base.dir}/ogi-cubebuilder/src/main/resources/
$mkdir data output
$cd {base.dir}/ogi-cubebuilder/src/main/resources/data
$wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=0B-DxlQVxO6pnNkZwY3k2ZE5NNFE' -O IWBNetwork.csv
$cd {base.dir}/ogi-cubebuilder/
A- Using Command Line UI
$ mvn exec:java -Dexec.args="--run:cmd -csv:~/IWaveBNetwork_spectral.csv -schema:~/IWaveBNetowrk_spectral_output.ttl -qbN:cmdTest.ttl -qbpath:~/Desktop/ -format_in:TURTLE -format_out:TURTLE"
B- Using Web Service API
$mvn exec:java -Dexec.args="-run:webservice"
From web browser:
> http://localhost:4567/cubeBuilderAPI/cubeBuilderArgs?csv=/ogi-CubeSchema-creator/example_1/IWaveBNetwork_spectral.csv&schema=/ogi-cubebuilder/src/main/resources/IWaveBNetowrk_spectral_output.ttl&serializationIn=TURTLE&serializationOut=TURTLE&qbPath=/ogi-cubebuilder/test_output/&qbName=webtest.ttl
$cd {fuseki.dir}
$wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=0B-DxlQVxO6pnVjluN1FQa09aams'-O IWBNetwork.ttl
$./s-put http://localhost:8080/ds/data default IWBNetwork.ttl
http://www.tecmint.com/install-java-jdk-jre-in-linux/
https://javedmandary.blogspot.ie/2016/09/install-maven-339-on-ubuntu.html
Cube Builder Desktop UI
Cube Builder CMD
10 May 2017