diff --git a/ogc/bblocks/models.py b/ogc/bblocks/models.py index 7862af1..947acd6 100644 --- a/ogc/bblocks/models.py +++ b/ogc/bblocks/models.py @@ -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: @@ -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] diff --git a/ogc/bblocks/register-context.yaml b/ogc/bblocks/register-context.yaml index 9ed33e0..18698c5 100644 --- a/ogc/bblocks/register-context.yaml +++ b/ogc/bblocks/register-context.yaml @@ -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 diff --git a/ogc/bblocks/schemas/bblock.schema.yaml b/ogc/bblocks/schemas/bblock.schema.yaml index 9a01974..c763b62 100644 --- a/ogc/bblocks/schemas/bblock.schema.yaml +++ b/ogc/bblocks/schemas/bblock.schema.yaml @@ -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