Contributors: Rémi Venant, Sana Syeda, Mathieu d'Aquin (@mdaquin)
This repository provides:
- the application 'afelTraces2rdf' to transform the heterogenous log files of the 2nd evaluation into a unique consistant RDF file,
- a docker-compose file to manage a Jena-Fuseki container,
- the different jupyter files of the analysis.
This respository is structed as follow:
- afelTraces2rdf: the python application sources
- resources: contains raw traces, the RDF AFEL vocabulary extension and the different RDF models schema
- docker-compose.yml: the docker-compose file to manage the Jena-Fuseki server
- requirements.txt: the python package requirement for the afelTraces2rdf application
- README.md: this file
The afelTraces2rdf application relies on the following softwares:
- python >= 3.6
- pip
The required packages for the application are listed in the requirements.txt file. An automatic installation of the packages can be achieved by the following command, to be executed within the repository folder:
pip install -r requirements.txt
Working with a virtual environment is recommended.
The Jena-Fuseki docker-compose file relies on the following softwares:
- docker
- docker-compose >= 3.2 (usually shipped with docker)
The RDF tree relies on the 3 specific ontologies:
- http://vocab.afel-project.eu/
- http://vocab.afel-project.eu/extension/ (available in the repository in the resources folder)
- http://schema.org/
The models of the RDF definitions used for the traces can be found in the resources/schema directory.
The afelTraces2rdf application can be launched from a terminal. Inside the repository folder, one can run the following command:
python -m afelTraces2rdf.migrator path/to/my_outputfile.ttl
The different options proposed by the application can be obtain using the --help parameter.
The server relies on docker-compose. To launch it, execute the following command in a terminal, within the repository folder:
docker-compose up
To shut down the container, execute the following command from the same folder:
docker-compose down
Once launcher, one can access the server with any browser, at the adress http://localhost:3030. The default "username"/"password" are "admin"/"afelpwd".
The container is configured to manage persistence across different runs of the container. However at first launch, it needs to be populated with the RDF file generated previously. Once the server is launcher, it can be accessed with a browser using the url http://localhost:3030. To populate the server, follow the several steps:
- go to manage datasets;
- choose add new dataset;
- choose a name and set its type as persistent;
- once created, choose upload data;
- leave the destination graph name empty;
- select the file previously generated.
You can easily manage datasets through the web interface offered by Fuseki. However, please note that when you want to re-create a persistent dataset, you should strictly follow these steps:
- remove the dataset;
- create a new dataset with an other name;
- upload triples to the new dataset.
It appears that when a persistent dataset is destroyed, all the related data are not removed immediately. If a new dataset with the same name is created right after, these data may be attached to it, and not be destroyed as requested.
Once down, a docker volume is kept for persitence management. To remove it, execute the following command (be sure that the container has been shut down previously):
docker volume rm afel_evaluation2_fusekidata
The following request lists all urls of artifacts viewed by the user 'project.afel+002'
PREFIX afl: <http://vocab.afel-project.eu/>
SELECT ?date ?url
WHERE { $aView afl:user $user .
$aView a afl:ArtifactView .
$user afl:person $pers .
$pers afl:firstName "project.afel+002" .
$aView afl:artifact $artifact .
$artifact afl:URL ?url .
$aView afl:eventStartDate ?date .
}
The AFEL App Evaluation Analysis is distributed under the Apache Licence V2. Please attribute Rémi Venant, Sana Syeda and Mathieu d'Aquin through the AFEL Project* when reusing and redistributing this code.