id: https://w3id.org/fair-map/transforms/sssom-to-fair title: SSSOM to FAIR Mappings Schema Transformation description: |- Transforms an SSSOM Mapping Set to a FAIR Mappings Schema MappingSpecification. This preserves metadata elements while discarding the individual mappings, which have no equivalent in the FAIR Mappings Schema (which focuses on mapping specification metadata, not individual mapping assertions). Key transformations: - mapping_set_id → id - mapping_set_title → name - mapping_set_description → description - subject_source → subject_source (Source with id) - object_source → object_source (Source with id) - creator_id, creator_label → creator (one Agent per id and one per label) - Sets type to 'sssom' to indicate the mapping specification type author and reviewer are not populated. SSSOM has author_id and reviewer_id only on individual mappings, and the author or reviewer of one mapping is not thereby an author or reviewer of the whole mapping specification. prefixes: sssom: https://w3id.org/sssom/ fairmap: https://w3id.org/fair-map/ source_schema: name: sssom target_schema: name: fair-mappings-schema class_derivations: MappingSpecification: populated_from: "mapping set" description: |- Maps SSSOM Mapping Set metadata to MappingSpecification. Note: Individual mappings are not preserved as they represent actual mapping assertions, not metadata about the specification. slot_derivations: id: populated_from: mapping_set_id name: populated_from: mapping_set_title description: populated_from: mapping_set_description version: populated_from: mapping_set_version license: populated_from: license publication_date: populated_from: publication_date type: value: "sssom" mapping_method: populated_from: mapping_tool subject_source: expr: "{'id': subject_source} if subject_source else None" object_source: expr: "{'id': object_source} if object_source else None" # creator_id and creator_label are independent lists, not pairs: each id # and each label is its own Agent. The agent type is left unset, since # SSSOM gives no type. creator: expr: >- (([{'id': c} for c in creator_id] if creator_id else []) + ([{'name': n} for n in creator_label] if creator_label else [])) or None