class ReaderTGFF {

	protected void importCore(String name, Iterator<String> it, ResourceTypes<Resource> resourceTypes) {

		// create resource (type)
		String id = "r" + name.split(SEPARATOR)[1];
		Resource res = new Resource(id);

		// first line contains attributes of resources
		String[] resAttributes;

		resAttributes = (it.next()).replace(COMMENT, "").trim().split(SEPARATOR);

		// second line contains attribute values
		String[] resValues = it.next().trim().split(SEPARATOR);

		assert resAttributes.length == resValues.length : "tgff-file \"" + CORE + "\": number of values is not "
				+ "equal to required number of resource attributes";

		for (int i = 0; i < resAttributes.length; i++) {
			res.setAttribute(resAttributes[i], Double.valueOf(resValues[i]));
		}
		resourceTypes.put(id, res);
	}

}