Skip to content

Getting started as a contributor

Olaf Hartig edited this page Mar 21, 2023 · 3 revisions

Here is what you have to do to set up your programming environment to work on HeFQUIN.

Create a local clone of the git repo

You can either clone the repo by using the SSH URL:

git clone [email protected]:LiUSemWeb/HeFQUIN.git

Or you use the HTTPS URL:

https://github.com/LiUSemWeb/HeFQUIN.git

Import the HeFQUIN source code as a project in the Eclipse IDE

You can use the Eclipse IDE to work with the HeFQUIN source code. Here is what you have to do to import the source code as a project in Eclipse:

  1. Start Eclipse and create a new workspace.
  2. In the 'File' menu, select 'Import...'.
  3. In the 'Import' dialog that pops up, select as import source 'Maven->Existing Maven Projects'.
  4. An 'Import Maven Projects' dialog pops up. Click on the button 'Browse...' (next to the 'Root Directory' text field).
  5. In the file dialog that pops up now, navigate to the folder into which you have cloned the HeFQUIN git repo and click 'OK'.
  6. Now, back in the 'Import Maven Projects' dialog, the file 'pom.xml' should be selected. Click on 'Finish'.
  7. If you are still in the Welcome screen of Eclipse, click on 'Go to Workbench'.

You should now see HeFQUIN as a project in the 'Project Explorer' window.

In the 'Project Explorer', navigate to the file src/main/java/se/liu/ida/hefquin/hello.java and right-click on it. In the pop-up menu, open the 'Run As' sub-menu and select 'Java Application'. Now, you should see a "hello" in the 'Console' window.

Build HeFQUIN using Maven

The HeFQUIN source code is a Maven project. Hence, instead of using Eclipse (or any other IDE for Java), you can also compile and build the project using Maven on the command line. To this end, enter the directory into which you have cloned the HeFQUIN git repo. Next, build the project using the following command.

mvn package

Assuming the build process completes without errors, you can now execute the hello world program of HeFQUIN by using the following command.

java -cp target/HeFQUIN-0.0.1-SNAPSHOT.jar se.liu.ida.hefquin.hello

Similarly, you can execute the command line tool for executing queries using HeFQUIN. For instance, to execute the example query of an example federation issue the following command.

java -cp target/HeFQUIN-0.0.1-SNAPSHOT.jar se.liu.ida.hefquin.cli.RunQueryWithoutSrcSel --federationDescription=ExampleFederation.ttl --query=ExampleQuery.rq

Notice the two arguments with which the command line tool is invoked: --federationDescription is used to specify a file that contains an RDF description of the federation to be queried, and --query specifies the file that contains the query to be executed. To see the list of other possible arguments for the command line tool you may execute the tool using the --help argument as follows.

java -cp target/HeFQUIN-0.0.1-SNAPSHOT.jar se.liu.ida.hefquin.cli.RunQueryWithoutSrcSel --help