-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added .owl (ManchesterSyntax) to DPV-OWL files
The DPV-OWL serialisations now include .owl ManchesterSyntax files in addition to the other formats. The conversion is handled by `801` script, and it will be run by `902` to auto-generate .owl files on every update - same as other formats. The tool used for conversion is onto-converter from https://github.com/sszuev/ont-converter/ In the future, this can be replaced with a simpler OWLAPI wrapper.
- Loading branch information
1 parent
4bc78c8
commit 1a9bb10
Showing
35 changed files
with
19,263 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,3 +136,6 @@ dmypy.json | |
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
# ont-converter jar files should be skipped | ||
ont-converter.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
#author: Harshvardhan J. Pandit | ||
|
||
# Convert DPV files from RDF / Turtle format to OWL / Machester formats | ||
|
||
echo "Converting DPV files from .rdf to .owl with ManchesterSyntax" | ||
|
||
# REQUIREMENTS: Ont-Converter | ||
# Get it from here https://github.com/sszuev/ont-converter/releases | ||
# Put the jar as "ont-converter.jar" in this same folder | ||
|
||
# convert .rdf files to .owl files in manchester syntax | ||
convert_owl() { | ||
filepath="${1%.*}" | ||
filepath_owl="${filepath}.owl" | ||
echo -n "converting $filepath ..." | ||
java -jar ont-converter.jar -i "$1" -if RDF_XML -o "$filepath_owl" -of ManchesterSyntax | ||
echo "DONE" | ||
} | ||
export -f convert_owl | ||
|
||
# Find all .rdf files in parent directory, | ||
# then convert them to .owl using the ont-converter. | ||
# The assumption here is that .rdf files are only present in places | ||
# where DPV outputs exist, and won't be for example in the | ||
# documentation generator metadata folders (they are .ttl) | ||
|
||
find ../dpv-owl -type f -name "*.rdf" -exec bash -c 'convert_owl "$0"' {} \; | ||
# java -jar $ONT_CONVERTER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.