public function save(string $location = null): FedoraResource {
        if ($this->uri != '') {
            $meta = $this->getMetadata();
            $meta->merge($this->getAclMetadata(), [RC::idProp()]);
            $this->setMetadata($meta);
            $this->updateMetadata();
        } else {
            if ($location === null) {
                throw new InvalidArgumentException('location parameter missing');
            }

            $meta      = $this->getAclMetadata();
            $meta->addResource(RC::idProp(), 'https://id.acdh.oeaw.ac.at/acl/' . microtime(true) . rand(0, 1000));
            $res       = $this->fedora->createResource($meta, '', $location, 'POST');
            $this->uri = $res->getUri();
            $this->fedora->getCache()->delete($res);
            $this->fedora->getCache()->add($this);
        }
        return $this;
    }