FileDocCategorySizeDatePackage
ModelExporter.javaAPI DocExample2634Tue Dec 08 01:21:00 GMT 1998oisoft.togetherx.scripts.Rose98Export

ModelExporter

public class ModelExporter extends Object
author
Eugene Belyaev
version
2.1.0

Fields Summary
private Linker
myLinker
private Writer
o
private Writer
rep
private Optioner
optioner
private Hashtable
quidTable
private Hashtable
refTable
private boolean
isVisual
private boolean
isClassViewMode
private boolean
isCategoryViewMode
private String
CurrentDiagram
Constructors Summary
public ModelExporter(UMLModel model, Optioner optioner)


	       
		if (model!=null) {

			this.optioner = optioner;

			model.setIncludeVisibleOnly( false );
			model.setIncludeModelOnly( false );

			UMLPackage rootpackage = model.getRootPackage();
			if( rootpackage != null )
			{
				optioner.linker = new Linker(rootpackage, optioner);
				o = new Writer( optioner.output_stream.getPath() );
				optioner.writer = o;
//				rep = new Writer( "d:\\Export_To_Rose_98.log" );
				optioner.rootCategory = rootpackage.getQualifiedName();
				myLinker = optioner.linker;
				quidTable = myLinker.getQuidTable();
				refTable = myLinker.getRefTable();
	       		 	o.out( "(object Petal" );
				o.advance();
				o.out( "version 42" );
				o.retreat();
				o.out( ")" ); // close Petal
				o.newline();

				o.out( "(object Design " + o.makeString( "Logical View" ) );
				o.advance();
				o.out( "quid" + o.tab() + o.makeString( "EB0000000000" ) );
				//o.out( "root_category (object Class_Category " + o.makeString( "Logical View" ) );
				//String quid = "EB1000000000";
				//o.advance();
				//o.out( "quid" + o.tab() + o.makeString( quid ) );
				//o.out( "logical_models" + o.tab() + "(list unit_reference_list" );
				//o.advance();
				isVisual = false;
				(new ClassExporter(optioner)).visitClassDiagram( (UMLClassDiagram)rootpackage );
				//rootpackage.accept( this );
				//o.retreat();
				//o.out( ")" ); // close logical_models
       		 	//o.retreat();

				//o.out( ")" ); // close root_category
				//o.retreat();
				o.out( ")" ); // close Design
	       			o.close();
//				rep.close();
				System.out.println( "DONE" );
			} else optioner.manager.createMessage( "Rose98Export error: no model loaded" );
		}
	
Methods Summary