ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilMediaObjectsExporter.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Export/classes/class.ilXmlExporter.php");
5 
14 {
15  private $ds;
16 
20  public function init()
21  {
22  include_once("./Services/MediaObjects/classes/class.ilMediaObjectDataSet.php");
23  $this->ds = new ilMediaObjectDataSet();
24  $this->ds->setDSPrefix("ds");
25  }
26 
35  public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
36  {
37  $md_ids = array();
38  foreach ($a_ids as $mob_id) {
39  $md_ids[] = "0:" . $mob_id . ":mob";
40  }
41 
42  return array(
43  array(
44  "component" => "Services/MetaData",
45  "entity" => "md",
46  "ids" => $md_ids)
47  );
48  }
49 
58  public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
59  {
61  $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
62  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
63  }
64 
72  public function getValidSchemaVersions($a_entity)
73  {
74  return array(
75  "5.1.0" => array(
76  "namespace" => "http://www.ilias.de/Services/MediaObjects/mob/5_1",
77  "xsd_file" => "ilias_mob_5_1.xsd",
78  "uses_dataset" => true,
79  "min" => "5.1.0",
80  "max" => ""),
81  "4.3.0" => array(
82  "namespace" => "http://www.ilias.de/Services/MediaObjects/mob/4_3",
83  "xsd_file" => "ilias_mob_4_3.xsd",
84  "uses_dataset" => true,
85  "min" => "4.3.0",
86  "max" => ""),
87  "4.1.0" => array(
88  "namespace" => "http://www.ilias.de/Services/MediaObjects/mob/4_1",
89  "xsd_file" => "ilias_mob_4_1.xsd",
90  "uses_dataset" => true,
91  "min" => "4.1.0",
92  "max" => "")
93  );
94  }
95 }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
Xml Exporter class.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
getAbsoluteExportDirectory()
Get absolute export directory.
Media Pool Data set class.
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
Get tail dependencies.
Export2 class for media pools.