Skip to content

Commit

Permalink
fix(ui): minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jgeluk committed Aug 18, 2024
1 parent 9f4ad1b commit c20a316
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/data-lineage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ WHERE
If you wish to track lineage at a more granular level,
you can also use PROV (https://www.w3.org/TR/prov-o/) at the dataset level.

```ttl
```turtle
dap:atnf-P366-2003SEPT
rdf:type dcat:Dataset ;
dcterms:bibliographicCitation "Burgay, M; McLaughlin, M; Kramer, M; Lyne, A; Joshi, B; Pearce, G; D'Amico, N; Possenti, A; Manchester, R; Camilo, F (2017): Parkes observations for project P366 semester 2003SEPT. v1. CSIRO. Data Collection. https://doi.org/10.4225/08/598dc08d07bb7" ;
Expand Down
4 changes: 2 additions & 2 deletions examples/data-rights/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Policies and their permitted or prohibited actions can be described on different
Sophisticated engines should interpret and enforce the odrl policies on the appropriate level eg.:

```turtle
examplePolicyA odrl:targets exampleProduct:ProductA.
examplePolicyB odrl:targets exampleDataset:DatasetA1
examplePolicyA odrl:targets exampleProduct:ProductA .
examplePolicyB odrl:targets exampleDataset:DatasetA1 .
```

An example of a Policy follows, that describes permission to distribute the data only inside a specific region:
Expand Down
10 changes: 5 additions & 5 deletions spec-generator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import shutil
import os
import re
from dataclasses import dataclass, field, asdict
from dataclasses import dataclass, field
from typing import List

import jinja2
Expand Down Expand Up @@ -110,7 +110,7 @@ def add_to_context(uri,classes):
classes[uri] = class_obj
fill_object(class_obj)
for s, p, o in g.triples((None, RDFS.subClassOf, uri)):
add_to_context(s)
add_to_context(s) # TODO: second parameter is missing

description = g.value(URIRef(uri), DC.description)

Expand All @@ -136,18 +136,18 @@ def add_to_context(uri,classes):
o = str(path[2])
property_name = short_name(o)
property_name = property_name.replace(f'{name}-', '')
rdf_property = RdfProperty(name=property_name, uri=o)
rdf_property = RdfProperty(name=property_name, uri=o) # TODO: uri: Expected URIRef, got 'Union[str, Node]' instead
rdf_property.description = description
class_obj.properties.append(rdf_property)
rdf_property.__dict__["domain"] = class_obj.targetClass
rdf_property.__dict__["domain"] = class_obj.targetClass # TODO: targetClass is not an attribute of RdfClass
rdf_property.__dict__["domain_short"] = g.namespace_manager.normalizeUri(class_obj.targetClass)
rdf_property.__dict__["short_uri"] = g.namespace_manager.normalizeUri(o)

for s1, p1, o1 in g.triples((property_shape_uri, None, None)):
p1_name = short_name(p1)
if p1_name == 'class' or p1_name == 'datatype' or p1_name == 'range':
rdf_property.__dict__["range"] = o1
rdf_property.__dict__["range_short"] = g.namespace_manager.normalizeUri(o1)
rdf_property.__dict__["range_short"] = g.namespace_manager.normalizeUri(o1) # TODO: expected type 'str', got 'Node' instead
if p1_name == 'path':
try:
label = g.value(o1, RDFS.label)
Expand Down

0 comments on commit c20a316

Please sign in to comment.