public void generate(int nconstraints) throws Exception { StringBuilder constraint = new StringBuilder(); for (int i = 0; i < nconstraints; i++) { // Parse the DDS to produce a ServerDDS object ServerDDS sdds = new ServerDDS(new test_ServerFactory()); StringBufferInputStream teststream = new StringBufferInputStream(testDDS); if (!sdds.parse(teststream)) throw new ParseException("Cannot parse DDS"); collectnodes(sdds); constraint.setLength(0); genconstraint(constraint); System.out.println(constraint.toString()); } }