Skip to content

Commit

Permalink
add label
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyseale committed Nov 22, 2023
1 parent 1b97afb commit 79cdc8e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
3 changes: 1 addition & 2 deletions code/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import jinja2
import rdflib
from jinja2 import Environment, PackageLoader, select_autoescape
from rdflib import Graph, URIRef, DCTERMS, SH
from rdflib.namespace import OWL, RDF, RDFS, XSD, DCAT
import json
Expand Down Expand Up @@ -77,7 +76,7 @@ def add_to_context(uri):
rdf_property = RdfProperty(name=short_name(s), uri=s)
class_obj.properties.append(rdf_property)
for s1, p1, o1 in g.triples((rdf_property.uri, None, None)):
rdf_property.__dict__[short_name(p1)] = o1
rdf_property.__dict__[short_name(p1)] = o1
elif OWL.ObjectProperty in types:
for s, p, o in g.triples((uri, RDFS.range, None)):
context[name] = {"@id": str(uri), "@type": str(o)}
Expand Down
13 changes: 9 additions & 4 deletions docs/respec/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,17 @@ <h2>Data Product (DPROD) Model</h2>
<UL>
<li> Data Mesh (<code>dcat:Catalog</code>) - The collection of Data Products </li>
<li> Data Product (<code>dprod:DataProduct</code>) - A data product may have input and output ports, code and metadata</li>
<li> Port (<code>dcat:DataService</code>) - A digital interface that provides access to a Dataset. The can be a HTTPEndpoint, a Database or a FileShare etc</li>
<li> Port (<code>dcat:DataService</code>) - A digital interface that provides access to a Dataset. The can be a HTTP URL, a Database or a FileShare etc</li>
<li> Distribution (<code>dcat:Distribution</code>) - A specific representation of a dataset (CSV, JSON, ADLS etc) with it own physical mode if needed</li>
<li> Dataset (<code>dcat:Dataset</code>) - A collection of data related that conforms to a logical model</li>
</ul>
</p>
<p>
Because DCAT DataService maps to the Data Mesh notion of a port we can declare a DataProduct by and specify and input and output ports. This allows user to connect their Data Products to Datasets and from there onto shared Ontologies.
DPROD maps to the Data Mesh notion of a port to the DCAT notion of a DataService, so we can declare a DataProduct by and specify and input and output ports and these ports are Dataservice. This allows user to connect their Data Products to Datasets and from there onto shared Ontologies.
</p>

<p>
In this example, the UK Bonds Data Product features an output port, which is a RESTful API. This API returns JSON data that conforms to the shared FIBO specification for callable bonds.
</p>

<pre id="eg12" class="example hljs json">
{
Expand All @@ -188,7 +190,7 @@ <h2>Data Product (DPROD) Model</h2>
"dcterms:format": "https://www.iana.org/assignments/media-types/application/json",
"belongsToDataset": {
"@type": "dcat:Dataset",
"dcat:conformsTo": "fibo:CallableBond"
"dcat:conformsTo": "https://spec.edmcouncil.org/fibo/ontology/SEC/Debt/Bonds/CallableBond"
}
}
}
Expand All @@ -212,6 +214,9 @@ <h2>{{prop.name}}</h2>
<table class="def propdef">
<tbody>
<tr><th>Identifier:</th> <td><code>dprod:{{prop.name}}</code></td></tr>
{% if prop.label is not none %}
<tr><th>Label:</th><td>{{prop.label}}</td></tr>
{% endif %}
<tr><th>Notes:</th><td>{{prop.description}}</td></tr>
<tr><th>Domain:</th><td>{{prop.domain}}</td></tr>
<tr><th>Range:</th><td>{{prop.range}}</td></tr>
Expand Down
3 changes: 2 additions & 1 deletion ontology/dprod/dprod.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ dprod:DataService-offersDistribution

dprod:offersDistribution
a rdfs:Property, owl:ObjectProperty ;
dc:description "he dataset distribution that is being offered through this Data Service"@en ;
dc:description "The dataset distribution that is being offered through this Data Service"@en ;
rdfs:isDefinedBy dprod:;
owl:inverseOf dcat:accessService;
rdfs:domain dcat:DataService;
Expand All @@ -300,6 +300,7 @@ dprod:dataProductOwner
rdfs:isDefinedBy dprod:;
rdfs:domain dprod:DataProduct;
rdfs:range dct:Agent;
rdfs:label "Data Product Owner" ;
.

dprod:inputPort
Expand Down

0 comments on commit 79cdc8e

Please sign in to comment.