Skip to content

Commit

Permalink
added eurovoc modules config
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragos0000 committed Feb 14, 2024
1 parent 1e6b42f commit fbfdfeb
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 91 deletions.
176 changes: 88 additions & 88 deletions .github/workflows/transform_with_model2owl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,91 +120,91 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
transform:
needs: report_and_glossary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}

- name: get model2owl
run: |
git clone https://github.com/OP-TED/model2owl.git
pwd
- name: get-saxon
run: pwd && cd model2owl && make get-saxon

- name: get-rdflib
run: cd model2owl && make create-virtual-env && make get-rdflib

- name: transform step
run: |
AVAILABLE_IMPLEMENTATIONS=(demo_ontology demo_ontology_module)
for implementation in "${AVAILABLE_IMPLEMENTATIONS[@]}"
do
echo "-------------------${implementation} transform---------------------------------"
sed -i "s/test\/ePO-default-config/..\/implementation\/${implementation}\/model2owl-config/g" model2owl/config-proxy.xsl
cat model2owl/config-proxy.xsl
CM_FILE_NAME=$(echo "${implementation}_CM.xml")
CM_FILE_PATH=$(echo "implementation/$implementation/xmi_conceptual_model/${CM_FILE_NAME}")
OUTPUT_PATH_OWL=$(echo "implementation/$implementation/owl_ontology/")
OUTPUT_PATH_SHACL=$(echo "implementation/$implementation/shacl_shapes/")
ls -la implementation/$implementation/xmi_conceptual_model/
echo "CM_FILE_PATH is $CM_FILE_PATH"
echo "OUTPUT_PATH_OWL is $OUTPUT_PATH_OWL"
echo "OUTPUT_PATH_SHACL is $OUTPUT_PATH_SHACL"
cd model2owl
ls -la
echo "+++++++++++++++++transform to rdf++++++++++++++++++++++++++++"
make owl-core XMI_INPUT_FILE_PATH=../$CM_FILE_PATH OUTPUT_FOLDER_PATH=../$OUTPUT_PATH_OWL
make owl-restrictions XMI_INPUT_FILE_PATH=../$CM_FILE_PATH OUTPUT_FOLDER_PATH=../$OUTPUT_PATH_OWL
make shacl XMI_INPUT_FILE_PATH=../$CM_FILE_PATH OUTPUT_FOLDER_PATH=../$OUTPUT_PATH_SHACL
echo "+++++++++++++++++transform to turtle++++++++++++++++++++++++++++"
echo $(ls ../${OUTPUT_PATH_OWL}*.rdf)
make convert-rdf-to-turtle ONTOLOGY_FOLDER_PATH=../$OUTPUT_PATH_OWL
echo $(ls ../${OUTPUT_PATH_SHACL}*.rdf)
make convert-rdf-to-turtle ONTOLOGY_FOLDER_PATH=../$OUTPUT_PATH_SHACL
echo "-------------------end transform---------------------------------"
sed -i "s/..\/implementation\/${implementation}\/model2owl-config/test\/ePO-default-config/g" config-proxy.xsl
cd ..
done
shell: bash

- name: remove unnecessary files
run: |
sudo rm -rf model2owl
shell: bash

- name: commit files
id: commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "github-actions"
git pull
git status
git add .
if [ -z "$(git status --porcelain)" ]; then
echo "::set-output name=push::false"
else
git commit -m "Adding transformation files"
echo "::set-output name=push::true"
fi
shell: bash

