getTransport().stop();
((MainFrame) root.getComponent( Main.COMP_MAIN )).clearLog();
// Map options = new HashMap();
// options.put( "file", path );
// return( new ProcessingThread( this, root, root, doc, text, options, Session.DOOR_ALL ));
final ProcessingThread pt;
final Map options = new HashMap();
pt = new ProcessingThread( this, root, getResourceString( "menuOpen" ));
options.put( "file", path );
options.put( XMLRepresentation.KEY_BASEPATH, path.getParentFile() );
pt.putClientArg( "options", options );
// pt.start();
final org.w3c.dom.Document domDoc;
final DocumentBuilderFactory builderFactory;
final DocumentBuilder builder;
builderFactory = DocumentBuilderFactory.newInstance();
builderFactory.setValidating( true );
getUndoManager().discardAllEdits();
try {
builder = builderFactory.newDocumentBuilder();
builder.setEntityResolver( Session.this );
domDoc = builder.parse( path );
// context.setProgression( -1f );
fromXML( domDoc, domDoc.getDocumentElement(), options );
// doc.getMap().putValue( this, Session.MAP_KEY_PATH, f );
// doc.setName( f.getName() );
// setFile( path );
// context.setProgression( 1.0f );
// success = true;
}
catch( ParserConfigurationException e1 ) {
pt.putClientArg( "exception", e1 );
}
catch( SAXParseException e1 ) {
pt.putClientArg( "exception", e1 );
}
catch( SAXException e1 ) {
pt.putClientArg( "exception", e1 );
}
catch( IOException e1 ) {
pt.putClientArg( "exception", e1 );
}
return pt;
}