Skip to content

Commit e77c5ca

Browse files
committed
Add top concepts
1 parent ad559ab commit e77c5ca

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ogc/bblocks/register-context.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
transform:
22
# Add @type from itemClass with initial capital letter
33
- |
4+
.baseURL as $CS_URI |
45
.bblocks |= map(
56
."@id" = "bblocks://\(.itemIdentifier)"
67
| ."@type" = [("bblocks:" + (.itemClass[:1]|ascii_upcase) + .itemClass[1:]), "skos:Concept", "dcat:Dataset"]
@@ -10,6 +11,7 @@ transform:
1011
| .schema |= (if length > 0 then to_entries | map({ "prof:hasArtifact": .value , "prof:hasRole": "role:schema", "dct:format": .key }) else null end)
1112
| .dependsOn |= if length > 0 then map("bblocks://\(.)") else null end
1213
| .profileOf |= if length > 0 then map("bblocks://\(.)") else null end
14+
| if $CS_URI then ."skos:topConceptOf" = {"@id": $CS_URI} end
1315
)
1416
# Add ConceptScheme
1517
- |
@@ -22,7 +24,8 @@ transform:
2224
"@type": ["skos:ConceptScheme", "dcat:Catalog"],
2325
"name": "Building Blocks - \(.name)",
2426
"skos:prefLabel": "Building Blocks - \(.name)",
25-
"hasConcepts": .bblocks
27+
"hasConcepts": .bblocks,
28+
"skos:hasTopConcept": (.bblocks | map({"@id": "bblocks://\(.itemIdentifier)"}))
2629
} | del(.bblocks) end
2730
- '{ "@context": { "@base": ($baseUrl // "https://www.opengis.net/def/bblocks/") } } + .'
2831

@@ -97,7 +100,9 @@ context:
97100
'@index': dct:identifier
98101
'@context':
99102
mediatype: dct:format
100-
url: rdfs:isDefinedBy
103+
url:
104+
'@id': rdfs:isDefinedBy
105+
'@type': '@id'
101106
rdfs:isDefinedBy:
102107
'@type': '@id'
103108
hasConcepts:

0 commit comments

Comments
 (0)