-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2603b9d
commit 1b3ec3a
Showing
8 changed files
with
27,994 additions
and
89 deletions.
There are no files selected for viewing
174 changes: 87 additions & 87 deletions
174
.github/workflows/generate_conventions_and_glossary.yml
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 |
---|---|---|
@@ -1,87 +1,87 @@ | ||
name: generate conventions and glossary | ||
on: | ||
push: | ||
branches: | ||
- "**" | ||
paths: | ||
- "implementation/demo_ontology/xmi_conceptual_model/demo_ontology_CM.xml" | ||
|
||
jobs: | ||
report_and_glossary: | ||
runs-on: ubuntu-latest | ||
env: | ||
OUTPUT_GLOSSARY_PATH: glossary/ | ||
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: generate convention report and glossary | ||
run: | | ||
AVAILABLE_IMPLEMENTATIONS=(demo_ontology) | ||
for implementation in "${AVAILABLE_IMPLEMENTATIONS[@]}" | ||
do | ||
echo "-------------------${implementation}---------------------------------" | ||
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_CONVENTION_REPORT_PATH=$(echo "implementation/$implementation/conventions_report/") | ||
OUTPUT_GLOSSARY_FILE_NAME=$(echo "${implementation}_glossary.html") | ||
ls -la implementation/$implementation/xmi_conceptual_model/ | ||
echo "CM_FILE_PATH is $CM_FILE_PATH" | ||
echo "OUTPUT_REPORT_PATH is $OUTPUT_CONVENTION_REPORT_PATH" | ||
echo "OUTPUT_GLOSSARY_FILE_NAME is $OUTPUT_GLOSSARY_FILE_NAME" | ||
mkdir -p $OUTPUT_CONVENTION_REPORT_PATH | ||
rm -f $OUTPUT_CONVENTION_REPORT_PATH*.html || true | ||
ls -la | ||
cd model2owl | ||
ls -la | ||
make generate-convention-report XMI_INPUT_FILE_PATH=../$CM_FILE_PATH OUTPUT_CONVENTION_REPORT_PATH=../$OUTPUT_CONVENTION_REPORT_PATH | ||
make generate-glossary XMI_INPUT_FILE_PATH=../$CM_FILE_PATH OUTPUT_GLOSSARY_PATH=../$OUTPUT_GLOSSARY_PATH | ||
sed -i "s/..\/implementation\/${implementation}\/model2owl-config/test\/ePO-default-config/g" config-proxy.xsl | ||
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 convention report and glossary 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 }} | ||
#name: generate conventions and glossary | ||
#on: | ||
# push: | ||
# branches: | ||
# - "**" | ||
# paths: | ||
# - "implementation/demo_ontology/xmi_conceptual_model/demo_ontology_CM.xml" | ||
# | ||
#jobs: | ||
# report_and_glossary: | ||
# runs-on: ubuntu-latest | ||
# env: | ||
# OUTPUT_GLOSSARY_PATH: glossary/ | ||
# 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: generate convention report and glossary | ||
# run: | | ||
# AVAILABLE_IMPLEMENTATIONS=(demo_ontology) | ||
# for implementation in "${AVAILABLE_IMPLEMENTATIONS[@]}" | ||
# do | ||
# echo "-------------------${implementation}---------------------------------" | ||
# 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_CONVENTION_REPORT_PATH=$(echo "implementation/$implementation/conventions_report/") | ||
# OUTPUT_GLOSSARY_FILE_NAME=$(echo "${implementation}_glossary.html") | ||
# ls -la implementation/$implementation/xmi_conceptual_model/ | ||
# echo "CM_FILE_PATH is $CM_FILE_PATH" | ||
# echo "OUTPUT_REPORT_PATH is $OUTPUT_CONVENTION_REPORT_PATH" | ||
# echo "OUTPUT_GLOSSARY_FILE_NAME is $OUTPUT_GLOSSARY_FILE_NAME" | ||
# | ||
# mkdir -p $OUTPUT_CONVENTION_REPORT_PATH | ||
# rm -f $OUTPUT_CONVENTION_REPORT_PATH*.html || true | ||
# ls -la | ||
# cd model2owl | ||
# ls -la | ||
# make generate-convention-report XMI_INPUT_FILE_PATH=../$CM_FILE_PATH OUTPUT_CONVENTION_REPORT_PATH=../$OUTPUT_CONVENTION_REPORT_PATH | ||
# make generate-glossary XMI_INPUT_FILE_PATH=../$CM_FILE_PATH OUTPUT_GLOSSARY_PATH=../$OUTPUT_GLOSSARY_PATH | ||
# | ||
# sed -i "s/..\/implementation\/${implementation}\/model2owl-config/test\/ePO-default-config/g" config-proxy.xsl | ||
# 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 convention report and glossary 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 }} |
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
2 changes: 1 addition & 1 deletion
2
implementation/demo_ontology/xmi_conceptual_model/demo_ontology_CM.xml
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
138 changes: 138 additions & 0 deletions
138
implementation/demo_ontology_module/model2owl-config/config-parameters.xsl
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,138 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" exclude-result-prefixes="xd xsl dc fn" | ||
xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
xmlns:dct="http://purl.org/dc/terms/" xmlns:fn="http://www.w3.org/2005/xpath-functions" | ||
xmlns:functx="http://www.functx.com" xmlns:owl="http://www.w3.org/2002/07/owl#" | ||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:vann="http://purl.org/vocab/vann/" | ||
version="3.0"> | ||
|
||
<xd:doc scope="stylesheet"> | ||
<xd:desc> | ||
<xd:p><xd:b>Created on:</xd:b> Mar 22, 2020</xd:p> | ||
<xd:p><xd:b>Author:</xd:b> lps</xd:p> | ||
<xd:p>This module defines project level variables and parameters</xd:p> | ||
</xd:desc> | ||
</xd:doc> | ||
|
||
|
||
|
||
<!-- a set of prefix-baseURI definitions --> | ||
<xsl:variable name="namespacePrefixes" select="fn:doc('namespaces.xml')"/> | ||
|
||
<!-- a mapping between UML atomic types to XSD datatypes --> | ||
<xsl:variable name="umlDataTypesMapping" select="fn:doc('umlToXsdDataTypes.xml')"/> | ||
|
||
<!-- XSD datatypes that conform to OWL2 requirements --> | ||
<xsl:variable name="xsdAndRdfDataTypes" select="fn:doc('xsdAndRdfDataTypes.xml')"/> | ||
<!-- set default namespace interpretation for lexical Qnames that are not prefix:localSegment or :localSegment. If this | ||
is set to true localSegment will transform to :localSegment--> | ||
<xsl:variable name="defaultNamespaceInterpretation" select="fn:true()"/> | ||
|
||
<!-- Ontology base URI, configure as necessary. Do not use a trailing local delimiter | ||
like in the namespace definition--> | ||
<!--<xsl:variable name="base-uri" select="'http://publications.europa.eu/ontology/ePO'"/>--> | ||
<xsl:variable name="base-ontology-uri" select="'http://data.europa.eu/a4g/ontology'"/> | ||
<xsl:variable name="base-shape-uri" select="'http://data.europa.eu/a4g/data-shape'"/> | ||
<xsl:variable name="base-restriction-uri" select="$base-ontology-uri"/> | ||
<!-- Shapes Module URI--> | ||
<xsl:variable name="shapeArtefactURI" | ||
select="fn:concat($base-shape-uri, $defaultDelimiter, $moduleReference, '-shape')"/> | ||
<!-- Restrictions Module URI--> | ||
<xsl:variable name="restrictionsArtefactURI" | ||
select="fn:concat($base-restriction-uri, $defaultDelimiter, $moduleReference, '-restriction')"/> | ||
<!-- Core Module URI--> | ||
<xsl:variable name="coreArtefactURI" | ||
select="fn:concat($base-ontology-uri, $defaultDelimiter, $moduleReference)"/> | ||
|
||
<!-- when a delimiter is missing in the base URI of a namespace, use this default value--> | ||
<xsl:variable name="defaultDelimiter" select="'#'"/> | ||
|
||
<!-- types of elements and names for attribute types that are acceptable to produce object properties --> | ||
<xsl:variable name="acceptableTypesForObjectProperties" | ||
select="('epo:Identifier', 'rdfs:Literal')"/> | ||
<!-- the type of attributes which takes values from a controlled list--> | ||
<xsl:variable name="controlledListType" select="'epo:Code'"/> | ||
<!-- Acceptable stereotypes --> | ||
<xsl:variable name="stereotypeValidOnAttributes" select="()"/> | ||
<xsl:variable name="stereotypeValidOnObjects" select="()"/> | ||
<xsl:variable name="stereotypeValidOnGeneralisations" | ||
select="('Disjoint', 'Equivalent', 'Complete')"/> | ||
<xsl:variable name="stereotypeValidOnAssociations" select="()"/> | ||
<xsl:variable name="stereotypeValidOnDependencies" select="('Disjoint', 'disjoint', 'join')"/> | ||
<xsl:variable name="stereotypeValidOnClasses" select="('Abstract')"/> | ||
<xsl:variable name="stereotypeValidOnDatatypes" select="()"/> | ||
<xsl:variable name="stereotypeValidOnEnumerations" select="()"/> | ||
<xsl:variable name="stereotypeValidOnPackages" select="()"/> | ||
|
||
<xsl:variable name="abstractClassesStereotypes" select="('Abstract', 'abstract class', 'abstract')"/> | ||
|
||
<!-- This variable controls whether the enumeration items are transformed into skos concepts or ignored--> | ||
<xsl:variable name="enableGenerationOfSkosConcept" select="fn:false()"/> | ||
|
||
<!-- This variable controls whether the enumerations are transformed into skos schemes or ignored--> | ||
<xsl:variable name="enableGenerationOfConceptSchemes" select="fn:true()"/> | ||
|
||
<!--Allowed characters for a normalized string--> | ||
<xsl:variable name="allowedStrings" select="'^[\w\d-_:]+$'"/> | ||
|
||
|
||
|
||
<xsl:variable name="reference-to-external-classes-in-glossary" select="fn:true()"/> | ||
<!-- _______________________________________________________________________ --> | ||
<!-- METADATA SECTION --> | ||
<!-- _______________________________________________________________________ --> | ||
<!-- This section contains the variables used to build the ontology metadata--> | ||
<xsl:variable name="moduleReference" select="'not'"/> | ||
<!-- dct:title --> | ||
<xsl:variable name="ontologyTitle" select="'eProcurement Ontology - not'"/> | ||
<!-- dct:description--> | ||
<xsl:variable name="ontologyDescription" | ||
select=" | ||
'This module provides the definitions for the eProcurement ontology core. | ||
Procurement data has been identified as data with a high-reuse potential. | ||
Given the increasing importance of data standards for eProcurement, a number of initiatives | ||
driven by the public sector, the industry and academia have been kick-started in recent years. | ||
Some have grown organically, while others are the result of standardisation work. | ||
The vocabularies and the semantics that they are introducing, the phases of public procurement that they are covering, | ||
and the technologies that they are using all differ. These differences hamper data interoperability and thus its reuse by them or by the wider public. | ||
This creates the need for a common data standard for publishing procurement data, hence allowing data | ||
from different sources to be easily accessed and linked, and consequently reused.'"/> | ||
<!-- dct:abstract--> | ||
<xsl:variable name="abstractCore" | ||
select="'This artefact provides the ontology core specification.'"/> | ||
<xsl:variable name="abstractResctrictions" | ||
select="'This artefact provides the ontology extention with restrictions and inference-relaated specification.'"/> | ||
<xsl:variable name="abstractShapes" | ||
select="'This artefact provides the datashape specification. '"/> | ||
<!-- rdfs:seeAlso --> | ||
<xsl:variable name="seeAlsoResources" | ||
select=" | ||
('https://github.com/eprocurementontology/eprocurementontology', | ||
'https://joinup.ec.europa.eu/collection/eprocurement/solution/eprocurement-ontology/about', 'https://op.europa.eu/en/web/eu-vocabularies/e-procurement', | ||
'https://docs.ted.europa.eu/EPO/latest/index.html')"/> | ||
<!-- dct:created--> | ||
<xsl:variable name="createdDate" select="''"/> | ||
<!-- dct:issued--> | ||
<xsl:variable name="issuedDate" select="format-date(current-date(), '[Y0001]-[M01]-[D01]')"/> | ||
<!-- owl:incompatibleWith --> | ||
<xsl:variable name="incompatibleWith" select="'3.1.0'"/> | ||
<!-- owl:versionInfo --> | ||
<xsl:variable name="versionInfo" select="'4.0.0'"/> | ||
<!-- bibo:status--> | ||
<xsl:variable name="ontologyStatus" select="'Semantic Specification Realease'"/> | ||
<!-- owl:priorVersion --> | ||
<xsl:variable name="priorVersion" select="'3.1.0'"/> | ||
<!-- vann:preferredNamespaceUri --> | ||
<xsl:variable name="preferredNamespaceUri" select="'http://data.europa.eu/a4g/ontology#'"/> | ||
<!-- vann:preferredNamespacePrefix --> | ||
<xsl:variable name="preferredNamespacePrefix" select="'epo-not'"/> | ||
<xsl:variable name="rightsLiteral" select="'The Commission’s reuse policy is implemented by Commission Decision2011/833/EU of 12 December 2011 on the reuse of Commission documents | ||
(OJ L 330,14.12.2011, p. 39 – https://eur-lex.europa.eu/eli/dec/2011/833/oj). Unlessotherwise noted, the reuse of this document is authorised under the | ||
CreativeCommons Attribution 4.0 International (CC BY 4.0) licence (https://creativecommons.org/licenses/by/4.0/).This means that reuse is allowed, provided | ||
that appropriate credit is given and any changes are indicated.'"/> | ||
<xsl:variable name="licenseURI" select="'http://creativecommons.org/licenses/by-sa/4.0'"/> | ||
<xsl:variable name="attributionNameLiteral" select="'European Union'"/> | ||
<xsl:variable name="attributionURL" select="'http://publications.europa.eu/resource/authority/corporate-body/EURUN'"/> | ||
|
||
</xsl:stylesheet> |
41 changes: 41 additions & 0 deletions
41
implementation/demo_ontology_module/model2owl-config/namespaces.xml
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,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<prefixes xmlns="http://publications.europa.eu/ns/"> | ||
<prefix name="" value="http://data.europa.eu/a4g/ontology#"/> | ||
|
||
<prefix name="owl" value="http://www.w3.org/2002/07/owl#"/> | ||
<prefix name="rdf" value="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/> | ||
<prefix name="xml" value="http://www.w3.org/XML/1998/namespace"/> | ||
<prefix name="xsd" value="http://www.w3.org/2001/XMLSchema#"/> | ||
<prefix name="rdfs" value="http://www.w3.org/2000/01/rdf-schema#"/> | ||
|
||
<prefix name="foaf" value="http://xmlns.com/foaf/0.1/" importURI="http://xmlns.com/foaf/0.1/"/> | ||
<prefix name="dct" value="http://purl.org/dc/terms/" importURI="http://purl.org/dc/terms/"/> | ||
<prefix name="org" value="http://www.w3.org/ns/org#" importURI="http://www.w3.org/ns/org#"/> | ||
<prefix name="skos" value="http://www.w3.org/2004/02/skos/core#" importURI="http://www.w3.org/2004/02/skos/core"/> | ||
|
||
<prefix name="epo" value="http://data.europa.eu/a4g/ontology#"/> | ||
<prefix name="epo-cat" value="http://data.europa.eu/a4g/ontology#"/> | ||
<prefix name="epo-con" value="http://data.europa.eu/a4g/ontology#"/> | ||
<prefix name="epo-ord" value="http://data.europa.eu/a4g/ontology#"/> | ||
<prefix name="epo-not" value="http://data.europa.eu/a4g/ontology#"/> | ||
<prefix name="epo-ful" value="http://data.europa.eu/a4g/ontology#"/> | ||
|
||
<prefix name="nuts" value="http://data.europa.eu/nuts/" importURI="http://data.europa.eu/nuts"/> | ||
<prefix name="espd" value="https://github.com/ESPD/ESPD-EDM/"/> | ||
<prefix name="at-voc" value="http://publications.europa.eu/resource/authority/" importURI="http://publications.europa.eu/resource/authority/"/> | ||
<prefix name="time" value="http://www.w3.org/2006/time#" importURI="http://www.w3.org/2006/time"/> | ||
<prefix name="locn" value="http://www.w3.org/ns/locn#" importURI="http://www.w3.org/ns/locn"/> | ||
<prefix name="cv" value="http://data.europa.eu/m8g/" importURI="https://data.europa.eu/m8g/"/> | ||
<prefix name="core" value="http://data.europa.eu/m8g/" importURI="http://data.europa.eu/m8g/"/> | ||
<prefix name="cpv" value="http://data.europa.eu/m8g/" importURI="http://data.europa.eu/m8g/"/> | ||
<prefix name="cpsv" value="http://data.europa.eu/m8g/" importURI="http://data.europa.eu/m8g/"/> | ||
<prefix name="cpov" value="http://data.europa.eu/m8g/" importURI="http://data.europa.eu/m8g/"/> | ||
<prefix name="cccev" value="http://data.europa.eu/m8g/" importURI="https://data.europa.eu/m8g/"/> | ||
<prefix name="geosparql" value="http://www.opengis.net/ont/geosparql#" importURI="http://www.opengis.net/ont/geosparql"/> | ||
<prefix name="dul" value="http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#"/> | ||
<prefix name="person" value="http://www.w3.org/ns/person#" importURI="http://www.w3.org/ns/person"/> | ||
<prefix name="at-voc-new" value="http://publications.europa.eu/resource/authority/new/" /> | ||
<prefix name="adms" value="http://www.w3.org/ns/adms#" importURI="http://www.w3.org/ns/adms"/> | ||
<!-- <prefix name="bibo" value="http://purl.org/ontology/bibo/" importURI="http://purl.org/ontology/bibo/"/>--> | ||
<!-- <prefix name="vann" value=" http://purl.org/vocab/vann/" importURI="http://purl.org/vocab/vann/"/>--> | ||
</prefixes> |
Oops, something went wrong.