Add a relationship to the source object corresponding to each of the relationships in `pkg_reader` with its target_part set to the actual target part in `parts`.
(pkg_reader, package, parts)
| 210 | |
| 211 | @staticmethod |
| 212 | def _unmarshal_relationships(pkg_reader, package, parts): |
| 213 | """Add a relationship to the source object corresponding to each of the |
| 214 | relationships in `pkg_reader` with its target_part set to the actual target part |
| 215 | in `parts`.""" |
| 216 | for source_uri, srel in pkg_reader.iter_srels(): |
| 217 | source = package if source_uri == "/" else parts[source_uri] |
| 218 | target = srel.target_ref if srel.is_external else parts[srel.target_partname] |
| 219 | source.load_rel(srel.reltype, target, srel.rId, srel.is_external) |