public function setDocument($document)
{
if ($document instanceof Document\Hardlink\Wrapper\WrapperInterface) {
$this->setDocumentId($document->getHardlinkSource()->getId());
$this->setDocumentType($document->getHardlinkSource()->getType());
$this->setRealFullPath($document->getHardlinkSource()->getRealFullPath());
} elseif ($document instanceof Document) {
$this->setDocumentId($document->getId());
$this->setDocumentType($document->getType());
$this->setRealFullPath($document->getRealFullPath());
}
return $this;
}