public static void main(String[] args) throws IOException
	{
		List<String> list = new ArrayList<String>();
		File file = new File("C:\\Users\\songyalong\\Desktop\\data2.txt");
		FileReader fileReader = new FileReader(file);
		BufferedReader bufferedReader  = new BufferedReader(fileReader);
		String s = "";
		while((s=bufferedReader.readLine())!=null){
			list.add(s);
		}
		Map<String,String> map = new HashMap<String,String>();
		for(int i=0;i<list.size()-1;i++){
			String entityO = list.get(i);
			String entityOne = entityO.substring(0,entityO.indexOf(":"));
			String entityOneAttrs = entityO.substring(entityO.indexOf(":")+1);
			for(int j=i+1;j<list.size();j++){
				String entityT = list.get(j);
				String entityTwo = entityT.substring(0,entityT.indexOf(":"));
				String entityTwoAttrs = entityT.substring(entityT.indexOf(":")+1);
				if(true){
					if(!map.containsKey(entityO))
						map.put(entityO, entityO);
					if(!map.containsKey(entityT))
						map.put(entityT, entityT);
					if(!(find(entityO,map).equals(find(entityT,map)))){
						if(isSame(entityOneAttrs,entityTwoAttrs)){
							setMerge(entityO,entityT,map);
						}
					}
				}
			}
		}
		
		Iterator<String> keys = map.keySet().iterator();
		while(keys.hasNext()){
			String key = keys.next();
			String value = map.get(key);
			System.out.println("key="+key);
			System.out.println("value="+value);
		}
		
	}//main