class SpecificationTransformerTypeBased implements Transformer<T, S> {

	protected Mappings<Task, Resource> generateMappings(Mappings<Task, Resource> typeMappings,
			Architecture<Resource, Link> architecture) {

		Mappings<Task, Resource> mappings = new Mappings<Task, Resource>();

		// generate concrete mappings from type-mappings
		for (Mapping<Task, Resource> typeMapping : typeMappings) {

			Task source = typeMapping.getSource();
			Resource target = typeMapping.getTarget();

			Resource instance = architecture.getVertex("r" + CONNECTOR + target.getId());

			Mapping<Task, Resource> mapping = new Mapping<Task, Resource>(
					"m" + source.getId() + CONNECTOR + instance.getId(), source, instance);

			Attributes attributes = typeMapping.getAttributes();
			for (String key : attributes.keySet()) {
				mapping.setAttribute(key, attributes.getAttribute(key));
			}
			mappings.add(mapping);
		}
		return mappings;
	}

}