public void testReal() throws Exception { SaxReader nsr = new SaxReader("Mappings.xml"); for (Iterator it = nsr.parse().iterator(); it.hasNext();) { SemanticType st = (SemanticType) it.next(); VelocityHelper vh = new VelocityHelper(); vh.put("type",st); FileWriter fw = new FileWriter("/tmp/"+st.getId().replaceAll("[.]","_")+".hbm.xml"); vh.invoke("ome/dsl/mapping.vm",fw); fw.flush(); fw.close(); } }
public void testReal() throws Exception { File currentDir = new File(System.getProperty("user.dir")); File mappings = new File(currentDir.getParent() + File.separator + "common" + File.separator + "resources" + File.separator + "Mappings.ome.xml"); log.error(mappings); SaxReader nsr = new SaxReader(mappings); for (Iterator it = nsr.parse().iterator(); it.hasNext();) { SemanticType st = (SemanticType) it.next(); VelocityHelper vh = new VelocityHelper(); vh.put("type", st);   StringWriter sw = new StringWriter(); vh.invoke("ome/dsl/mapping.vm", sw); sw.flush(); sw.close();   } }
	public void testReal() throws Exception {		SaxReader nsr = new SaxReader("Mappings.xml");		for (Iterator it = nsr.parse().iterator(); it.hasNext();) {			SemanticType st = (SemanticType) it.next();			VelocityHelper vh = new VelocityHelper();			vh.put("type",st);			FileWriter fw = new FileWriter("/tmp/"+st.getId().replaceAll("[.]","_")+".hbm.xml");			vh.invoke("ome/dsl/mapping.vm",fw);			fw.flush();			fw.close();		}	}