RDFizer is a library used by MatKG tool.
This component aims at to transform EMR (T2D Lab Tests) and PHR (Samsung Health data) to HeLiFit ontology through the use of the RML Mapper.
- git clone https://github.ecodesamsung.com/Health-Innovation/rdfizer.git
- open the project IntelliJ IDEA
- make sure you are using Java 17.0.2 with IntelliJ IDEA: File --> Project Structure --> Project --> SDK
- Download RDFox 6.0 from https://www.oxfordsemantic.tech/downloads
- Create "rdfox" folder under rdfizer/lib
- Copy the files JRDFox.jar, libRDFox.dll, libRDFox.lib, libRDFox-static.lib under rdfizer/lib/rdfox
- Copy RDFox licence rdfizer/lib
- Go to File --> Project Structure --> Libraries --> click on "+" --> Java --> select rdfizer/lib/rdfox/JRDFox.java --> APPLY.
- Build Project with "Build --> Build Project"
- Go to File --> Project Structure --> Artefacts --> by clicking on the plus symbol -> JAR --> From Modules All Dependencies --> click on "Copy to the output directory and link via manifest" --> OK --> APPLY
- Go to File --> Project Structure --> Artefacts --> Select "rdfizer:java" -> Pre-Processing Tab --> tick the box "Run Ant Target" --> click on ... --> selct "Bundle" --> APPLY
- Create JAR. "Build --> Build Artefact --> Build or rebuild"
-
build Project. Build --> Build Project
-
create JAR. Build --> Build Artefact --> Rebuild
-
rdfizer.jar is created and will appear under the project folder: out --> artifacts --> rdfizer_jar
-
In case of ISSUE (e.g.; in case the rdfizer.jar is not generated, especially when the pom is modified when installing the dependencies)
-
Run clean from ant menu (this deletes the out, target, the aggregated rml file mappings folder)
-
Delete META-INF folder from resources/META-INF
-
Run bundle from ant menu (this creates the out, target, the aggregated rml file mappings)
-
Go to File--> Project Structure --> Artefacts --> delete all the jar you find in there (by clicking on the minus symbol) then APPLY.
-
Go to File--> Project Structure --> Artefacts --> by clicking on the plus symbol -> JAR --> From Modules All Dependencies --> Copy to the output directory and link via manifest --> OK --> APPLY
-
Go to File--> Project Structure --> Artefacts --> Select RDFizer.java -> Pre-Processing --> tick the box "Run Ant Target" --> click on ... --> selct "Bundle" --> APPLY
-
Go to Step 4. and execute 4. + 5. + 6.
-
Check the folder out/artifacts/<project_name_jar>/ for the file <project_name>.jar (e.g.; rdfizer.jar)
if case of extending or editing the RML mappings files, Perform the bundle-helifit operation for merging all the set of RML rules
- run bundle from ant menu
- in case of issue, run clean from ant menu
- HeLiFit ontology V1.5.1 - containing all the classes and properties used for transforming EMR (T2D Lab Tests) and PHR (Samsung Health data) into HeLiFit
- helifit.template.ttl - containing all the RML mapping rules that support the transformation into HeLiFit. You can find the spec of the mapping under rdfizer --> src --> resources --> mappings.helifit
Logback documentation
Logback configuration
RMLMapper - Examples
RMLMapper - Usage example
RMLMapper - Logback conf
IBM - FHIR Model Guide
IBM - FHIR Model Javadoc