/**
  * Import a container
  * @param object $dir
  * @param object $type
  * @return 
  */
 protected function doImportObject($dir, $type)
 {
     $manifest_file = $dir . "/manifest.xml";
     if (!file_exists($manifest_file)) {
         return false;
     }
     include_once "./Services/Export/classes/class.ilManifestParser.php";
     $parser = new ilManifestParser($manifest_file);
     // Handling single containers without subitems
     if (!$parser->getExportSets()) {
         $this->createDummy($type);
         $new_id = parent::doImportObject($dir, $type);
         return $new_id;
     }
     // Handling containers with subitems
     $first = true;
     foreach ($parser->getExportSets() as $set) {
         $GLOBALS['ilLog']->write(__METHOD__ . ': do import with dir ' . $dir . DIRECTORY_SEPARATOR . $set['path'] . ' and type ' . $set['type']);
         $new_id = parent::doImportObject($dir . DIRECTORY_SEPARATOR . $set['path'], $set['type']);
         if ($first) {
             $ret = $new_id;
             $first = false;
         }
     }
     return $ret;
 }