Data Cube Builder is a tool for transformation of data sources in non RDF formats to RDF Data Cube.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

OGI tools "Linux syntax"

Cloning OGI tools

$git clone ogi-cubebuilder

//You may need to install git -> $sudo apt-get install git

$sudo chmod 777 -R ogi

$cd ogi-cubebuilder/

$git checkout test

Download and Run Fuseki Server

Use instructions at: 

(just change the tar.gz locations to):

$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 (add fuseki port of your choice) // to be deleted when json cube API works

Download tarql service as library

$cd {base.dir}/ogi-cubebuilder/src/main/resources/lib/

$wget --no-check-certificate '' -O tarql-1.0a.jar

$wget --no-check-certificate '' -O tarql-1.0a-javadoc.jar

$cd {base.dir}/ogi-cubebuilder/ 

$mvn install:install-file -Dfile=src/main/resources/lib/tarql-1.0a.jar -DgroupId=org.deri.tarql -DartifactId=tarql -Dversion=1.0a -Dpackaging=jar

$mvn install:install-file -Dfile=src/main/resources/lib/tarql-1.0a-javadoc.jar -DgroupId=org.deri.tarql -DartifactId=tarqldoc -Dversion=1.0a -Dpackaging=jar

$mvn clean install

Clone, Configure, build and run jsonCubeAPI service

$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

OGI Desktop UI

1- Run OGI UI:

$cd {base.dir}/ogi

$mvn exec:java -Dexec.args="--run:desktop"

OGI Command Line UI

2- Run OGI CMD:

$cd {base.dir}/ogi-cubebuilder

$mvn exec:java -Dexec.args="--run:cmd -csv:/../../??.csv -schema:?? -format:?? -qb:/../../??.ttl -qbN:??"

- Usage: OGI EU [options]
    --csvFilePath, -csv
       CSV input file Location and name
    --dimOrMeasures, -l
       Customized Dim and Measures are Not Available at this stage
    --help, -help, -h
       Default: false
    --marineDatasetName, -schema
       Data Set Schema Currently Supporting (IWaveBNetwork30Min, IMI_EATL_WAVE,
       IrishNationalTideGaugeNetwork and IWBNetwork)
    --qbFileName, -qbN
       Cube output file Location and name
    --qbPath, -qb
       Cube output file Location and name
    --run, -r
       Which main class to Run!
    --serialization, -format
       Output Cube RDF serlization format (turtle or ntriples)
       Default: turtle

OGI Web Service API

3- Run OGI Web Service API:

$cd {base.dir}/ogi-cubebuilder

$mvn exec:java -Dexec.args="--run:webservice"

Available gates:

> curl http://localhost:4567/

cube builder:

> curl http://localhost:4567/cubeBuilderAPI/cubeBuilderArgs?csv=inputFileNameAndLocation&schema=marineInstituteDatasetId&serialization=turtle&qbPath=outputFileLocation&qbName=outputFileName

listing available cubes

> curl http://localhost:4567/cubeQueryingAPI/listLqbs?limit=numberOfRetrievedRecords

retrieve cube metadata

> curl http://localhost:4567/cubeQueryingAPI/LqbMeta?dsuri=marineInstituteDatasetURI

retrieve data of certain cube

>curl http://localhost:4567/cubeQueryingAPI/listdataofLqb?dsuri=marineInstituteDatasetURI&limit=numberOfRetrievedRecords

sparql endpoint

>curl http://localhost:4567/cubeQueryingAPI/cubeQueryingArgs?query=sparqlQueryToExecuteAgainstLinkedCubeSpace


Download example csv file

$cd {base.dir}/ogi-cubebuilder/src/main/resources/

$mkdir data output

$cd {base.dir}/ogi-cubebuilder/src/main/resources/data

$wget --no-check-certificate '' -O IWBNetwork.csv

$cd {base.dir}/ogi-cubebuilder/

Build Linked Cube

A- Using Command Line UI
	$mvn exec:java -Dexec.args="-run:cmd -csv:src/main/resources/data/IWBNetwork.csv -schema:IWBNetwork -format:turtle -qb:src/main/resources/output/ -qbN:IWBNetwork.ttl"

B- Using Web Service API

	$mvn exec:java -Dexec.args="-run:webservice"

From web browser:

> http://localhost:4567/cubeBuilderAPI/cubeBuilderArgs?csv=src/main/resources/data/IWBNetwork.csv&schema=IWBNetwork&serialization=turtle&qbPath=src/main/resources/output/&qbName=IWBNetwork.ttl

Load Linked Cube to Running fuseki server from cmd

$cd {fuseki.dir}

$wget --no-check-certificate ''-O IWBNetwork.ttl

$./s-put http://localhost:8080/ds/data default IWBNetwork.ttl

in case java 8 is not installed

incase mvn 3.3.9 not installed