4 include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
 
   23                 return array(
"4.3.0");
 
   34                 return "http://www.ilias.de/xml/Services/Bookmarks/".$a_entity;
 
   43         protected function getTypes($a_entity, $a_version)
 
   46                 if ($a_entity == 
"bookmarks")
 
   58                 if ($a_entity == 
"bookmark_tree")
 
   64                                                         "UserId" => 
"integer",
 
   66                                                         "Parent" => 
"integer",
 
   70                                                         "Description" => 
"text",
 
   83         function readData($a_entity, $a_version, $a_ids, $a_field = 
"")
 
   87                 if (!is_array($a_ids))
 
   89                         $a_ids = array($a_ids);
 
   93                 if ($a_entity == 
"bookmarks")
 
   98                                         $this->data = array();
 
   99                                         foreach ($a_ids as $id)
 
  101                                                 $this->data[] = array(
"UserId" => $id);
 
  108                 if ($a_entity == 
"bookmark_tree")
 
  114                                                 " ,parent,depth,type,title,description,target ".
 
  115                                                 " FROM bookmark_tree JOIN bookmark_data ON (child = obj_id) ".
 
  117                                                 $ilDB->in(
"tree", $a_ids, 
false, 
"integer").
 
  118                                                 " ORDER BY tree, depth");
 
  133                                         "bookmark_tree" => array(
"ids" => $a_rec[
"UserId"])
 
  150         function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
 
  157                         case "bookmark_tree":
 
  158                                 $usr_id = $a_mapping->getMapping(
"Services/User", 
"usr", $a_rec[
"UserId"]);
 
  163                                         switch ($a_rec[
"Type"])
 
  166                                                         if ($a_rec[
"Parent"] > 0)
 
  168                                                                 $parent = (int) $a_mapping->getMapping(
"Services/Bookmarks", 
"bookmark_tree", $a_rec[
"Parent"]);
 
  169                                                                 include_once(
"./Services/Bookmarks/classes/class.ilBookmarkFolder.php");
 
  171                                                                 $bmf->setTitle($a_rec[
"Title"]);
 
  172                                                                 $bmf->setParent($parent);
 
  174                                                                 $fold_id = $bmf->getId();
 
  179                                                                 $tree->setTableNames(
'bookmark_tree',
'bookmark_data');
 
  180                                                                 $fold_id = $tree->readRootId();
 
  182                                                         $a_mapping->addMapping(
"Services/Bookmarks", 
"bookmark_tree", $a_rec[
"Child"],
 
  188                                                         if (((
int) $a_rec[
"Parent"]) > 0)
 
  190                                                                 $parent = (int) $a_mapping->getMapping(
"Services/Bookmarks", 
"bookmark_tree", $a_rec[
"Parent"]);
 
  200                                                                 $tree->setTableNames(
'bookmark_tree',
'bookmark_data');
 
  201                                                                 $parent = $tree->readRootId();                                                          
 
  204                                                         include_once(
"./Services/Bookmarks/classes/class.ilBookmark.php");
 
  206                                                         $bm->setTitle($a_rec[
"Title"]);
 
  207                                                         $bm->setDescription($a_rec[
"Description"]);
 
  208                                                         $bm->setTarget($a_rec[
"Target"]);
 
  209                                                         $bm->setParent($parent);