-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For attribute types allow curies referencing arbitrary vocabularies a…
…nd attributes without types. Initial DCAT example
- Loading branch information
1 parent
5dbab78
commit c321fa9
Showing
16 changed files
with
510 additions
and
78 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
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,4 +1,4 @@ | ||
ThisBuild / version := "0.1.0-SNAPSHOT" | ||
ThisBuild / version := "v0.0.2" | ||
|
||
ThisBuild / scalaVersion := "3.2.2" | ||
|
||
|
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,7 @@ | ||
ClassName Curie Name ClassOrPrimitiveType MinMultiplicity MaxMultiplicity Definition | ||
Relationship hadRole dcat:Relationship The function of an entity or agent with respect to another entity or resource | ||
Relationship dct:relation dct:relation SHOULD be used where the nature of the relationship between a cataloged item and related resources is not known. A more specific sub-property SHOULD be used if the nature of the relationship of the link is known. The property dcat:distribution SHOULD be used to link from a dcat:Dataset to a representation of the dataset, described as a dcat:Distribution | ||
Resource contactPoint vcard:Kind Relevant contact information for the cataloged resource | ||
Resource keyword rdfs:Literal A keyword or tag describing the resource. | ||
Resource landingPage foaf:Document A Web page that can be navigated to in a Web browser to gain access to the catalog, a dataset, its distributions and/or additional information. | ||
Catalog catalog Catalog |
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,7 @@ | ||
Curie Name Definition ParentNames | ||
Resource Resource published or curated by a single agent. | ||
Dataset A collection of data, published or curated by a single agent, and available for access or download in one or more representations. Resource | ||
Catalog A curated collection of metadata about resources (e.g., datasets and data services in the context of a data catalog) Dataset | ||
DataService A collection of operations that provides access to one or more datasets or data processing functions. Resource | ||
CatalogRecord Represents a metadata item in the catalog, primarily concerning the registration information, such as who added the item and when | ||
Relationship An association class for attaching additional information to a relationship between DCAT Resources. |
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,15 @@ | ||
# Instruction to generate the DCAT v2 ontology | ||
|
||
``` | ||
java -jar $uml2semantics/target/scala-3.2.2/uml2semantics.jar \ | ||
-c "$uml2semantics/examples/dcat2/DCATv2 - Classes.tsv" \ | ||
-a "$uml2semantics/examples/dcat2/DCATv2 - Attributes.tsv" \ | ||
-o "$uml2semantics/examples/dcat2/dcat-v2.rdf" \ | ||
-p "dcat:http://www.w3.org/ns/dcat#" \ | ||
-i "http://www.w3.org/ns/dcat#v2" \ | ||
-x "foaf:http://xmlns.com/foaf/0.1/,vcard:http://www.w3.org/2006/vcard/ns#,dct:http://purl.org/dc/terms/,dctype:http://purl.org/dc/dcmitype/,dct:http://purl.org/dc/terms/,prov:http://www.w3.org/ns/prov#,skos:http://www.w3.org/2004/02/skos/core#,sdo:http://schema.org/" | ||
``` | ||
|
||
Note that using option `-x` we specify all prefixes that are used in the UML class diagram. |
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,242 @@ | ||
<?xml version="1.0"?> | ||
<rdf:RDF xmlns="http://www.w3.org/ns/dcat#v2#" | ||
xml:base="http://www.w3.org/ns/dcat#v2" | ||
xmlns:owl="http://www.w3.org/2002/07/owl#" | ||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
xmlns:xml="http://www.w3.org/XML/1998/namespace" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema#" | ||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> | ||
<owl:Ontology rdf:about="http://www.w3.org/ns/dcat#v2"/> | ||
|
||
|
||
|
||
<!-- | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Object Properties | ||
// | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
--> | ||
|
||
|
||
|
||
|
||
|
||
<!-- http://www.w3.org/ns/dcat#Catalog/catalog --> | ||
|
||
|
||
<owl:ObjectProperty rdf:about="http://www.w3.org/ns/dcat#Catalog/catalog"> | ||
<rdfs:domain rdf:resource="http://www.w3.org/ns/dcat#Catalog"/> | ||
<rdfs:range rdf:resource="http://www.w3.org/ns/dcat#Catalog"/> | ||
<rdfs:label>catalog</rdfs:label> | ||
</owl:ObjectProperty> | ||
|
||
|
||
|
||
<!-- http://www.w3.org/ns/dcat#Relationship/hadRole --> | ||
|
||
|
||
<owl:ObjectProperty rdf:about="http://www.w3.org/ns/dcat#Relationship/hadRole"> | ||
<rdfs:domain rdf:resource="http://www.w3.org/ns/dcat#Relationship"/> | ||
<rdfs:range rdf:resource="http://www.w3.org/ns/dcat#Relationship"/> | ||
<rdfs:comment>The function of an entity or agent with respect to another entity or resource</rdfs:comment> | ||
<rdfs:label>hadRole</rdfs:label> | ||
</owl:ObjectProperty> | ||
|
||
|
||
|
||
<!-- http://www.w3.org/ns/dcat#Relationship/dct:relation --> | ||
|
||
|
||
<owl:ObjectProperty rdf:about="http://www.w3.org/ns/dcat#Relationship/dct:relation"> | ||
<rdfs:domain rdf:resource="http://www.w3.org/ns/dcat#Relationship"/> | ||
<rdfs:comment>dct:relation SHOULD be used where the nature of the relationship between a cataloged item and related resources is not known. A more specific sub-property SHOULD be used if the nature of the relationship of the link is known. The property dcat:distribution SHOULD be used to link from a dcat:Dataset to a representation of the dataset, described as a dcat:Distribution</rdfs:comment> | ||
<rdfs:label>dct:relation</rdfs:label> | ||
</owl:ObjectProperty> | ||
|
||
|
||
|
||
<!-- http://www.w3.org/ns/dcat#Resource/contactPoint --> | ||
|
||
|
||
<owl:ObjectProperty rdf:about="http://www.w3.org/ns/dcat#Resource/contactPoint"> | ||
<rdfs:domain rdf:resource="http://www.w3.org/ns/dcat#Resource"/> | ||
<rdfs:range rdf:resource="http://www.w3.org/2006/vcard/ns#Kind"/> | ||
<rdfs:comment>Relevant contact information for the cataloged resource</rdfs:comment> | ||
<rdfs:label>contactPoint</rdfs:label> | ||
</owl:ObjectProperty> | ||
|
||
|
||
|
||
<!-- http://www.w3.org/ns/dcat#Resource/landingPage --> | ||
|
||
|
||
<owl:ObjectProperty rdf:about="http://www.w3.org/ns/dcat#Resource/landingPage"> | ||
<rdfs:domain rdf:resource="http://www.w3.org/ns/dcat#Resource"/> | ||
<rdfs:range rdf:resource="http://xmlns.com/foaf/0.1/Document"/> | ||
<rdfs:comment>A Web page that can be navigated to in a Web browser to gain access to the catalog, a dataset, its distributions and/or additional information.</rdfs:comment> | ||
<rdfs:label>landingPage</rdfs:label> | ||
</owl:ObjectProperty> | ||
|
||
|
||
|
||
<!-- | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Data properties | ||
// | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
--> | ||
|
||
|
||
|
||
|
||
|
||
<!-- http://www.w3.org/ns/dcat#Resource/keyword --> | ||
|
||
|
||
<owl:DatatypeProperty rdf:about="http://www.w3.org/ns/dcat#Resource/keyword"> | ||
<rdfs:domain rdf:resource="http://www.w3.org/ns/dcat#Resource"/> | ||
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> | ||
<rdfs:comment>A keyword or tag describing the resource.</rdfs:comment> | ||
<rdfs:label>keyword</rdfs:label> | ||
</owl:DatatypeProperty> | ||
|
||
|
||
|
||
<!-- | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Classes | ||
// | ||
/////////////////////////////////////////////////////////////////////////////////////// | ||
--> | ||
|
||
|
||
|
||
|
||
|
||
<!-- http://www.w3.org/2006/vcard/ns#Kind --> | ||
|
||
|
||
<owl:Class rdf:about="http://www.w3.org/2006/vcard/ns#Kind"/> | ||
|
||
|
||
|
||
<!-- http://www.w3.org/ns/dcat#Catalog --> | ||
|
||
|
||
<owl:Class rdf:about="http://www.w3.org/ns/dcat#Catalog"> | ||
<rdfs:subClassOf rdf:resource="http://www.w3.org/ns/dcat#Dataset"/> | ||
<rdfs:subClassOf> | ||
<owl:Restriction> | ||
<owl:onProperty rdf:resource="http://www.w3.org/ns/dcat#Catalog/catalog"/> | ||
<owl:qualifiedCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:qualifiedCardinality> | ||
<owl:onClass rdf:resource="http://www.w3.org/ns/dcat#Catalog"/> | ||
</owl:Restriction> | ||
</rdfs:subClassOf> | ||
<rdfs:comment>A curated collection of metadata about resources (e.g., datasets and data services in the context of a data catalog)</rdfs:comment> | ||
<rdfs:label>Catalog</rdfs:label> | ||
</owl:Class> | ||
|
||
|
||
|
||
<!-- http://www.w3.org/ns/dcat#CatalogRecord --> | ||
|
||
|
||
<owl:Class rdf:about="http://www.w3.org/ns/dcat#CatalogRecord"> | ||
<rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/> | ||
<rdfs:comment>Represents a metadata item in the catalog, primarily concerning the registration information, such as who added the item and when</rdfs:comment> | ||
<rdfs:label>CatalogRecord</rdfs:label> | ||
</owl:Class> | ||
|
||
|
||
|
||
<!-- http://www.w3.org/ns/dcat#DataService --> | ||
|
||
|
||
<owl:Class rdf:about="http://www.w3.org/ns/dcat#DataService"> | ||
<rdfs:subClassOf rdf:resource="http://www.w3.org/ns/dcat#Resource"/> | ||
<rdfs:comment>A collection of operations that provides access to one or more datasets or data processing functions.</rdfs:comment> | ||
<rdfs:label>DataService</rdfs:label> | ||
</owl:Class> | ||
|
||
|
||
|
||
<!-- http://www.w3.org/ns/dcat#Dataset --> | ||
|
||
|
||
<owl:Class rdf:about="http://www.w3.org/ns/dcat#Dataset"> | ||
<rdfs:subClassOf rdf:resource="http://www.w3.org/ns/dcat#Resource"/> | ||
<rdfs:comment>A collection of data, published or curated by a single agent, and available for access or download in one or more representations.</rdfs:comment> | ||
<rdfs:label>Dataset</rdfs:label> | ||
</owl:Class> | ||
|
||
|
||
|
||
<!-- http://www.w3.org/ns/dcat#Relationship --> | ||
|
||
|
||
<owl:Class rdf:about="http://www.w3.org/ns/dcat#Relationship"> | ||
<rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/> | ||
<rdfs:subClassOf> | ||
<owl:Restriction> | ||
<owl:onProperty rdf:resource="http://www.w3.org/ns/dcat#Relationship/hadRole"/> | ||
<owl:qualifiedCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:qualifiedCardinality> | ||
<owl:onClass rdf:resource="http://www.w3.org/ns/dcat#Relationship"/> | ||
</owl:Restriction> | ||
</rdfs:subClassOf> | ||
<rdfs:subClassOf> | ||
<owl:Restriction> | ||
<owl:onProperty rdf:resource="http://www.w3.org/ns/dcat#Relationship/dct:relation"/> | ||
<owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:cardinality> | ||
</owl:Restriction> | ||
</rdfs:subClassOf> | ||
<rdfs:comment>An association class for attaching additional information to a relationship between DCAT Resources.</rdfs:comment> | ||
<rdfs:label>Relationship</rdfs:label> | ||
</owl:Class> | ||
|
||
|
||
|
||
<!-- http://www.w3.org/ns/dcat#Resource --> | ||
|
||
|
||
<owl:Class rdf:about="http://www.w3.org/ns/dcat#Resource"> | ||
<rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/> | ||
<rdfs:subClassOf> | ||
<owl:Restriction> | ||
<owl:onProperty rdf:resource="http://www.w3.org/ns/dcat#Resource/contactPoint"/> | ||
<owl:qualifiedCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:qualifiedCardinality> | ||
<owl:onClass rdf:resource="http://www.w3.org/2006/vcard/ns#Kind"/> | ||
</owl:Restriction> | ||
</rdfs:subClassOf> | ||
<rdfs:subClassOf> | ||
<owl:Restriction> | ||
<owl:onProperty rdf:resource="http://www.w3.org/ns/dcat#Resource/landingPage"/> | ||
<owl:qualifiedCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:qualifiedCardinality> | ||
<owl:onClass rdf:resource="http://xmlns.com/foaf/0.1/Document"/> | ||
</owl:Restriction> | ||
</rdfs:subClassOf> | ||
<rdfs:subClassOf> | ||
<owl:Restriction> | ||
<owl:onProperty rdf:resource="http://www.w3.org/ns/dcat#Resource/keyword"/> | ||
<owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:cardinality> | ||
</owl:Restriction> | ||
</rdfs:subClassOf> | ||
<rdfs:comment>Resource published or curated by a single agent.</rdfs:comment> | ||
<rdfs:label>Resource</rdfs:label> | ||
</owl:Class> | ||
|
||
|
||
|
||
<!-- http://xmlns.com/foaf/0.1/Document --> | ||
|
||
|
||
<owl:Class rdf:about="http://xmlns.com/foaf/0.1/Document"/> | ||
</rdf:RDF> | ||
|
||
|
||
|
||
<!-- Generated by the OWL API (version 5.5.0.2023-01-14T12:41:38Z) https://github.com/owlcs/owlapi/ --> | ||
|
||
|
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,7 @@ | ||
java -jar $uml2semantics/target/scala-3.2.2/uml2semantics.jar \ | ||
-c "$uml2semantics/examples/dcat2/DCATv2 - Classes.tsv" \ | ||
-a "$uml2semantics/examples/dcat2/DCATv2 - Attributes.tsv" \ | ||
-o "$uml2semantics/examples/dcat2/dcat-v2.rdf" \ | ||
-p "dcat:http://www.w3.org/ns/dcat#" \ | ||
-i "http://www.w3.org/ns/dcat#v2" \ | ||
-x "foaf:http://xmlns.com/foaf/0.1/,vcard:http://www.w3.org/2006/vcard/ns#,dct:http://purl.org/dc/terms/,dctype:http://purl.org/dc/dcmitype/,dct:http://purl.org/dc/terms/,prov:http://www.w3.org/ns/prov#,skos:http://www.w3.org/2004/02/skos/core#,sdo:http://schema.org/" |
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,11 @@ | ||
# Instruction to generate the Employer ontology | ||
``` | ||
java -jar $uml2semantics/target/scala-3.2.2/uml2semantics.jar \ | ||
-c "$uml2semantics/examples/employer/Employer - Classes.tsv" \ | ||
-a "$uml2semantics/examples/employer/Employer - Attributes.tsv" \ | ||
-o "$uml2semantics/examples/employer/employer.rdf" \ | ||
-p "emp:http://uml2semantics.org/examples/employer#" \ | ||
-i "http://uml2semantics.org/examples/employer/v.0.1" | ||
``` |
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.