Skip to content

Commit

Permalink
Update README.md to use the new CLI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
hartig authored Sep 27, 2024
1 parent bbab817 commit fb29d43
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions hefquin-pgconnector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
This module of the HeFQUIN code base contains the code for HeFQUIN to connect to Property Graph data sources. In particular, this module provides the functionality to run SPARQL-star queries over user-configurable RDF-star views of Property Graphs by translating these queries into openCypher queries which, then, are sent directly to a Property Graph store (we only support Neo4j at the moment).

Based on this module, HeFQUIN also provides two extra command-line programs:
* [**RunBGPOverNeo4j**](#run-the-runbgpoverneo4j-program) provides the SPARQL-star query functionality for Property Graphs as a standalone tool, and
* [**MaterializeRDFViewOfLPG**](#run-the-materializerdfviewoflpg-program) can be used to convert the Property Graphs into an RDF-star graphs by materializing the RDF-star views that are otherwise considered only as virtual views by the query functionality.
* [**hefquin-pg**](#run-the-hefquin-pg-program) provides the SPARQL-star query functionality for Property Graphs as a standalone tool, and
* [**hefquin-pgmat**](#run-the-hefquin-pgmat-program) can be used to convert the Property Graphs into an RDF-star graphs by materializing the RDF-star views that are otherwise considered only as virtual views by the query functionality.

While documenting the query-translation functionality implemented by this module is still work in progress, the (user-configurable) Property Graph to RDF-star mapping that defines the RDF-star views is described in the [next section](#user-configurable-mapping-of-property-graphs-to-rdf-star-graphs), followed by a [description of the two command-line programs](#command-line-programs).

Expand Down Expand Up @@ -168,30 +168,30 @@ git clone https://github.com/LiUSemWeb/HeFQUIN.git
```
Both of these two commands should give you a sub-directory called `HeFQUIN`. Enter this directory and use Maven to compile the Java source code by running the following command
```
mvn package
mvn clean package
```
Assuming the Maven process completes successfully, you can use the command-line programs provided in this repository as described in the following sections.

### Run the RunBGPOverNeo4j Program
`RunBGPOverNeo4j` provides the query functionality of the HeFQUIN PG Connector module as a standalone tool. Since `RunBGPOverNeo4j` is a Java program, it needs to be run using the Java interpreter (after compiling it [as described above](#compile-the-programs)). The default way to do so is by running the following command,
### Run the `hefquin-pg` Program
`hefquin-pg` provides the query functionality of the HeFQUIN PG Connector module as a standalone tool. Since it is a Unix shell script, it needs to be run in a terminal. The default way to do so is by running the following command (assuming you are in the root directory of your local clone of the HeFQUIN repository),
```
java -cp target/HeFQUIN-0.0.4-SNAPSHOT.jar se.liu.ida.hefquin.cli.RunBGPOverNeo4j --query=query.rq --lpg2rdfconf=LPG2RDF.ttl --endpoint=http://localhost:7474/db/neo4j/tx/commit
bin/hefquin-pg --query=query.rq --lpg2rdfconf=LPG2RDF.ttl --endpoint=http://localhost:7474/db/neo4j/tx/commit
```
where the `--query` argument is used to refer to a file that contains the SPARQL-star query you want execute, the `--lpg2rdfconf` argument refers to an RDF document that provides an RDF-based description of the LPG-to-RDF-star configuration that you want to use for the RDF-star view of your Property Graph (an example of an RDF Turtle file with such a description is provided as part of this repository and, thus, available in your local clone of the repository---see: `ExampleLPG2RDF.ttl`), and the `--endpoint` argument specifies the HTTP address at which your Neo4j instance responds to Cypher queries over your Property Graph.

Further arguments can be used. To see a list of all arguments supported by the program, run the program with the `--help` argument:
```
java -cp target/HeFQUIN-0.0.4-SNAPSHOT.jar se.liu.ida.hefquin.cli.RunBGPOverNeo4j --help
bin/hefquin-pg --help
```

### Run the MaterializeRDFViewOfLPG Program
`MaterializeRDFViewOfLPG` can be used to convert any Property Graph into an RDF-star graph by applying our [user-configurable Property Graph to RDF-star mapping](#user-configurable-mapping-of-property-graphs-to-rdf-star-graphs). As a Java program, it needs to be run using the Java interpreter (after compiling it [as described above](#compile-the-programs)). The default way to do so is by running the following command,
### Run the `hefquin-pgmat` Program
`hefquin-pgmat` can be used to convert any Property Graph into an RDF-star graph by applying our [user-configurable Property Graph to RDF-star mapping](#user-configurable-mapping-of-property-graphs-to-rdf-star-graphs). As a Unix shell script, it needs to be run in a terminal. The default way to do so is by running the following command (assuming you are in the root directory of your local clone of the HeFQUIN repository),
```
java -cp target/HeFQUIN-0.0.4-SNAPSHOT.jar se.liu.ida.hefquin.cli.MaterializeRDFViewOfLPG --lpg2rdfconf=LPG2RDF.ttl --endpoint=http://localhost:7474/db/neo4j/tx/commit
bin/hefquin-pgmat --lpg2rdfconf=LPG2RDF.ttl --endpoint=http://localhost:7474/db/neo4j/tx/commit
```
where the `--lpg2rdfconf` argument refers to an RDF document that provides an RDF-based description of the LPG-to-RDF-star configuration that you want to use for the RDF-star view of your Property Graph (an example of an RDF Turtle file with such a description is provided as part of this repository and, thus, available in your local clone of the repository---see: `ExampleLPG2RDF.ttl`) and the `--endpoint` argument specifies the HTTP address at which your Neo4j instance responds to Cypher queries over your Property Graph.

Further arguments can be used. To see a list of all arguments supported by the program, run the program with the `--help` argument:
```
java -cp target/HeFQUIN-0.0.1-SNAPSHOT.jar se.liu.ida.hefquin.cli.MaterializeRDFViewOfLPG --help
bin/hefquin-pgmat --help
```

0 comments on commit fb29d43

Please sign in to comment.