function BaseImporter () {
  this._schema = null;
  this._export = null;
  this._types = {};
  this._model = {
    properties:{},
    definitions:{},
    ids:{}
  };
  this.error = null;

  var baseImporter = this;

  //setup listeners
  this.on('readyStateChanged', function (readyState) {
    //state changed
    if(readyStates.complete === readyState){
      //state says loading has finished
      if(baseImporter.error){
        baseImporter.emit('failed', baseImporter.error);
      } else {
        baseImporter.emit('success', null, baseImporter.getModel());
      }

      //send general complete notification
      baseImporter.emit('complete', baseImporter.error, baseImporter.getModel());
    }
  });
}
function BaseImporter () {
  this._schema = null;
  this._export = null;
  this._types = {};
  this._model = {
    properties:{},
    definitions:{},
    ids:{}
  };
  this.error = null;

  var baseImporter = this;

  
  this.on('readyStateChanged', function (readyState) {
    
    if(readyStates.complete === readyState){
      
      if(baseImporter.error){
        baseImporter.emit('failed', baseImporter.error);
      } else {
        baseImporter.emit('success', null, baseImporter.getModel());
      }

      
      baseImporter.emit('complete', baseImporter.error, baseImporter.getModel());
    }
  });
}
function BaseImporter ( ) { this . _schema = null ; this . _export = null ; this . _types = { } ; this . _model = { properties : { } , definitions : { } , ids : { } } ; this . error = null ; var baseImporter = this ; //setup listeners
 this . on ( 'readyStateChanged' , function ( readyState ) { //state changed
 if ( readyStates . complete === readyState ) { //state says loading has finished
 if ( baseImporter . error ) { baseImporter . emit ( 'failed' , baseImporter . error ) ; } else { baseImporter . emit ( 'success' , null , baseImporter . getModel ( ) ) ; } //send general complete notification
 baseImporter . emit ( 'complete' , baseImporter . error , baseImporter . getModel ( ) ) ; } } ) ; }
BaseImporter psuedo class to be extended
BaseImporter psuedo class to be extended