/**
* @param Frame $current
* @param Frame $previous
* @param ParserReplyInterface $reply
*
* @return void
*/
private function addRelationshipToIncluded(ParserReplyInterface $reply, Frame $current, Frame $previous)
{
$relationship = $current->getRelationship();
$parent = $previous->getResource();
switch ($reply->getReplyType()) {
case ParserReplyInterface::REPLY_TYPE_NULL_RESOURCE_STARTED:
$this->document->addNullRelationshipToIncluded($parent, $relationship);
break;
case ParserReplyInterface::REPLY_TYPE_EMPTY_RESOURCE_STARTED:
$this->document->addEmptyRelationshipToIncluded($parent, $relationship);
break;
case ParserReplyInterface::REPLY_TYPE_RESOURCE_STARTED:
$this->document->addRelationshipToIncluded($parent, $relationship, $current->getResource());
break;
}
}