public function link($urnOrRelType, $urn = null)
    {
        $relTypeKeys = array_keys(get_object_vars($this->links));
        if ($urn) {
            $relTypeKeys = [$urnOrRelType];
        } else {
            $urn = $urnOrRelType;
        }

        // look for a matching urn within the links
        foreach ($relTypeKeys as $relType) {
            $links = $this->links($relType);
            $matching = $links->rel($urn);
            if ($matching) {
                return $matching;
            }
        }
        return null;
    }