static private function checkProperty(string $property, Resource $res,
                                          Fedora $fedora): array {
        $uri = $res->getUri();
        $ret = array();
        try {
            $propDef = self::getPropertyDef($property, $fedora);

            if (!self::checkRangeDomain($res, $propDef->getDomain())) {
                $ret[] = new Error($uri, 'wrong domain', '', $property);
            }

            list($matchType, $wrongType) = $propDef->fetchValues($res);
            foreach ($wrongType as $i) {
                $ret[] = new Error($uri, 'wrong value type (literal/uri)', (string) $i, $property);
            }
            foreach ($matchType as $i) {
                if (!self::checkRangeDomain($i, $propDef->getRange())) {
                    $ret[] = new Error($uri, 'wrong range', $i->getUri(), $property);
                }
            }
        } catch (RuntimeException $e) {
            switch ($e->getCode()) {
                case 10:
                    $ret[] = new Error($uri, 'unknown property', '', $property);
                    break;
                case 11:
                    $ret[] = new Error($uri, 'wrongly defined property', '', $property);
                    break;
                case 12:
                    $ret[] = new Error($uri, 'wrongly defined property', '', $property);
                    break;
                default:
                    throw $e;
            }
        }
        return $ret;
    }