Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ogc/bblocks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ def __init__(self, identifier: str, metadata_file: Path,
if 'dependsOn' in self.metadata:
self.metadata['dependsOn'] = [strip_bblocks_uri(d) for d in self.metadata['dependsOn']]

if 'hasFormat' in self.metadata:
self.metadata['hasFormat'] = [strip_bblocks_uri(d) for d in self.metadata['hasFormat']]

ep = self.metadata.get('extensionPoints')
if ep:
if 'baseBuildingBlock' in ep:
Expand Down Expand Up @@ -692,6 +695,8 @@ def load(self, metadata_url: str) -> tuple[list[str], str]:
bblock['register'] = self
if 'dependsOn' in bblock:
bblock['dependsOn'] = [strip_bblocks_uri(d) for d in bblock['dependsOn']]
if 'hasFormat' in bblock:
bblock['hasFormat'] = [strip_bblocks_uri(d) for d in bblock['hasFormat']]
if 'isProfileOf' in bblock:
v = bblock['isProfileOf']
bblock['isProfileOf'] = ([strip_bblocks_uri(i) for i in v]
Expand Down
6 changes: 6 additions & 0 deletions ogc/bblocks/register-context.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ context:
isProfileOf:
'@id': prof:isProfileOf
'@type': '@id'
hasFormat:
'@id': dct:hasFormat
'@type': '@id'
seeAlso:
'@id': rdfs:seeAlso
'@type': '@id'
tags: dcat:keyword
shaclShapes:
'@id': prof:hasResource
Expand Down
10 changes: 10 additions & 0 deletions ogc/bblocks/schemas/bblock.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,16 @@ properties:
type: array
items:
type: string
hasFormat:
description: >-
Identifiers of other Building Blocks that represent the same content as this one, but in
an alternate format (equivalent to Dublin Core's dcterms:hasFormat/isFormatOf). Unlike
isProfileOf, this does not imply one is a specialization of the other - they are siblings.
Symmetric: list the relation on every sibling that should be linked, since it is not
inferred automatically from the other side.
type: array
items:
type: string
requirementClasses:
description: URI(s) of requirement classes that can be used to validate this Building Block
type: array
Expand Down