class ReaderTGFF {

	protected void importTaskGraph(String name, Iterator<String> it, Application<Task, Dependency> application) {

		String id = CONNECTOR + name.split(SEPARATOR)[1];

		String line = "";
		double period = -1;

		while (!isClosing(line) && it.hasNext()) {

			line = it.next();
			if (!isComment(line)) {

				if (line.contains(PERIOD)) {
					period = Double.parseDouble(line.replace(PERIOD, "").replaceAll(SEPARATOR, ""));
				}

				else if (line.contains(TASK)) {
					addTask(line, id, period, application);
				}

				else if (line.contains(ARC)) {
					addCommunication(line, id, period, application);
				}

				else if (line.contains(HARD_DEADLINE)) {
					addDeadline(line, id, application, HARD_DEADLINE);
				} else if (line.contains(SOFT_DEADLINE)) {
					addDeadline(line, id, application, SOFT_DEADLINE);
				}
			}
		}
	}

}