class ReaderTGFF {

	protected void addCommunication(String line, String suffix, double period,
			Application<Task, Dependency> application) {

		String[] entries = line.trim().split(SEPARATOR);
		assert entries.length == 8 : "tgff-file \"ARC\": wrong number of entries in line";

		String id = entries[1];
		String tgffType = entries[7];

		Communication comm = new Communication(id);
		comm.setAttribute(PERIOD, period);
		comm.setAttribute(TGFF_TYPE, tgffType);

		if (messageSizes != null && messageSizes.containsKey(tgffType)) {
			comm.setAttribute(MSG_SIZE, messageSizes.get(entries[7]));
		}

		Task t1 = application.getVertex(entries[3] + suffix);
		Task t2 = application.getVertex(entries[5] + suffix);

		application.addVertex(comm);
		application.addEdge(new Dependency(id + "_0"), t1, comm);
		application.addEdge(new Dependency(id + "_1"), comm, t2);
	}

}