/** * converts a Resource,Blanknode,Literal into a ResResource, ResProperty, or ResLiteral * * @param object Node $node * @param boolean $isProperty * @return object ResResource / ResProperty / ResLiteral * @access private * @throws phpErrpr */ function _node2ResNode($node, $isProperty = false) { if (is_a($node, 'Literal')) { $return = new ResLiteral($node->getLabel(), $node->getLanguage()); $return->setDatatype($node->getDatatype()); $return->setAssociatedModel($this); return $return; } if (is_a($node, 'Resource')) { if ($isProperty) { $res = new ResProperty($node->getLabel()); } else { $res = new ResResource($node->getLabel()); } $res->setAssociatedModel($this); if (is_a($node, 'Blanknode')) { $res->setIsAnon(true); } return $res; } }