public function buildRelationship(array $relInfo)
    {
        $relationship = new Relationship($relInfo['start'], $relInfo['end'], $relInfo['type']);
        $relationship->setCardinality($relInfo['mode']);
        if (isset($relInfo['properties'])) {
            foreach ($relInfo['properties'] as $name => $info) {
                $property = $this->buildRelationshipProperty($name, $info);
                $relationship->addProperty($property);
            }
        }

        return $relationship;
    }