BBox Code Cleanup - Nov. 2015
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
output
src
target
.DS_Store
.classpath
.gitignore
.project
Config.ini
README.md
dependency-reduced-pom.xml
pom.xml

README.md

BBox: Knowledge Enriching Module in WiseKB WP6 Pipeline

How to run BBox

  1. Prerequisite: JDK8, Maven, Git

  2. Download BBox

    git clone https://github.com/Seondong/BBox.git
    
  3. Go to the root directory (cd BBox) and edit Config.ini file according to your settings
    You might want to change VIRTUOSO_SERVER, TEST_INPUT_IRI, TEST_OUTPUT_IRI.

  4. For running BBox on your machine, execute this command.

    mvn -U package
    

    then BBOX-0.0.1-SNAPSHOR.jar file will be generated in ./target directory.

  5. Then run the generated .jar file.

    • Run TypeInferenceMain class:
       java -cp target/BBOX-0.0.1-SNAPSHOT.jar kr.ac.kaist.dm.BBox.TypeInference.TypeInferenceMain
      
    • You can put arguments rather than changing Config.ini
      • args = VirtuosoServerIP:port INPUT_IRI OUTPUT_IRI OUTPUT_FileName VirtuosoID VirtuosoPW
      • or args = VirtuosoServerIP:port INPUT_IRI OUTPUT_IRI OUTPUT_FileName
       java -cp target/BBOX-0.0.1-SNAPSHOT.jar kr.ac.kaist.dm.BBox.TypeInference.TypeInferenceMain dmserver5.kaist.ac.kr:4004 http://wp62015sample2.kaist.ac.kr http://wp62015sample2typerest42.kaist.ac.kr wp6sampletype.ttl dba dba
      
  6. You can find intermediate TTL file in OUTPUT_FILE_PATH (check yours in Config.ini) and TEST_OUTPUT_IRI in VIRTUOSO_SERVER. For your information, if your VIRTUOSO_SERVER information is as follows: jdbc:virtuoso://dmserver5.kaist.ac.kr:4004/charset=UTF-8/log_enable=2, connect to the corresponding endpoint and put your TEST_OUTPUT_IRI in the Graph IRI.

Run your own webservice & RESTful Service

  1. Prerequisite += tomcat

  2. Download BBox and check 'Rest2015' branch

    git clone https://github.com/Seondong/BBox.git
    cd BBox
    git checkout origin/Rest2015
    git checkout -b Rest2015
    
  3. Go to the root directory (cd BBox) and edit Config.ini file according to your settings
    You might want to change VIRTUOSO_SERVER, TEST_INPUT_IRI, TEST_OUTPUT_IRI.

  4. Build with maven and execute .jar file - This .jar file is packaged by Spring Then this web application will be turned on your tomcat server.

    mvn clean package
    java -jar target/BBOX-0.0.1-SNAPSHOT.jar --server.port=8181
    
  5. In order to test from outside, you can use curl command

    curl -H "Accept: application/json" -H "X-AUTH-TOKEN: XXXX" -X POST -d "[1234,4567,89012]" http://{your-ip-address}:{port}/greeting
    
  6. BBox type inference module can be reached by below curl command if you want to test.

    • As a user, you can put arguments rather than changing Config.ini
      • args = VirtuosoServerIP:port INPUT_IRI OUTPUT_IRI OUTPUT_FileName VirtuosoID VirtuosoPW
      • or args = VirtuosoServerIP:port INPUT_IRI OUTPUT_IRI OUTPUT_FileName
       curl -X POST "http://dmserver5.kaist.ac.kr:8181/BBOX2016?virt_info=dmserver5.kaist.ac.kr:4004&iIRI=http://wp62015sample2.kaist.ac.kr&oIRI=http://wp62015sample2typerest42.kaist.ac.kr&oFile=wp6sampletype.ttl&id=dba&pw=dba"
      
  7. Check the results

    select * where{?s ?p ?o}