protected void write() throws IOException { BufferedWriter writer = new BufferedWriter(new FileWriter(filename)); java.util.Set ids = seminars.keySet(); java.util.Iterator iterator = ids.iterator(); while (iterator.hasNext()) { String id = (String) iterator.next(); Vector vector = (Vector) seminars.get(id); for (int i = 0; i < vector.size(); i++) { Seminar seminar = (Seminar) vector.get(i); writer.write(id + "\t" + seminar.getAnnotations().length + "\n"); for (int j = 0; j < seminar.getAnnotations().length; j++) { Annotation annotation = seminar.getAnnotations()[j]; writer.write(annotation.type + "\t"); writer.write(annotation.offset + "\t"); writer.write(annotation.length + "\t"); writer.write(annotation.text + "\n"); } } } writer.flush(); writer.close(); }