class SpecificationReader {

	protected Architecture<Resource, Link> toArchitecture(nu.xom.Element eArch)
			throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException,
			InvocationTargetException, NoSuchMethodException, ClassNotFoundException {
		Architecture<Resource, Link> architecture = new Architecture<Resource, Link>();

		nu.xom.Elements eResources = eArch.getChildElements("resource", SpecificationWriter.NS);
		for (nu.xom.Element eResource : iterable(eResources)) {
			Resource resource = toNode(eResource, null);
			architecture.addVertex(resource);
		}

		nu.xom.Elements eLinks = eArch.getChildElements("link", SpecificationWriter.NS);
		for (nu.xom.Element eLink : iterable(eLinks)) {
			parseLink(eLink, architecture);
		}

		return architecture;
	}

}