Skip to content

Commit

Permalink
changes to metadata and makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragos0000 committed Sep 14, 2023
1 parent e2bc166 commit bc346ba
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 33 deletions.
39 changes: 30 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ generate-convention-report:
#Example how to run transformation commands :
# make owl-core XMI_INPUT_FILE_PATH=/home/mypc/work/model2owl/eNotice_CM.xml OUTPUT_FOLDER_PATH=./my-folder
owl-core:
@java -jar ${SAXON} -s:${XMI_INPUT_FILE_PATH} -xsl:${MODEL2OWL_FOLDER}/src/owl-core.xsl -o:${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-core.rdf
@java -jar ${SAXON} -s:${XMI_INPUT_FILE_PATH} -xsl:${MODEL2OWL_FOLDER}/src/owl-core.xsl -o:${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-core.owl.rdf
@echo Output owl core file:
@ls -lh ${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-core.rdf
@ls -lh ${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-core.owl.rdf
owl-restrictions:
@java -jar ${SAXON} -s:${XMI_INPUT_FILE_PATH} -xsl:${MODEL2OWL_FOLDER}/src/owl-restrictions.xsl -o:${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-restrictions.rdf
@java -jar ${SAXON} -s:${XMI_INPUT_FILE_PATH} -xsl:${MODEL2OWL_FOLDER}/src/owl-restrictions.xsl -o:${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-restrictions.owl.rdf
@echo Output owl restrictions file:
@ls -lh ${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-restrictions.rdf
@ls -lh ${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-restrictions.owl.rdf
shacl:
@java -jar ${SAXON} -s:${XMI_INPUT_FILE_PATH} -xsl:${MODEL2OWL_FOLDER}/src/shacl-shapes.xsl -o:${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-shacl.rdf
@java -jar ${SAXON} -s:${XMI_INPUT_FILE_PATH} -xsl:${MODEL2OWL_FOLDER}/src/shacl-shapes.xsl -o:${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-shapes.shacl.rdf
@echo Output shacl file location:
@ls -lh ${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-shacl.rdf
@ls -lh ${OUTPUT_FOLDER_PATH}/${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}-shapes.shacl.rdf


# Combine xmi UML files
Expand All @@ -121,8 +121,8 @@ merge-xmi:

#Example how to run converting commands :
# make convert-to-turtle ONTOLOGY_FOLDER_PATH=./my-folder
# OUTPUT_FOLDER_PATH is the the path to the folder containing .rdf files for converting to turtle or .ttl files to convert to rdf
convert-to-turtle:
# ONTOLOGY_FOLDER_PATH is the the path to the folder containing .rdf files for converting to turtle or .ttl files to convert to rdf
convert-rdf-to-turtle:
@for FILE_PATH in ${RDF_FILELIST}; do \
echo Converting $${FILE_PATH} into Turtle; \
source model2owl-venv/bin/activate; \
Expand All @@ -132,7 +132,7 @@ convert-to-turtle:
echo " ==> Output in Turtle format"; \
ls -lh $${FILE_PATH%.*}.ttl; \
done
convert-to-rdf:
convert-turtle-to-rdf:
@for FILE_PATH in ${TURTLE_FILELIST}; do \
echo Converting $${FILE_PATH} into RDF/XML; \
source model2owl-venv/bin/activate; \
Expand All @@ -143,6 +143,27 @@ convert-to-rdf:
ls -lh $${FILE_PATH%.*}.rdf; \
done

convert-rdf-to-jsonld:
@for FILE_PATH in ${RDF_FILELIST}; do \
echo Converting $${FILE_PATH} into JSON-LD; \
source model2owl-venv/bin/activate; \
rdfpipe -i application/rdf+xml -o json-ld $${FILE_PATH} > $${FILE_PATH%.*}.json; \
echo Input in RDF/XML format; \
echo $${FILE_PATH}; \
echo " ==> Output in JSON-LD format"; \
ls -lh $${FILE_PATH%.*}.json; \
done
convert-rdf-to-rdf:
@for FILE_PATH in ${RDF_FILELIST}; do \
echo Converting $${FILE_PATH} into RDF/XML; \
source model2owl-venv/bin/activate; \
rdfpipe -i application/rdf+xml -o application/rdf+xml $${FILE_PATH} > $${FILE_PATH%.*}.rdf2; \
mv -v $${FILE_PATH%.*}.rdf2 $${FILE_PATH%.*}.rdf; \
echo Input in RDF/XML format; \
ls -lh $${FILE_PATH}; \
echo " ==> Output in RDF/XML format"; \
ls -lh $${FILE_PATH%.*}.rdf; \
done
#make generate-html-docs-from-rdf WIDOCO_RDF_INPUT_FILE_PATH=../Documents/model2owl-2023/owl-core.rdf WIDOCO_OUTPUT_FOLDER_PATH=core-html
generate-html-docs-from-rdf: get-widoco
@echo ${WIDOCO_RDF_INPUT_FILE_PATH}
Expand Down
9 changes: 5 additions & 4 deletions src/owl-core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@
<dct:description xml:lang="en">
<xsl:value-of select="$ontologyDescription"/>
</dct:description>
<dct:abstract><xsl:value-of select="$abstractCore"/></dct:abstract>
<skos:changeNote>This version is automatically generated from <xsl:value-of select="tokenize(base-uri(.), '/')[last()]"/> on <xsl:value-of select="format-date(current-date(),'[Y0001]-[M01]-[D01]')"/>
</skos:changeNote>
<dct:publisher>
<xsl:value-of select="$publisher"/>
</dct:publisher>
<rdfs:comment>This version is automatically generated from <xsl:value-of select="tokenize(base-uri(.), '/')[last()]"/> on <xsl:value-of select="format-date(current-date(),'[Y0001]-[M01]-[D01]')"/>
</rdfs:comment>
<xsl:for-each select="$seeAlsoResources">
<rdfs:seeAlso rdf:resource="{.}"/>
</xsl:for-each>
<dct:created rdf:datatype="http://www.w3.org/2001/XMLSchema#date"><xsl:value-of select="$createdDate"/></dct:created>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date"><xsl:value-of select="$issuedDate"/></dct:issued>
<owl:versionInfo><xsl:value-of select="$versionInfo"/></owl:versionInfo>
<owl:incompatibleWith><xsl:value-of select="$incompatibleWith"/></owl:incompatibleWith>
Expand Down
10 changes: 6 additions & 4 deletions src/owl-restrictions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,19 @@
<dct:title xml:lang="en">
<xsl:value-of select="$ontologyTitle"/>
</dct:title>
<dct:publisher>
<xsl:value-of select="$publisher"/>
</dct:publisher>
<dct:description xml:lang="en">
<xsl:value-of select="$ontologyDescription"/>
</dct:description>
<dct:abstract><xsl:value-of select="$abstractResctrictions"/></dct:abstract>
<skos:changeNote>This version is automatically generated from <xsl:value-of select="tokenize(base-uri(.), '/')[last()]"/> on
<rdfs:comment>This version is automatically generated from <xsl:value-of select="tokenize(base-uri(.), '/')[last()]"/> on
<xsl:value-of select="format-date(current-date(),'[Y0001]-[M01]-[D01]')"/>
</skos:changeNote>
</rdfs:comment>
<xsl:for-each select="$seeAlsoResources">
<rdfs:seeAlso rdf:resource="{.}"/>
</xsl:for-each>
<dct:created rdf:datatype="http://www.w3.org/2001/XMLSchema#date"><xsl:value-of select="$createdDate"/></dct:created>

<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date"><xsl:value-of select="$issuedDate"/></dct:issued>
<owl:versionInfo><xsl:value-of select="$versionInfo"/></owl:versionInfo>
<owl:incompatibleWith><xsl:value-of select="$incompatibleWith"/></owl:incompatibleWith>
Expand Down
12 changes: 7 additions & 5 deletions src/shacl-shapes.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,19 @@
<dct:title xml:lang="en">
<xsl:value-of select="$ontologyTitle"/>
</dct:title>
<dct:publisher>
<xsl:value-of select="$publisher"/>
</dct:publisher>
<dct:description xml:lang="en">
<xsl:value-of select="$ontologyDescription"/>
</dct:description>
<dct:abstract><xsl:value-of select="$abstractShapes"/></dct:abstract>
<skos:changeNote>This version is automatically generated from <xsl:value-of select="tokenize(base-uri(.), '/')[last()]"/> on
<xsl:value-of select="format-date(current-date(),'[Y0001]-[M01]-[D01]')"/>
</skos:changeNote>
<rdfs:comment>This version is automatically generated from <xsl:value-of
select="tokenize(base-uri(.), '/')[last()]"/> on <xsl:value-of
select="format-date(current-date(), '[Y0001]-[M01]-[D01]')"/>
</rdfs:comment>
<xsl:for-each select="$seeAlsoResources">
<rdfs:seeAlso rdf:resource="{.}"/>
</xsl:for-each>
<dct:created rdf:datatype="http://www.w3.org/2001/XMLSchema#date"><xsl:value-of select="$createdDate"/></dct:created>
<dct:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date"><xsl:value-of select="$issuedDate"/></dct:issued>
<owl:versionInfo><xsl:value-of select="$versionInfo"/></owl:versionInfo>
<owl:incompatibleWith><xsl:value-of select="$incompatibleWith"/></owl:incompatibleWith>
Expand Down
15 changes: 4 additions & 11 deletions test/ePO-default-config/config-parameters.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,13 @@
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 -->
Expand All @@ -139,15 +131,16 @@
<!-- vann:preferredNamespacePrefix -->
<xsl:variable name="preferredNamespacePrefix" select="'epo'"/>


<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'"/>


<!-- dct:publisher-->
<xsl:variable name="publisher" select="'http://publications.europa.eu/resource/authority/corporate-body/PUBL'"/>



Expand Down

0 comments on commit bc346ba

Please sign in to comment.