1 package org.objectweb.modfact.jmi.xmi; 2 3 import javax.jmi.reflect.*; 4 import javax.jmi.xmi.*; 5 import java.io.*; 6 import java.util.*; 7 8 public class XmiWriterImpl implements XmiWriter { 9 10 boolean useFullyQualifiedName = false; 11 12 public XmiWriterImpl() { 13 } 14 15 public void write(OutputStream out, Collection objs, String version) throws IOException { 16 Writer w = new Writer(this, out); 17 w.writeHeader(); 18 Iterator it = objs.iterator(); 19 while(it.hasNext()) { 20 RefObject o = (RefObject) it.next(); 21 w.writeOuterMostCompositeOf(o); 22 } 23 w.writeReferencedObjects(); 24 w.writeEnd(); 25 } 26 27 28 public void write(OutputStream out, RefPackage extent, String version) throws IOException { 29 Writer w = new Writer(this, out); 30 w.writeHeader(); 31 w.writePackage(extent); 32 w.writeReferencedObjects(); 33 w.writeEnd(); 34 } 35 36 37 38 39 } 40 | Popular Tags |