public function updateRms(bool $create = true, bool $uploadBinary = true,
                              string $path = '/'): FedoraResource {
        parent::updateRms($create, $uploadBinary, $path);

        $res      = $this->getResource(false, false);
        $chPath = $res->getUri(true) . '/';
        $children = [];
        foreach ($res->getChildren() as $i) {
            $children[$i->getUri(true)] = $i;
        }
        $validChildren = [];

        foreach ($this->params as $i) {
            $tmp             = $i->updateRms($create, $uploadBinary, $chPath);
            $validChildren[] = $tmp->getUri(true);
        }

        foreach ($this->matches as $i) {
            $tmp             = $i->updateRms($create, $uploadBinary, $chPath);
            $validChildren[] = $tmp->getUri(true);
        }

        $invalidChildren = array_diff(array_keys($children), $validChildren);
        foreach ($invalidChildren as $i) {
            $children[$i]->delete(true, true, false);
        }

        return $res;
    }