src/acdhOeaw/fedora/FedoraResource.php
public function getMetadata(bool $force = false): Resource {
        $this->loadMetadata($force);
        return $this->metadata->copy();
    }
public function getMetadata(bool $force = false): Resource {
        $this->loadMetadata($force);
        return $this->metadata->copy();
    }
public function getMetadata ( bool $ force = false ) : Resource { $ this -> loadMetadata ( $ force ) ; return $ this -> metadata -> copy ( ) ; }
Returns resource metadata.

Fetches them from the Fedora if they were not fetched already.

A deep copy of metadata is returned meaning adjusting the returned object
does not automatically affect the resource metadata.
Use the setMetadata() method to write back the changes you made.

@param bool $force enforce fetch from Fedora
(when you want to make sure metadata are in line with ones in the Fedora
or e.g. reset them back to their current state in Fedora)
@return \EasyRdf\Resource
@see updateMetadata()
@see setMetadata()
Returns resource metadata .