As part of the development of the master thesis for the master in data science for the Universidad Politécnica de Madrid, together with the Ontology Engineering Group, we have implemented a proof of concept of a converter between two formats to represent data related to public transport. These formats will be NeTEx in its Norwegian format and an ontology designed by the OEG. The project developed in Java seeks to satisfy this need while facilitating the incremental implementation in order to integrate it natively in Open Trip Planner.
Before even compile and run the code the follow requirements mus be fulfilled
- Get Java 11 installed
- Get Maven installed
- Data to cast in its origin format (NeTEx or Turtle)
- Netex compressed in a zip.
ouput.netex.zip
- Turtle as a ttl exetension single file.
linked.ttl.zip
- Netex compressed in a zip.
To generate a runnable jar file we must use maven. From terminal use the following command to generate an executable jar.
mvn clean package
In order to run the code we have to use an IDE, such as IntelliJ, or use a terminal if the jar was previously generated.
Nonetheless a set of parameters must be provided so the program knows in which
direction execute the pipeline and where the files are located. However, the option
-h
is available to further details.
The Main class that must be invoked is called Main
. The first parameter is the
direction of the Pipeline (-f
, --flow
). It is a optional parameter but the default
value is "NeTEx → Turtle" Posible values: N-T
and T-N
. The other two parameters are mandatory and are the
loaction of the input and output folders/files. Without spaces
Get help with:
java -jar <complied_file.jar> -h
Example from Turtle to NeTEx:
java -jar <compiled_file.jar> --flow T-N "./linked.ttl" "./output/"
Example from NeTEx to Turtle:
java -jar <compiled_file.jar> --flow N-T "./output.netex.zip" "./output/linked.ttl"