public static function getURIs(\EasyRDF_Resource $subject, $predicate, $pattern = null)
    {
        $uris = [];
        foreach ($subject->allResources($predicate) as $object) {
            if (!$object->isBNode()) {
                $object = $object->getUri();
                if (!$pattern or preg_match($pattern, $object)) {
                    $uris[] = $object;
                }
            }
        }
        return $uris;
    }