@Override
	public Node visitRelation(ISet setValue) throws GraphDbMappingException {		
		if (setValue.getElementType().getArity() != 2)
			return insertSet(setValue);
		Node referenceNode = graphDb.createNode();		
		referenceNode.setProperty(PropertyNames.TYPE, TypeNames.BINARY_RELATION);
		Map<IValue, Node> currentNodes = new HashMap<IValue, Node>();
		for (IValue tuple : setValue) {
			IValue firstElement = ((ITuple)tuple).get(0);
			IValue secondElement = ((ITuple)tuple).get(1);			
			Node firstElementNode = null;
			if (!currentNodes.containsKey(firstElement)) {				
				firstElementNode = firstElement.accept(this);
				currentNodes.put(firstElement, firstElementNode);
				referenceNode.createRelationshipTo(firstElementNode, RelTypes.PART);
			}
			else
				firstElementNode = currentNodes.get(firstElement);
			if (!currentNodes.containsKey(secondElement)) {				
				Node secondElementNode = secondElement.accept(this);
				currentNodes.put(secondElement, secondElementNode);
				firstElementNode.createRelationshipTo(secondElementNode, RelTypes.TO);
			}
			else {
				Node secondElementNode = currentNodes.get(secondElement);
				firstElementNode.createRelationshipTo(secondElementNode, RelTypes.TO);
			}
		}
		return referenceNode;
	}