public function getValue()
{
$this->checkState();
if ($this->type === PropertyType::REFERENCE || $this->type === PropertyType::WEAKREFERENCE) {
return $this->getNode();
}
if ($this->type === PropertyType::BINARY) {
return $this->getBinary();
}
return $this->value;
}