/**
  * Exporter of recordstructures
  * 
  * Adds recordstructure elements to the xml, which contain the necessary
  * information to create the same recordstructure.
  * 
  * @access public
  * @since 10/17/05
  */
 function exportRecordstructures()
 {
     $children = $this->_object->getRecordStructures();
     while ($children->hasNext()) {
         $child = $children->next();
         $exporter = new XMLRecordStructureExporter($this->_xml);
         $exporter->export($child);
         // ????
     }
     unset($children, $child, $exporter);
 }
 /**
  * Exporter of a list of assets, for selective asset exporting
  * 
  * @param array $idList a list of asset id's
  * @return string $file is the directory where all the data is written
  * @access public
  * @since 12/13/05
  */
 function exportList($idList)
 {
     $harmoni = Harmoni::Instance();
     $repositoryManager = Services::getService("Repository");
     $listOfRS = array();
     $idListRS = array();
     $this->_fileDir = $this->_tmpDir;
     // prepare all the things we need to export
     foreach ($idList as $assetId) {
         $asset = $repositoryManager->getAsset($assetId);
         // build the list of recordstructures
         $this->buildRSList($asset, $idListRS, $listOfRS);
     }
     // get the xml file ready
     $this->setupXML($this->_fileDir);
     fwrite($this->_xml, "<repository>\n");
     // export the necessary recordstructures
     foreach ($listOfRS as $rS) {
         $exporter = new XMLRecordStructureExporter($this->_xml);
         $exporter->export($rS);
         unset($exporter);
     }
     // clean up after the recordstructures
     unset($listOfRS, $idListRS);
     // export the assets
     $this->_status = new StatusStars(_("Exporting all Assets in the Collection"));
     $this->_status->initializeStatistics(count($idList), 100);
     foreach ($idList as $assetId) {
         $asset = $repositoryManager->getAsset($assetId);
         $this->export($asset);
         $this->_status->updateStatistics();
     }
     fwrite($this->_xml, "</repository>");
     fclose($this->_xml);
     return $this->_tmpDir;
 }