Skip to content

Commit 3a887ee

Browse files
committed
set dcterms:Jurisdiction (in addition to cc:jurisdiction)
1 parent ddf3fd4 commit 3a887ee

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

legal_tools/rdf_generator.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def generate_rdf_file(
8888
)
8989
)
9090
)
91-
g.add((license_uri, CC.jurisdiction, jurisdiction_uri))
91+
g.set((license_uri, CC.jurisdiction, jurisdiction_uri))
9292
else:
9393
logo_prefix = f"{FOAF_LOGO_URL}{tool_obj.unit}/{tool_obj.version}"
9494
logo_url_large = f"{logo_prefix}/{LARGE_LOGO}"
@@ -167,6 +167,13 @@ def generate_rdf_file(
167167
creator = URIRef(convert_https_to_http(tool_obj.creator_url))
168168
g.set((license_uri, DCTERMS.creator, creator))
169169

170+
# set dcterms:Jurisdiction
171+
if tool_obj.jurisdiction_code:
172+
data = Literal(
173+
tool_obj.jurisdiction_code, datatype=DCTERMS.ISO3166
174+
)
175+
g.set((license_uri, DCTERMS.Jurisdiction, data))
176+
170177
# set dcterms:hasVersion
171178
version = Literal(f"{tool_obj.version}")
172179
g.set((license_uri, DCTERMS.hasVersion, version))

0 commit comments

Comments
 (0)