class ReaderTGFF {

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

		String[] entries = line.trim().split(SEPARATOR);
		assert entries.length >= 4 : "tgff-file \"" + TASK + "\": wrong number of entries";

		String id = entries[1] + suffix;
		String type = entries[3];

		Task task = new Task(id);
		task.setAttribute(PERIOD, period);
		task.setAttribute(TGFF_TYPE, type);

		// for more efficient generation of resource type mappings
		if (tgffTypeMap.containsKey(type)) {
			List<Task> taskList = tgffTypeMap.get(type);
			taskList.add(task);
		} else {
			LinkedList<Task> taskList = new LinkedList<Task>();
			taskList.add(task);

			tgffTypeMap.put(type, taskList);
		}
		application.addVertex(task);
	}

}