public void setEntityToBeSplitted(String entityName) {
		System.out.println("SPLIT: " + entityName);
		ErdNode n = entityTypes.get(entityName);
		String tableName = n.getTableName();
		ErdNodeType ntype = n.getErdNodeType();
		List<ColumnDetail> att = n.getAttributes();

		// create 2 new entities
		String new1S = tableName + "1";
		String new2S = tableName + "2";
		ErdNode new1 = new ErdNode(new1S, tableName, ntype, att);
		ErdNode new2 = new ErdNode(new2S, tableName, ntype, att);
		
		System.out.println("CREATE: " + new1.getTableName());
		System.out.println("CREATE: " + new2.getTableName());

		ErdNode relInCycle1;
		ErdNode relInCycle2;
		
		//if (index == -1) {
		
			Vector<ErdNode> rel = n.getLinks();
			System.out.println(rel.size());
			relInCycle1 = rel.get(0);
			relInCycle2 = rel.get(1);
//		} else {
//			// change the link of the relationship in cycle
//			relInCycle1 = relationshipTypes.get(relationshipInCycle.get(
//					index).get(0));
//			relInCycle2 = relationshipTypes.get(relationshipInCycle.get(
//					index).get(1));
//		}
			
		System.out.println("RELATION IN THE CYCLE 1: " + relInCycle1.getTableName());
		System.out.println("RELATION IN THE CYCLE 2: " + relInCycle2.getTableName());
		try {
			// remove links from relationship in cycle. connect them to the new entities
			relInCycle1.removeLink(n);
			relInCycle2.removeLink(n);
			// remove links from n that are connected to relationship in cycle.
			n.removeLink(relInCycle1);
			n.removeLink(relInCycle2);
			//connect them to the new entities
			relInCycle1.addLink(new1);
			relInCycle2.addLink(new2);
			// add link from the new entities to the relationship
			new1.addLink(relInCycle1);
			new2.addLink(relInCycle2);
			// add link from the parent to new entities
			n.addSpecialLink(new1);
			n.addSpecialLink(new2);
			// put the new entities to the map
			entityTypes.put(new1S, new1);
			entityTypes.put(new2S, new2);
		} catch (MainException me) {
			System.out.println(me.getMessage());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}