class SpecificationTransformerTypeBased implements Transformer<T, S> {

	protected Architecture<Resource, Link> generateArchitecture(ResourceTypes<Resource> resourceTypes,
			LinkTypes<?> linkTypes) {

		Architecture<Resource, Link> architecture = new Architecture<Resource, Link>();
		Link linkType = linkTypes.values().iterator().next();

		// on-chip bus
		Resource bus = new Resource("bus");

		for (Resource type : resourceTypes.values()) {
			Resource instance = new Resource("r" + CONNECTOR + type.getId());

			Attributes attributes = type.getAttributes();
			for (String key : attributes.keySet()) {
				instance.setAttribute(key, attributes.getAttribute(key));
			}
			instance.setType(type.getId());

			Link link = new Link("l" + CONNECTOR + type.getId());

			Attributes linkAttributes = linkType.getAttributes();
			for (String key : linkAttributes.keySet()) {
				link.setAttribute(key, linkAttributes.getAttribute(key));
			}

			architecture.addVertex(instance);
			architecture.addEdge(link, instance, bus);
		}
		return architecture;
	}

}