public function md5()
    {

        if( isset( $this->filePath ) ) {

            return md5_file( $this->filePath );

        } elseif( $this->oid ) {

            $query = new Query(
                "SELECT common.md5( %oid:oid|cast% );",
                array(
                    'oid' => $this->oid
                )
            );

            // execute the query and return the result
            return $this->oid->pg->query( $query )->fetch( Result::FETCH_SINGLE );

        }

        throw \LogicException("Shouldn't ever get tripped");

    }