项目作者: IBM

项目描述 :
Expressive Reasoning Graph Store (ERGS) is an OWL reasoner and an RDF triple store built on top of a Property Graph architecture.
高级语言: Java
项目地址: git://github.com/IBM/expressive-reasoning-graph-store.git
创建时间: 2020-08-20T17:17:29Z
项目社区:https://github.com/IBM/expressive-reasoning-graph-store

开源协议:Apache License 2.0

下载


Expressive Reasoning Graph Store(ERGS)

The Expressive Reasoning Graph Store (ERGS) is an OWL reasoner and an RDF triple store built on top of a Property Graph architecture. ERGS uses Janus Graph as the underlying graph store which can be replaced by any Apache TinkerPop compliant graph store.

The key components and functionality of ERGS include:

  • RDF to Property Graph conversion: allows storing RDF/OWL datasets in a TinkerPop compliant graph store
  • SPARQL to Gremlin converter: allows running SPARQL queries over data stored in a TinkerPop compliant graph store
  • Reasoner: currently, ERGS supports RDFS reasoning and few OWL constructs, with additional constructs coming soon

ERGS aims to offer a unifying graph platform to support a variety of use cases with special focus on:

  • Scalability: Built on top of property graph (JanusGraph)
  • Expressivity: Handles RDFS reasoning + few OWL constructs (More to be added soon)
  • Adaptability: Adopts Open Standards, API based, supporting SPARQL/GREMLIN querying

Architecture

Architecture

ERGS RDF4J repository Server and Workbench

It is J2EE dynamic web project for ingestion and querying RDF data.

Docker build

Prerequisites

  1. Docker: Download and Install Docker from https://www.docker.com
  2. expressive-reasoning-graph-store Project: Download the project

    Steps to Deploy Web Application

  3. In the project expressive-reasoning-graph-store execute the following command for first time build:
    1. docker-compose up -d --build
  4. For later executions execute the following command:
    1. docker-compose up -d
  5. Browse application at http://localhost:8080/rdf4j-workbench
  6. Stop docker by executing the following command:
    1. docker-compose down

    Maven build

    Prerequisites

  7. HBase
    • Download and extract a stable HBase from https://hbase.apache.org/downloads.html (2.1.5 version is tested with JanusGraph 0.4.0.).
    • Go to conf/hbase-env.sh from HBase home folder and set JAVA_HOME to java directory.
    • Create a data directory for HBase.
    • Go to conf/hbase-site.xml from HBase home folder and replace configuration part with following
      1. <configuration>
      2. <property>
      3. <name>hbase.rootdir</name>
      4. <value>file://<path of data directory>/hbase</value>
      5. </property>
      6. <property>
      7. <name>hbase.zookeeper.property.dataDir</name>
      8. <value><path of data directory>/zookeeper</value>
      9. </property>
      10. </configuration>
    • Start HBase by invoking the start-hbase.sh script in the bin directory inside the extracted HBase directory. To stop HBase, use stop-hbase.sh(bin/start-hbase.sh and bin/stop-hbase.sh).
  8. JanusGraph Server
    • Download and extract JanusGraph from https://github.com/JanusGraph/janusgraph/releases/download/v0.4.0/janusgraph-0.4.0-hadoop2.zip.
    • Replace graphs section in <path of JanusGraph directory>/conf/gremlin-server/gremlin-server-configuration.yaml with following
      1. graphs: {
      2. ConfigurationManagementGraph: <Path of expressive-reasoning-graph-store project>/RDF4J/rdf4j-repository/src/main/resources/janusgraph-hbase-configurationgraph.properties
      3. }
    • Start JanusGraph server by issuing the following command from the JanusGraph directory
      ./bin/gremlin-server.sh conf/gremlin-server/gremlin-server-configuration.yaml
  9. Tomcat Server
  10. Download this project.
  11. Update the following properties in system.properties file:
    1. storage.backend=hbase
    2. storage.hostname=localhost
    3. server.hostname=localhost
  12. Execute the following command
    1. mvn install -Dmaven.test.skip=true
    2. mv RDF4J/rdf4j-workbench/target/rdf4j-workbench-0.0.1-SNAPSHOT.war <path to tomcat server>/webapps/rdf4j-workbench.war
    3. mv RDF4J/rdf4j-server/target/rdf4j-server-0.0.1-SNAPSHOT.war <path to tomcat server>/webapps/rdf4j-server.war
  13. Execute the following command to start the tomcat server

    1. ./<path to tomcat server>/bin/startup.sh

    Creating ERGS Repository

    1. Click on “New repository” in the sidebar menu. This brings up the “New Repository” page. You are presented with a simple form that provides a “Type:” selector with several repository types. Select “Expressive Reasoning Graph Store”.
    2. The “ID:” and “Title:” fields are optional in this form. Clicking “Next” brings up a form with more fields specific to the ERGS.
    3. Fill “ID:” and “Title:”, choose configuration(Sample) and Tbox(Sample) file before the “Create” button may be clicked. The configuration file contains following configuration parameters:
    4. input.enableforwardchaining (true/false): enable forward chaining (optional, default is false)
    5. input.commitfrequency: RDF triples commite size (required, default value is 10000 triples)
    6. input.numthreads: degree of parallalism (required, default value is 1 thread)
    7. input.indexprop: list of graph property to be indexed using janusgraph (optional)
    8. input.textindexprop: list of graph property to be indexed using solr in text form (optional)
    9. input.stringindexprop: list of graph property to be indexed using solr in string form (optional)
    10. input.textstringindexprop: list of graph property to be indexed using solr in text-string form (optional)
    11. This will create a new ERGS repository.
      new repo

    Ingesting data into ERGS Repository

    Sample

    1. Using RDF4J Workbench/GUI: Follow the steps
    2. Using RDF4 Server/Rest API: API definition
    3. BulkLoading(with docker): Execute the following command
      1. bash docker/bulkloading/load-data.sh <repository id> <dataset directory> <dataset format> <base uri>
      Permissible dataset format are: ‘rdf’, ‘turtle’, ‘ntriples’, ‘n3’.

    It uses docker/bulkloading/bulkload.properties for ingestion.The configuration file contains following configuration parameters:

    1. input.enableforwardchaining (true/false): enable forward chaining (optional, default is false)
    2. input.commitfrequency: RDF triples commite size (required, default value is 10000 triples)
    3. input.numthreads: degree of parallalism (required, default value is 1 thread)
    4. input.indexprop: list of graph property to be indexed using janusgraph (optional)
    5. input.textindexprop: list of graph property to be indexed using solr in text form (optional)
    6. input.stringindexprop: list of graph property to be indexed using solr in string form (optional)
    7. input.textstringindexprop: list of graph property to be indexed using solr in text-string form (optional) Note: We strongly recommend of using Bulkloading for ingesting large data.

      Querying ERGS Repository

      Sample
    8. Using RDF4J Workbench/GUI: Follow the steps
    9. Using RDF4 Server/Rest API: API definition

    References

    1. JanusGraph
    2. RDF4J
    3. Apache Jena
    4. OWL API
    5. JFact
    6. Quetzal