- name: Push changes
if: steps.commit.outputs.push == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
# transform:
# needs: report_and_glossary
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# with:
# ref: ${{ github.ref }}
#
# - name: get model2owl
# run: |
# git clone https://github.com/OP-TED/model2owl.git
# pwd
#
# - name: get-saxon
# run: pwd && cd model2owl && make get-saxon
#
# - name: get-rdflib
# run: cd model2owl && make create-virtual-env && make get-rdflib
#
# - name: transform step
# run: |
# AVAILABLE_IMPLEMENTATIONS=(demo_ontology demo_ontology_module)
# for implementation in "${AVAILABLE_IMPLEMENTATIONS[@]}"
# do
# echo "-------------------${implementation} transform---------------------------------"
# sed -i "s/test\/ePO-default-config/..\/implementation\/${implementation}\/model2owl-config/g" model2owl/config-proxy.xsl
# cat model2owl/config-proxy.xsl
#
#
# CM_FILE_NAME=$(echo "${implementation}_CM.xml")
# CM_FILE_PATH=$(echo "implementation/$implementation/xmi_conceptual_model/${CM_FILE_NAME}")
# OUTPUT_PATH_OWL=$(echo "implementation/$implementation/owl_ontology/")
# OUTPUT_PATH_SHACL=$(echo "implementation/$implementation/shacl_shapes/")
#
# ls -la implementation/$implementation/xmi_conceptual_model/
# echo "CM_FILE_PATH is $CM_FILE_PATH"
# echo "OUTPUT_PATH_OWL is $OUTPUT_PATH_OWL"
# echo "OUTPUT_PATH_SHACL is $OUTPUT_PATH_SHACL"
#
#
# cd model2owl
# ls -la
# echo "+++++++++++++++++transform to rdf++++++++++++++++++++++++++++"
# make owl-core XMI_INPUT_FILE_PATH=../$CM_FILE_PATH OUTPUT_FOLDER_PATH=../$OUTPUT_PATH_OWL
# make owl-restrictions XMI_INPUT_FILE_PATH=../$CM_FILE_PATH OUTPUT_FOLDER_PATH=../$OUTPUT_PATH_OWL
# make shacl XMI_INPUT_FILE_PATH=../$CM_FILE_PATH OUTPUT_FOLDER_PATH=../$OUTPUT_PATH_SHACL
#
# echo "+++++++++++++++++transform to turtle++++++++++++++++++++++++++++"
# echo $(ls ../${OUTPUT_PATH_OWL}*.rdf)
# make convert-rdf-to-turtle ONTOLOGY_FOLDER_PATH=../$OUTPUT_PATH_OWL
# echo $(ls ../${OUTPUT_PATH_SHACL}*.rdf)
# make convert-rdf-to-turtle ONTOLOGY_FOLDER_PATH=../$OUTPUT_PATH_SHACL
# echo "-------------------end transform---------------------------------"
#
#
# sed -i "s/..\/implementation\/${implementation}\/model2owl-config/test\/ePO-default-config/g" config-proxy.xsl
# cd ..
# done
# shell: bash
#
# - name: remove unnecessary files
# run: |
# sudo rm -rf model2owl
# shell: bash
#
# - name: commit files
# id: commit
# run: |
# git config --local user.email "[email protected]"
# git config --local user.name "github-actions"
# git pull
# git status
#
# git add .
# if [ -z "$(git status --porcelain)" ]; then
# echo "::set-output name=push::false"
# else
# git commit -m "Adding transformation files"
# echo "::set-output name=push::true"
# fi
# shell: bash
#
# - name: Push changes
# if: steps.commit.outputs.push == 'true'
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: ${{ github.ref }}
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<!-- _______________________________________________________________________ -->

<xsl:variable name="githubURL" select="'https://github.com/meaningfy-ws/eurovoc-pipelines'"/>
<xsl:variable name="respecDescription" select="$ontologyDescriptionCore"/>
<xsl:variable name="respecDescription" select="'Common AP is an Application Profile designed to includes common entities that can be used as a foundational framework for all other APs.'"/>
<xsl:variable name="feedbackURL" select="fn:concat($githubURL, '/issues')"/>
<xsl:variable name="authors" select="('Author One', 'Author Two')"/>
<xsl:variable name="editors" select="('Editor One', 'Editor Two')"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<!-- _______________________________________________________________________ -->

<xsl:variable name="githubURL" select="'https://github.com/meaningfy-ws/eurovoc-pipelines'"/>
<xsl:variable name="respecDescription" select="$ontologyDescriptionCore"/>
<xsl:variable name="respecDescription" select="'The purpose of a currency Application Profile is to provide a structured knowledge model for concepts associated with currencies and their subunits.'"/>
<xsl:variable name="feedbackURL" select="fn:concat($githubURL, '/issues')"/>
<xsl:variable name="authors" select="('Author One', 'Author Two')"/>
<xsl:variable name="editors" select="('Editor One', 'Editor Two')"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="windows-1252"?>
<xmi:XMI xmlns:uml="http://www.omg.org/spec/UML/20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:umldi="http://www.omg.org/spec/UML/20131001/UMLDI" xmlns:dc="http://www.omg.org/spec/UML/20131001/UMLDC" xmlns:thecustomprofile="http://www.sparxsystems.com/profiles/thecustomprofile/1.0">
<xmi:Documentation exporter="Enterprise Architect" exporterVersion="6.5" exporterID="1559"/>
<xmi:Documentation exporter="Enterprise Architect" exporterVersion="6.5" exporterID="1559"/>
<uml:Model xmi:type="uml:Model" name="EA_Model">
<packagedElement xmi:type="uml:Package" xmi:id="EAPK_DB0C4677_88DC_4767_8DE5_76387A40E5AE" name="ePO">
<packagedElement xmi:type="uml:Package" xmi:id="EAPK_6B65084A_798D_4f35_BA8F_EF75ACEBC684" name="eProcurementOntology">
Expand Down

0 comments on commit fbfdfeb

Please sign in to comment.